   OpenGL - 2D large scrolling background
  I'm playing around with doing some pre-rendered backgrounds for my game project similar to what has been done in games like Final Fantasy VII or Baulders Gate. In these games, there is a large, pre-rendered, background image which the characters walk around on.I also want to do this using OpenGL. Using 3D hardware presents some technical limitations and I would like some advice on how to implement it.1) If I load the background image as a gigantic texture, this could get quite large considering that it will have to compeat for space amongst the rest of the game graphics. There is no way (that I am aware of) to use some sort of indexed color image (i.e. a 16-bit or 8-bit BG image vs. full 24-bit color). Further, there is no way (that I am aware of anyway) to achieve masking effects using a texture. That is, have a seperate bitmap file that defines sections of the image as 'over' the player vs. 'under' the player thereby achieving a 2D layering effect. I would imagine, the only other solution would be to layer another texture containing the 'over' elements ontop. That is also costly on memory.2) If I use OpenGL's built in 2D graphics blitting rutines, I fear they may not be fast eneough. I have never used them before, so I don't know for sure.I want to use OpenGL because of it's speed boost when doing alpha-blending and it's ability to render lighting and other 3D effects.Further, there will be sections of the game that are full 3D.Any suggestions?EDIT: When I am refering to memory, I am refering to graphics card memory. Memory wouldn't be such an issue were I using the computers own RAM, since loading a 16M-48M image there wouldn't be such a big deal. Graphics cards, of course, are another matter.   
  dxt5 will give u 4:1 compression thus a 32bit texture is the same size as a 8bit oneQuote:2) If I use OpenGL's built in 2D graphics blitting rutines, I fear they may not be fast eneough. I have never used them before, so I don't know for sure.just set the screen to an orthogonal project + draw a fullscreen textured quad, fully accelerated + the fastest method to get an image onscreen   ;  I don't think you can load a texture larger than 2048x2048 anyway. You'll have to cut out parts of your image (in code) and use them as textures. You'll probably want nine cut-outs - the current screen and the surrounding screens. You can still do smooth scrolling - just remember to load/unload cut-outs as the player crosses a cut-out boundary. This also saves you a lot of memory. For the masking, in principle this shouldn't be any different than a walkmesh. You'll need a walkmesh anyway, so you might as well use the same technology for masking. Instead of allowing to walk you'd just overdraw, or not draw player's pixel, or something like that. You should only need two texture layers here if you want to "cut-away" scenery obstructing the player view.Edit: I have no stats to back this up, but I think OpenGL performance for 2D should be acceptable (if you do it how zedzeek described) - you'll get to use hardware acceleration after all. There's also a number of small games out there using this tech.   