[SDL] sdl (lccwin32)

bob bob at lingvo.istu.irk.ru
Sun Nov 23 21:10:01 PST 2003


On Monday 10 November 2003 10.55, Greg Trounson wrote:
> Gidday,
>
> I notice that when I run a program compiled with glSDL on my nVidia
> card, I get a line of output like this:
> glSDL: Max texture size: 4096
> , and when I run it on my 3DFX Voodoo3:
> glSDL: Max texture size: 256
> , as you might expect for a card that can only support 256x256
> textures.
>
> My question is; can glSDL can take advantage of this?

Well, it does take the maximum texture size in account...


> For example,
> if I create a background surface on a 640x480 screen, this exceeds
> the 256x256 limit of the voodoo card, resulting in nothing being
> blitted.

...but two-way tiling is not yet implemented, so if a surface is 
taller *and* wider than then max, it can't be tiled at all, and 
conversion will fail.


> I figure glSDL should provide a function to return the maximum
> texture size so I can divide up my surfaces accordingly, or glSDL
> could do the splitting transparently.

It's definitely the job of glSDL, and it already handles textures that 
are wider *or* taller than the max texture size.


> I realise that the former would break compatibility with generic
> SDL, but might this case warrant an exception?

No, glSDL should be fixed. I just never got around to implement that 
last tiling case, as I've never had any complaints about it missing. 
Apparently, most people (at least glSDL users) are using cards that 
aren't limited to 256x256 textures.

Another reason why I haven't messed with it is that this code should 
be redesigned, using a texture space allocator (a 2D memory manager, 
basically; able to use a single texture for lots of surfaces and 
stuff like that), but that's still a TODO for the backend version.

I'll have a look at it right away and see if I can fill in the missing 
case. (I have a new glSDL/wrapper version ready for release anyway, 
with some glSDL/backend collission warnings avoided and stuff.) Then 
we'll at least have it working in both glSDL versions until someone 
gets around to do it properly.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---





More information about the SDL mailing list