Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

OpenGL opengl 4.5

Recommended Posts

Posted (edited)

If he is using the introductory examples from the blue book, chances are that there are no shader source files, but the code is provided inline C++ as char* arrays, the format glShaderSource() expects. So this can be an error caused by a missing " or some such.

Thus i followed that there is a lack of understanding how shader code and application code work together.

But never mind, maybe you're right and i cannot be of help here.

Edited by Green_Baron

Share this post


Link to post
Share on other sites
Advertisement
16 hours ago, phil67rpg said:

how do I do this?

Hi Phil67rpg

Been a while since I've used OpenGL but you have to do something like this:

To use shaders put the shader code in a text file save it to your computer, where the c++ files for your project are located

And you can drag the txt file to your source folder inside visual studio, just click and drag,

that's basically how you get started using sahders,

then you have to write some more code opengl code of some sort to compile the shader, and actually use it in the same project,

that's basically what shaders are, compiled text files that do some graphics operations,

OpenGL 4.5 code:

glCompileShader(your_shader_number)

I believe the process is something similar, and here's some pages to help you understand OpenGL:

https://www.khronos.org/registry/OpenGL-Refpages/gl4/

 

Share this post


Link to post
Share on other sites
3 hours ago, doug25 said:

To use shaders put the shader code in a text file save it to your computer, where the c++ files for your project are located

And you can drag the txt file to your source folder inside visual studio, just click and drag,

can you be a little more specific, should I use notepad?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!