Yeah, I was thinking about 3D…
However, what about textures and alignment? As soon as you rotate a source in
relation to the destination, you get non sequential memory access somewhere.
(Usually in the source data I guess, as the usual method is doing scan
conversion and then rendering horizontal lines.)
If the texture RAM is 64 bits or wider, you don’t hit “in between” memory
words (ie have to read two words to get one pixel) too often with 24 bits,
but 32 bits would eliminate the problem. Sure, 24 bits would mean lower
bandwidth when doing sequential access - but that’s not the general case in
3D.
Conclusion: For 3D acceleration, evenly aligned texel sizes should be
used at all times.
Note: One wouldn’t see this from the outside, except when dealing with
procedural textures, real time texture caching systems and similar
stuff - OpenGL drivers convert to internal formats as required.)
Is this what most cards and drivers do?
(Just in case someone happens to know the facts for some real cards.
As to more practical matters; does anyone have some ideas about how to
reliably set up SDL_Surfaces with the same hardware format as the 3D card is
using internally for textures?
I don’t want the OpenGL driver to silently and transparently convert
everything when uploading, as I need the full speed - using busmaster DMA
whenever possible.
I’m thinking about using a dynamically updated “big tiles” to deal with any
sort of 2D background maps without ending up with tons of triangles.
Uploading bandwidth requirements would be low for “normal” scrolling speeds
(just a few thousand texels/frame), but of course, I’d like to make it as
efficient as possible. (I’ve seen some older games with hysterically fast
scrolling at times, and it would be pretty disappointing if that wasn’t
possible to do with modern hardware…
The main reason why I don’t want to stick with the current solution of
rendering “map tiles” individually as textured quads is that it’s h*ll when
it comes to antialiazing. Generating larger RGBA textures with the CPU would
be simpler, more flexible WRT map formats, multilayered maps, would allow
real time procedural background generation, would allow more graphics data
without depending on the VRAM size etc, etc… (It’s also a more interesting
solution from the tecnical POV.
//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 Wednesday 14 February 2001 07:17, Sam Lantinga wrote:
I should have clarified, I was talking about 2D on the current generation
of graphics cards. For 3D, they often have subpixel precision.