corwinn / h3r

As of 23.08.2023 this project continues elsewhere.____A remake to be of the game engine of the well-known computer game "Heroes of Might and Magic III" and its official expansions.
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

glMultiDrawArrays/glDrawArrays show-stopper #55

Closed corwinn closed 1 year ago

corwinn commented 1 year ago

Solution: glDisable (GL_COLOR_ARRAY) for a VBO that is not using it - no matter it is not setting glColorPointer() ever. Situation: init() { glEnable (GL_VERTEX_ARRAY) glEnable (GL_TEXTURE_COORD_ARRAY) glEnable (GL_COLOR_ARRAY) glGenBuffers glBindBuffer glBufferData } ... Render() { glBindBuffer _vbo1_xyz_uv glBindTexture glVertexPointer glTexCoordPointer glDrawArrays } The above works (as expected) just fine on "linux" on "Mesa 3d" + "amdgpu". On "windows" I had to glDisable (GL_COLOR_ARRAY) for _vbo1_xyz_uv, or glDrawArrays/glMultiDrawArrays seg-faults. If there is a reason for it - I fail to see it.

For some unknown reason these two just deny working on "windows":

glGetError() remains silent.

Doesn't fix the issue:

corwinn commented 1 year ago

Solution: glDisable (GL_COLOR_ARRAY) for a VBO that is not using it - no matter it is not setting glColorPointer() ever. 0c55f5e1a8a927c9b5546b521866a78d1b99be8d