glBindBuffer

Started by
1 comment, last by BitMaster 10 years, 11 months ago

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

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.

Consider it pure joy, my brothers and sisters, whenever you face trials of many kinds, 3 because you know that the testing of your faith produces perseverance. 4 Let perseverance finish its work so that you may be mature and complete, not lacking anything.

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.

This topic is closed to new replies.

Advertisement