[SDL] creating SDL_PixelFormat
Jacek Popławski
jpopl at interia.pl
Mon Oct 14 15:00:01 PDT 2002
On Mon, Oct 14, 2002 at 05:21:23PM -0400, Max Watson wrote:
> Why not just create a SDL_PixelFormat by hand? For 24bpp RGB (little-endian)
> in C you could go:
Because it's not easy way. When I create surface I don't need to know all that
information. And when I set video mode I don't even need to know Rmask...
I need it for loading textures into memory in OpenGL program. Sometime texture
is 32bit and I need 24bit format, so I must convert it. My current solution is:
create small surface with depth 24 and use its format. But I think it's dirty
hack and wonder if there is already something "better".
--
http://decopter.sf.net - free unrealistic helicopter simulator
More information about the SDL
mailing list