Jump to content
  • Advertisement
Sign in to follow this  
ZHAO Peng

OpenGL Immature support of OpenGL core profile in freeglut?

This topic is 3060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, I am trying to build some demos using freeglut for learning OpenGL 3.2 core profile. When I try the latest stable release 2.6, there is a performance problem when call display function in idle call back. So I download the development source codes from SVN and build them by myself. Everything seems OK at the first. However, when I try to use uniform block, each related functions, such as glGetUniformBlockIndex, would make the program crash. When I switch the profile to GLUT_COMPATIBILITY_PROFILE, there is no problem. Core profile version: ... glutInitContextProfile(GLUT_CORE_PROFILE); ... GLint lightBlockIndex= glGetUniformBlockIndex(usedProgram, "colors0");//This call will crash ! .... Compatibility profile version: ... glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE); ... GLint lightBlockIndex= glGetUniformBlockIndex(usedProgram, "colors0");//This is OK! .... These codes are tested on OpenSUSE 11.2 with GTX260 card (driver:195.36.07.04). The same problem also occurs on Radeon cards. I also test the uniform block functions using codes GLUS written by Nopper, and it is OK. So I am sure it is the problem of freeglut. Any suggestions or alternative solution? Thanks! ZHAO Peng

Share this post


Link to post
Share on other sites
Advertisement
i had the same problem with sdl. i ended up downloading the src code and addding the code to select the profile but that was not the problem. it seems to be able to use the core you must only have those core gl functions initialized. i found that to be odd and it probably not the real reasonn but it worked for me. use the gl3.h header file it might help.

Share this post


Link to post
Share on other sites
Thanks for your reply!
I use glew 1.5.4 instead of gl3.h. I think the core functions should have been ready to be called. In my option, maybe there are some problems when freeglut creates core profile context. I will try to fix it by modifying the source codes of freeglut.
It seems that there is still no GUI library working with OpenGL core profile perfectly. This is really an annoying problem for programmer.

Share this post


Link to post
Share on other sites
Finally, I have solved my problem. I should apologize to freeglut for the misunderstanding.
The real reason is that GLEW considers my Nvidia driver as experimental driver. So I should add "glewExperimental= GL_TRUE;" before "glewInit();";
But I don't know why GLEW regards "NVIDIA-Linux-x86_64-190.53" as experimental driver. Anyway it works.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!