OpenGL / GLScene 2D roadmap

I have some street raster tiles that I want to load as a 2D road map the user can zoom in/out and pan.
These tiles are quite large (tiff files) and I am worried about how to have glscene handle loading dynamically so as not to blow the memory.
I don't mind making "less accurate" images for zoomed out, etc. but need to know what basic layout I need for GLScene to achieve all of this
Any help appreciated.
I'm sure this has already been "invented" and I'm happy to use sample code, but it must be free...
LVL 17
TheRealLokiSenior DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cut the large images into tiles... then you load (At most) 4 tiles at any one time.. each of which is much smaller than the overall image.

For instance, if you had a 100000 x 100000 bitmap...

Split the image into screenWidth by screenHeight tiles... Let's say that gives you a 10 x 10 "grid" to keep this an easier discussion.

On screen, you might start the user's position at the dead center of this tile split... 5,5.

As they pan around, you simply load and draw the individual tiles... if one tile is the same resolution as the default display, then at most you need 4 tiles loaded into memory at once.

This is a fairly common problem that is similar to all the "tiling' of images stuff you can find on the web.

Hope this helps,
TheRealLokiSenior DeveloperAuthor Commented:
I understand the theory.
I need help deciding on the objects to use, and if GLScene handles the memory if a tile is not needed (far to the left, etc)

I'm currently using a single TGLPlane for 1 3000x2000 tile

TheRealLokiSenior DeveloperAuthor Commented:
I have had to make low res images for when the camera is zoomed out.
Loading 100 full res images at 3000x2000 pixels each takes gigs of memory and of course a long time to do.

What I'm doing now, is using the focal point and camera distance to determine how many tiles to load (at all), and if the camera is moved out a long way, I dump the images and load the much faster low res ones for the "edge" of the camera view

I'm sure there's a good routine for this, but perhaps not in this forum

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
what you descriped is known as "mip mapping"....

Very common.

Glad it worked for you.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.