Jump to content
  • Advertisement
Sign in to follow this  
FGFS

glBindBuffer

This topic is 2019 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

Hi

  when not compiled as a shared lib it works fine but as shared it crashes at:

 

    glBindBuffer(GL_ARRAY_BUFFER, vbo[index]);

 

Any help would be much appreciated.

Thanks

 

Share this post


Link to post
Share on other sites
Advertisement

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.  

Share this post


Link to post
Share on other sites

You are omitting loads of important information. Which operating system are you working on? If it is Windows, you are most likely using some kind of extension wrangler, because glBindBuffer does not exist in Window's gl.h. Which extension wrangler? Most extension wranglers need some of initialization function to be called before using any of the contained functions (like glewInit for GLEW). How are you linking your extension wrangler? Depending on how you do it you can easily end up with two copies of the same extension wrangler, one in your own DLL one in your main program. Both of them must call their initialization function.

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.

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!