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
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
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.
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.