alahaa.blogg.se

Java lwjgl 2.9 texture bind
Java lwjgl 2.9 texture bind






java lwjgl 2.9 texture bind

So it’s totally possible to do something like this…īut uh, let’s do something a bit more…useful. Draw just means that our application sets it, and OpenGL uses it. Dynamic means we’ll set it many times and use it many times. Static means – We set it once, and use it many times. Although we don’t strictly need to do this, it gives OpenGL a hint on how to optimize. Instead of giving it GL15.GL_STATIC_DRAW, we want to give it GL15.GL_DYNAMIC_DRAW. Actually, we only have to change one line – our glBufferData call in our quad setup method. Now that we have a textured Quad, we can make it move around! It actually won’t be that hard to do we just have to change a couple lines of OpenGL, add some convenience methods to our class, and use the LWJGL’s Keyboard class.įirst the OpenGL.








Java lwjgl 2.9 texture bind