It will be our tick method.įirst of all, Keyboard is a static class, similar to Display. First of all, let’s make a new method in our MainClass, which we’ll call every frame as well. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |