View Full Version : Large textures in opengl

04-09-2006, 07:02 PM
Hi, I am fairly new to opengl.

I am making a moving map program fairly similar to google earth.

I have some hi-res maps stored as bitmaps which I would like to stitch together in opengl to form a really big map which I can zoom, rotate and incline with.

I have already tried to have one massive square which I can render the whole texture in one go. It works ok zoomed in, but when I zoom out my PC, (FX5900XT Althon 2600+) slows down to the point where I just have to end the process.

I was wondering. Does anyone know how to make it so opengl only renders according to the size of the texture, or decreases the detail of the bitmap when you are far away from it? Are there any tut's out there on this?

I'm sure everyone has tried to render a polygon with some huge image and would have encountered this problem. Maybe there is a tut on how to do this properly?


Claus Matthiesen
04-10-2006, 01:24 AM
Hi dy,

You need to take a look at mip-mapping. It is a fairly large subject but actually just googling "opengl mipmap" will get you far - the first entry, http://www.flipcode.com/articles/article_advgltextures.shtml, is actually not a bad starting point.

You are a bit sketchy in your description of what the program is supposed to do but inferring from what you're written, I would consider not stitching all the bitmaps into one large texture but rather display each bitmap as a texture on an independent quad and then align them properly to one another. This makes it easier to swap unneeded bits of the map out.

Hope this helps,