Click here to Skip to main content
13,192,426 members (47,082 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I've been working through an openGL tutorial that simply renders a shape. I think all my code is correct however when i compile and run the code there is no shape rendered.

Is every version of GLSL compatible with every version of OpenGL?
Posted 8-Jan-13 14:27pm
You thinking does not look convincing to me. If you blame GLSL.., perhaps you could get the shape rendering, but without proper shading, and then you would have to blame your code instead. After all, you could test it all with some simplified rendering, not using GLSL; is something like that possible?
Wong Shao Voon 8-Jan-13 21:30pm
There are different versions of GLSL. Have you checked whether your graphics card support that GLSL version you are using? Is there any error in the shader compilation?
Member 9731806 8-Jan-13 21:57pm
i don't think there are any errors with the shader. Errors are thrown if the shader cant load and there aren't any showing up.
Wong Shao Voon 8-Jan-13 22:19pm
OpenGL API is a C language based. They don't throw exceptions unless the C++ wrapper you are using, does that. You should always check for shader compilation errors. I think you are better off posting your shader code and your graphics card specs in an new question. Right now, I can only wild-guess what went wrong.
About C, this is not exactly so. Do you understand that there is no a concept of exception in C, but still C code can throw exception, due to the design of the OS? I you don't, I can explain it. So, be sure: an exception can be thrown by C code.
"I don't think" is not convincing. You can do appropriate testing to isolate possible problems.
Santhosh G_ 9-Jan-13 13:47pm
Please post the shader code, then we can identify the possible reason.
Compilers of some hardware venders are strict, I got different results on compiling same shader program in different machines.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171017.2 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100