   Sprite reading through Opengl
  Hi,    I am trying to read a sprite from sprite sheet and want to display it using opengl(c++).I am not able to get a proper logic for extracting a particular spriteand display it using a quad in opengl.If anyone one can give me any suggestions it will be very helpfull.Thanks in advance...   
  You need to bind a texture for your sprite sheet image and then draw a textured quad, with texture coordinates describing the correct part of the image. The way you find the correct part will depend on the sprite sheet, you may need to load a separate file describing the frame rectangles explicitly, or if your sprites are arranged in a regular grid you may be able to compute an offset based on the frame your on and a constant frame size.;Quote:Original post by SomniaYou need to bind a texture for your sprite sheet image and then draw a textured quad, with texture coordinates describing the correct part of the image. The way you find the correct part will depend on the sprite sheet, you may need to load a separate file describing the frame rectangles explicitly, or if your sprites are arranged in a regular grid you may be able to compute an offset based on the frame your on and a constant frame size.Hi,   I will be using sprite sheet of sizes power of 2 like 512x512 or 1024x768 etc.The sprite sizes if that too if i take it as power of 2 then whats the logic can you please elaborate.   ;  Sorry I'm not sure what your question is. Do you know how to load an image, bind a texture, draw a quad and use texture cordinates? If not there are lots of tutorials about, here for example: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06If so then the only problem is knowing the correct texture coordinates that describe the image sub region for the frame you want to draw. There are lots of ways of handling this, usually involving some kind of meta-data file loaded along with the animation that contains this information.   ;  I created a video tutorial on this which you can download here:http://www.marek-knows.com/downloadSection.php?Topic=OpenGL&pg=1