OpenGL 3D Game Tutorial 2: VAOs and VBOs
Why Stack Overflow recommends it
Stack Overflow users mention it as the tutorial they are following when they hit LWJGL and OpenGL errors, such as context problems, invalid operations, or differences between LWJGL and PyOpenGL calls.
Recommended by 0 people across 0 different months, 2018 to 2022.
What it is
Part 2 of ThinMatrix's LWJGL series on building a 3D Java game with OpenGL. It shows how to render a model using vertex array objects (VAOs) and vertex buffer objects (VBOs), with the vertex data and full code posted on GitHub.
What people said
Cites Alex Jones · 2018-11 · Stack Overflow · on “Exception in thread "main" org.lwjgl.opengl.OpenGLException: Invalid operation (1282)”
So Im following this tutorial on [this video] and I seem to have made an error somewhere. Full Error: Exception in thread "main" org.lwjgl.opengl.OpenGLException: Invalid operation (1282) at org.lwjgl.opengl.Util.checkGLError(Util.java:59) at org.lwjgl.opengl.GL11.glDrawArrays(GL11.java:1205) at renderEngine.Renderer.render(Renderer.java:21) at engineTester.MainGameLoop.main(MainGameLoop.java:33) Code: Renderer.java: package renderEngine; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.GL30; import renderEngine.RawModel; public class Renderer { public void prepare() { GL11.glClearColor(1, 0, 0, 1); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); } public void render(Ra
Cites user13104225 · 2021-01 · Stack Overflow · on “difference in giving parameters to opengl code in LWJGL and PyOpenGL”
i am learning opengl with python.and following this course [this video] just to be able to do.he is using LWJGL, i am PyOpengl. i noticed some of his methods ( glgenVertexArray , gldeleteVertexArray ...ex) is used without parameters even docs says otherwise. while i wrote same code in python it's says glGenVertexArrays requires 1 arguments (n, arrays), received 0: () it' wants a parameter from me for the same method. it's not a problem here(i think) give 1 but when its come to glDeleteVertexArrays if i dont give 1 and the list that i am keeping vao,vbo ids its raises this Traceback (most recent call last): File "C:\Users\TheUser\AppData\Local\Programs\Python\Python38-32\lib\site-packages\OpenGL\l
Cites raffillium · 2022-06 · Stack Overflow · on “"No context is current or a function that is not available in the current context was called" - LWJGL”
I'm following a tutorial [this video] on LWJGL but since it's from 2014 and a lot has changed since then, I had to adapt my code when creating the display and context. Now I am getting the error: FATAL ERROR in native method: Thread[main,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution. at org.lwjgl.opengl.GL30C.nglGenVertexArrays(Native Method) at org.lwjgl.opengl.GL30C.glGenVertexArrays(GL30C.java:2420) at org.lwjgl.opengl.GL30.glGenVertexArrays(GL30.java:2346) at engine.ModelLoader.createVAO(ModelLoader.java:41) at engine.ModelLoader.loadToVAO(ModelLoader.java:26) at engine.Main.main(Main.java:47) ... even though