So, I am working on a series of algorithms that will make up the basic framework of a 2D game. I am using C++ with SDL/OpenGL. When it comes to sprite blitting I have a number of was I could possibly achieve this, but when I start to get to the code, I hesitate and wonder if I am going about it the correct way. I wish to render using OpenGL, so I thought first I could split it into rectangles and sprites. where I simply setup a polygon and add a texture to it. I am struggling to find a nice way to draw this rectangle however within a class method, I need to pass arguments for the x, y coords of each vertices, would I not just be able to give the top left and bottom right coords to draw it?
Any help on how I should go about doing this will be appretiated, I am aiming for an object oreintated design.