[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [linuxgames] Poll: Video Access
Jan Ekholm:
> Speaking of which, I have a small image viewer I made in SDL for use on
> our set-top box connected to the TV. It uses raw SDL and SDL_image to load
> and show images and works very well. Would it benefit from loading the
> images into textures and using OpenGL for the display?
It should.
At the time i don't want to stop the developement to rewrite the whole thing,
but when the game will work i'll pass to glut.
(Yes, Steve, i'll use freeglut....)
Moreover, i cannot manage anymore to enable the nvidia-glx drivers.... and
Mesa is not the right thing to gain speed... (time to downgrade everything to
stable...)
> Raw speed would
> probably not be improved at all, but it could facilitate all kinds of nice
> effects when switching between images: fades, rotates, zooms etc, stuff
> that the normal "pixel based" images can't really achieve.
Yes, even if i have a passion for pixel-per-pixel transformations wich OpenGL
are quite memory-consuming.
Adam D. Moss:
> If these are features that you want, go for it. There are some
> issues with turning arbitrary pixel data into textures (standard
> OpenGL textures are limited in maximum size [there are still
> surviving cards with a 256x256 pixel upper limit] and powers-of-two
> dimensions), but this can all be worked around (at worst you have
> to split your image across several textures taking aliasing at the
> seams into account, and stitch them back up when it comes to
> drawing).
How can estimate the texture memory usage?
I've always supposed 4bytes per pixel (RGBA)...
If so memory usage may grow very quickly....
It goes back to the give-player-color-to-unit issue: I must store the sprite
twice: the normal sprite and the areas that must be colored...
Is possible to achieve this just playing with the alpha channel or a similar
hack?
Francesco Orsenigo