Click here to Skip to main content
11,802,389 members (30,226 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ OpenGL
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
Sergey Alexandrovich Kryukov at 8-Jan-13 21:04pm
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 at 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 at 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 at 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.
Sergey Alexandrovich Kryukov at 9-Jan-13 10:50am
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.
Sergey Alexandrovich Kryukov at 9-Jan-13 10:48am
"I don't think" is not convincing. You can do appropriate testing to isolate possible problems.
Santhosh G_ at 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
0 OriginalGriff 475
1 KrunalRohit 366
2 F-ES Sitecore 295
3 Afzaal Ahmad Zeeshan 230
4 CHill60 220
0 OriginalGriff 2,950
1 Maciej Los 1,910
2 KrunalRohit 1,862
3 CPallini 1,645
4 Richard MacCutchan 1,157

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2015
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