How to handle large textures on old cards?

I’m rendering some planets with gluSphere but using 256x256 textures for the whole planet to be compatible with Voodoo1-3 cards looks like crap! How do I break the texture up or use multiple textures with a gluSphere? Is it even possible? If not, what’s the best way to use multiple textures on a sphere model? I’d like the be able to use gluSphere or something like that because for performance reasons I need to be able to scale the resolution of the model depending on the destance from the viewer.

Actually I am doing the same thing, even if you send a texture bigger 256x256 it should still work as long as the dimensions are a power of 2 (ex, 512x256, 1024x512). I mapped a 1024x512 texture on a sphere with a 4MB Rage with no problem (small slowdown about 2-4 FPS).

Maybe you can help me too , I am trying to render the stars and I cannot seem to get the right feel, see my post titled “Stars” for more info, thanks

<edit>
The thing is, if you use a Voodoo 1, 2 or 3 card textures bigger than 256x256 get filtered down to size
</edit>

I ‘stole’ the code from the MESA gluSphere function and played with it a little.

It splits textures up into 256x256 chunks and fiddles with texture coordinates in the the sphere so that it all fits together nicely. Finally it plops it into a display list for rendering.

I’ll have to surgically remove it from the rest of my source, but if you want it, just give me a shout and I’ll knock up a little planet demo for you.

Paul.

[This message has been edited by Pauly (edited 11-16-2000).]

Sure, that would be greatly appreciated! However, when I tried to map a gluSphere on my Voodoo3 with a texture that was 512x256, the sphere came out all white and it didn’t work AT ALL. But am I to understand that you tried something like this and it worked? Maybe you’re doing something different than I am. At any rate, I would REALLY appreciate that code you talked about. Thanks!

I don’t know if it’s still the same, but all the old voodoo cards had a limit of 256256 texels textures. Perhaps you should get the maximum extents of a texture from the driver. I think that can be done with something like glGet(GL_MAX_TEXTURE_*). Don’t know it for sure right now.

It’s a little hastily put together but: http://home.clara.net/paulyg/download/planetpauly.zip is a link to the source, a big picture (1024x512) and an .exe - let me know if thats what you were aiming for and enjoy!

Paul.

Thanks! I’ll check it out… BTW, was it on your site that you setup that solar system thing and you said you wanted to implement the sort of motion blurring of the starfield as you moved like in I-War? If so, you said it would be pretty simple. How would you go about doing this? Well… For all I know you’ve done it in the file you sent me a link to. I’ll just shut my mouth now and check it out and if I still have questions, I’ll ask you. Thanks a TON, man!