Comments (17)
Hey, I had the same issue and just got it working for me. I think the main issue was fighting with visual studio more than the actual code. I was attempting to follow along with the other code inside the 'playground' and got stuck here for quite a while.
The problem I ran into was that visual studio doesn't copy files that you make inside of it into the working directory. If you make a 'shaders' filter and then add two files inside of it these files won't be exported into the working directory so when you try to open them using your program they don't exsist.
I did the following to keep up with the tutorials. I'm not sure if this is really a best practice or anything, but it worked for me.
- Copy the two shaders from the file '.../ogl-master/tutorial02_red_triangle'
- Paste them into '.../ogl-master/playground'
- In Visual Studio Make a 'shaders' filter inside the 'playground' project
- Drag the two filters from the 'playground' folder into the 'shaders' filter.
from ogl.
You should copy the shader to the playground folder as well, that means both SimpleVertexShader.vertexshader
and SimpleFragmentShader.fragmentshader
.
from ogl.
I just moved the SimpleFragmentShader.fragmentshader and the SimpleVertexSahder.vertexShader to the cmake-build-debug dir.
(Btw. im using Clion + Windows 10)
from ogl.
when using xcode it doesnt create the shader file inside the playground directory by default, you need to specify when you create the shader file that it will be inside the playground directory.
from ogl.
In CLion, change the run/debug configuration : Set at working directory the playground directory path.
from ogl.
In CLion, change the run/debug configuration : Set at working directory the playground directory path.
thank you!
from ogl.
got it! I will fix that and update with new translation!
from ogl.
Still have this issue.
I'm using windows 10 and VS2017.
Seems no one has run into this issue...
I've been searching the Internet for a while and cannot find a solution.
from ogl.
from ogl.
For people stumbing on this later :
The .exe must be started from the SOURCE folder, so that it can find the required files ! (shaders, textures, models)
This is thorougly explained in the FAQ.
Either :
- Copy-paste the .exe from the build dir to the source dir, and start it (the CMakeList already does this)
- Copy-paste the resources in the build dir
- cd in the source dir, but start ../../your_build_dir/tutorialXX.exe
- Or just start it from the IDE, it's been configured to Just Work !
from ogl.
I have this issue too. I'm using clion.
from ogl.
Hello, I keep running into the same issue even though I copy paste the Tutorial_02 code, the SimpleVertexShader.vertexshader and SimpleFragmentShader.fragmentshader into the Playground folder. Even with the code that's on the Tutorial_02 unedited folder, it keeps saying "Impossible to open SimpleVertexShader.vertexshader. Are you in the right directory?"
I'm using Xcode on a 2011 Mac.
from ogl.
Hey, I had the same issue and just got it working for me. I think the main issue was fighting with visual studio more than the actual code. I was attempting to follow along with the other code inside the 'playground' and got stuck here for quite a while.
The problem I ran into was that visual studio doesn't copy files that you make inside of it into the working directory. If you make a 'shaders' filter and then add two files inside of it these files won't be exported into the working directory so when you try to open them using your program they don't exsist.
I did the following to keep up with the tutorials. I'm not sure if this is really a best practice or anything, but it worked for me.
- Copy the two shaders from the file '.../ogl-master/tutorial02_red_triangle'
- Paste them into '.../ogl-master/playground'
- In Visual Studio Make a 'shaders' filter inside the 'playground' project
- Drag the two filters from the 'playground' folder into the 'shaders' filter.
Only your answer works for me. Thanks. Hope others get here via google see this.
from ogl.
Hey, I had the same issue and just got it working for me. I think the main issue was fighting with visual studio more than the actual code. I was attempting to follow along with the other code inside the 'playground' and got stuck here for quite a while.
The problem I ran into was that visual studio doesn't copy files that you make inside of it into the working directory. If you make a 'shaders' filter and then add two files inside of it these files won't be exported into the working directory so when you try to open them using your program they don't exsist.
I did the following to keep up with the tutorials. I'm not sure if this is really a best practice or anything, but it worked for me.
1. Copy the two shaders from the file '.../ogl-master/tutorial02_red_triangle' 2. Paste them into '.../ogl-master/playground' 3. In Visual Studio Make a 'shaders' filter inside the 'playground' project 4. Drag the two filters from the 'playground' folder into the 'shaders' filter.
This worked for me thanks! For people in the future, on line 4, "filters" should be "files". Drag the two shader files you copied into the playground folder into the shaders filter in Visual Studio.
from ogl.
Hey, I had the same issue and just got it working for me. I think the main issue was fighting with visual studio more than the actual code. I was attempting to follow along with the other code inside the 'playground' and got stuck here for quite a while.
The problem I ran into was that visual studio doesn't copy files that you make inside of it into the working directory. If you make a 'shaders' filter and then add two files inside of it these files won't be exported into the working directory so when you try to open them using your program they don't exsist.
I did the following to keep up with the tutorials. I'm not sure if this is really a best practice or anything, but it worked for me.
- Copy the two shaders from the file '.../ogl-master/tutorial02_red_triangle'
- Paste them into '.../ogl-master/playground'
- In Visual Studio Make a 'shaders' filter inside the 'playground' project
- Drag the two filters from the 'playground' folder into the 'shaders' filter.
Yep, this is totally working fine with me! I keep feeling stupid when I thought filters as folders..
from ogl.
Hey! have windows 10 and visual studio 19. I did everithing as @RobertAron said and itdi change a bit but its still not working. I got this in comand window
from ogl.
Using absolute paths worked for me: Right click 'File Inspector' -> 'Relative to Project' -> Location 'Absolute Path'
But this not a good solution. Why will relative path not work? All flies are inside the project I am running i.e. playground/shaders/SimpleVertexShader.vertexshader
.
from ogl.
Related Issues (20)
- Domain expired HOT 3
- Tutorial 05: trying my own .bmp files turns out black HOT 3
- Tutorial 05: Texture incomplete on cube HOT 3
- Playground background wrong color in documentation
- 3D Model Keyboard Mouse Controller
- error when compiling Bullet
- Tutorial 4: Output looks nothing like what I have. HOT 3
- [Info] Tutorial 08 GTKMM glArea with shaders loaded from obj file HOT 3
- is this glm::translate call correct? HOT 1
- Quick question about the sign in TestRayOBBIntersection function
- Cannot execute project18 HOT 1
- Tutorial 4 projection issues HOT 1
- glreadpixels picking up wrong color
- why lRayEnd_NDC's z setted to 0 in misc05_picking_custom example
- Memory leak in Particle demo.
- Some comments on the Picking with an OpenGL Hack article
- Tutorial 14 output looks blocky HOT 1
- Licensing: Request to make a fork HOT 7
- Can't compile due to the lack of glplatform.h HOT 2
- Tutorial 13: Orthogonalization applet link down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ogl.