Ok, Im not sufficiently satisfied with this solution. Now I dont care about
the extra work required, I just want to do it the right way.
It would seem the appropiate way of blitting a large 2d “skin” over a 3d
game is to simply render the 2d bitmap to a surface, and to splice up that
surface into the largest 2^N texture size possible (i.e. 16x16 or 128x128)
for each portion and texture map each of those portions into a quad… Now,
I’d assume (hope) there is no distortion when having a bunch of images
spliced up and adjacent (square) quads. Assuming each quad hasnt been
resized, rotated, or scaled and at the exact same thing as the original
bitmap, is this a reasonable assumption to make that there will indeed no
distortion? (kind of like designing a webpage by breaking a large image
into a lot of smaller ones).
Seems like it - provided you disable filtering when rendering the surface.
If you want filtering, you have to leave at least one pixel outside the
texture source rect for each quad, and fill that border with data from the
adjacent rects. (That is, if you rendered all quads with the same
texture/screen resolution ratio, but rendered the full texture size, you’d
get a 2 pixel overlap between tiles.)
The reason of splicing it up,of course, is texture size limit… Apparently
you cant have textures larger than 128x128 with a Voodoo3, or certain
ratios like 1:8 (16x128)?
(IIRC, it’s 256x256, but I’m not sure… Still too small, though.)
What are the implications of having lots of
little textures that arent even updated that often?
You might exhaust the texture RAM, forcing some textures to be rendered
from system RAM - which may mean that it has to be done without h/w
acceleration on some cards, and nearly always means that it’s significantly
slower than rendering from real texture RAM.
Are there any example
programs that utilize some sort of HUD or something?
An SDL_Console version with OpenGL support was released a few days ago, IIRC.
(Can’t seem to find the post, though…)
//David
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
--------------------------------------> david at linuxdj.com -'On Monday 05 March 2001 20:47, Matt Johnson wrote: