So, I’m using OpenGL (lwjgl), and waited to look into the best ways for rendering. At the moment, I just have a draw method that runs for every object, which draws it on the screen. Now, the thing is I’m using the default way to render.
Example code:
texture.bind();
GL11.glColor3f(0f, 1.0f, 0f);
GL11.glPushMatrix();
GL11.glBegin(GL11.GL_QUADS);
GL11.glTexCoord2f(0,1);
GL11.glVertex2f(x, y);
GL11.glTexCoord2f(1,1);
GL11.glVertex2f(x + width, y);
GL11.glTexCoord2f(1,0);
GL11.glVertex2f(x + width, y + height);
GL11.glTexCoord2f(0,0);
GL11.glVertex2f(x, y + height);
GL11.glEnd();
GL11.glPopMatrix();
but… I feel like it’s better to use VBO’s. Now, VBO’s seem more complicated, but every time I look up a tutorial, I just can’t understand it. Since this is for my 2D side scroller game, are VBO’s the best to use? (I’m also using slick to render the pictures).
I’ll keep looking at tutorials, but if anyone has experience with VBO’s or what not, that would be sweet.