[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [linuxgames] Poll: Video Access



Francesco Orsenigo wrote:

Ok, i can call glTexImage2D() with a lot of parameters.
But i always assumed that the gfx card would translate it to his internal format, wich size i don't know.
That's true - technically, you don't know.  But you also don't know how
much RAM is on the card in the first place - or whether the card even
has on-board texture memory (some Intel graphics cards don't).

OpenGL virtualizes the memory - so you have no idea how much is available,
how much is used or how much any given texture will consume.

Having said all of that, you really *do* know.  Modern graphics hardware
stores things as either two or four bytes per pixel.  Whatever format you
ask for will be 'promoted' to the next higher level.

You can be pretty sure that if you ask for 16 bits per pixel, you'll get it
on any graphics card on the planet.

If you ask for 24 or 32, you'll get 32 unless this is a really old card
(like a Voodoo-1 or -2) that can't do 32 bit textures - in which case it'll
be automatically cut down to 16 bits.

However, if you are sizing your artwork to fit on a Voodoo-1, you can be
100% certain it'll fit on any other graphics card without any problems
whatsoever!

----
Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: sjbaker@link.com           http://www.link.com
Home: sjbaker1@airmail.net       http://www.sjbaker.org