(First, sorry for my bad english, I’m brazilian :/)
Good afternoon,
Well, I’m learning OpenGL/LWJGL right now, and I’m developing a little 2d game:
My problem is, even it’s a 2D game, with 12 entities on my map, I’m having only 30 FPS. Yes, it’s a crappy 2009’ notebook with Intel on-board graphics and a simple dual-core CPU, but the same way, 30 FPS is sooo little for a 2D game.
So I’ve been reading some tutorials, articles, topics and etc about Sprite Batching, VBOs and VAOs, but I couldn’t get it well. My rendering class right now is an edited Tessellator-class taken from Minecraft, used for testing and learning purposes only.
The class “Tessellator” right now:
http://www.java-gaming.org/?action=pastebin&id=909
Aand the “VertexObject” class used in Tessellator:
http://www.java-gaming.org/?action=pastebin&id=910
(Methods like hasColor(), getColor(), hasTexture(), getTextureUV(), etc, are all from sub-class Tessellator, but I’m sure they doesn’t matter here.)
So, how can this be improved? I know there’s a better solution for glXPointer, but even reading a lot I can’t put it on practice.
Thanks in advance.