opengl 4.5

Started by
27 comments, last by phil67rpg 4 years, 8 months ago

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.

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/

 

Doug

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?

This topic is closed to new replies.

Advertisement