Closed TheStackTraceWhisperer closed 2 years ago
glVertexAttribDivisor
is only available since version 3.3 so the fix you propose is ok. I can provide a fix ofr that or you can send a PR (in this case, if you can, please update later chapters).
Thanks !
I've just published new version of the book using old URLs (https://github.com/lwjglgamedev/lwjglbook and https://github.com/lwjglgamedev/lwjglbook-bookcontents).
Closing all the pending issues
In chapter 21 Instanced Rendering, the
InstancedMesh
class leverages an OpenGL API that seems to only be available in OpenGL 3.3+ despite creating an OpenGL 3.2 context defined in theWindow
class. On my machine this triggers fatal errorOpenGL context creation: https://github.com/lwjglgamedev/lwjglbook/blob/master/chapter21/c21-p3/src/main/java/org/lwjglb/engine/Window.java#L51
InstancedMesh import from GL33: https://github.com/lwjglgamedev/lwjglbook/blob/master/chapter21/c21-p3/src/main/java/org/lwjglb/engine/graph/InstancedMesh.java#L22
InstanceMesh usage of GL33: https://github.com/lwjglgamedev/lwjglbook/blob/master/chapter21/c21-p3/src/main/java/org/lwjglb/engine/graph/InstancedMesh.java#L60
Unfortunately, I'm still working through validating the fixes on my machine.
https://github.com/lwjglgamedev/lwjglbook/blob/master/chapter21/c21-p3/src/main/java/org/lwjglb/engine/Window.java#L51
Changing the above line to
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
(from 2) seems to alleviate the problem.Is this a suitable solution that I should PR into the chapter 21 supplemental codebase? If not feel free to guide me towards the desired fix and I can attempt to provide a PR