[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [linuxgames] Poll: Video Access
Adam D. Moss:
> > How can estimate the texture memory usage?
>
> System memory or graphics card memory? It's hard to pin down
> which (and how much of each) will be used, as it's largely
> down to the driver and the capabilities of the card.
I should be able to estimate quite precisely how much system memory i'm i
using.
My problems concern graphics card internal representation.
> It depends. You can ask OpenGL to use a specific internal
> representation (there are many different OpenGL-internal
> representations you can ask it to use, including RGBA packed
> 2/2/2/2 into the bits of one byte -- but you won't always get
> what you ask for) if you know what space/quality tradeoff
> you're aiming for for a particular texture.
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.
(cut)
> I don't remember what answers you got originally. I'm sure that
> someone would have suggested textured palettes (though they're
> somewhat deprecated).
No.
Steve just suggested to split the sprite in 2 images: the one with unchanged
colors, to be drawn first, and a second one with just the areas that must be
colored.
> If you want to get fancy and really want to encode all this
> info in a single texture to work on all OpenGL implementations,
> I think you could use a single alpha channel to encode both the
> outline-mask and the tinting-levels by:
(cut)
Smart.
It seems the key is the glTexEnv*() function, wich i'm going to learn.
I'm trying it.
Thanx,
Francesco Orsenigo