padding my surfaces

Hi guys!

I’m using OpenGL on top of SDL and everything is working fine. But some things bug me a bit. Maybe I’m doing this stupid, don’t know, so thanks for any hints.

I’m making a 2d application (isometric view, but still it’s 2d for OpenGL purposes). I have some images of floor tiles and the like which I blit as textured quads, giving much better framerates than putpixels or ‘draw…’ and the like.

Now my question is this: I know that textures are supposed to have width and height a power of 2. So what I do is create empty SDL-surfaces of bigger size than the actual images, making them all transparent, then copying the images into the new empty surfaces with the right dimensions and then calling OpenGL function to make it a texture. But why can’t OpenGL do this padding with empty space on the left and bottom sides all on it’s own? Or can it? Maybe somebody got some code sniplets so that I can steal them with permission

Well, thanks for anything and see ya, Johannes.

Sorry, the right and bottom sides this should read… I guess I should go to bed…