[Plib-devel] User defined texture formats
Brought to you by:
sjbaker
From: Trent G. <tm...@cy...> - 2000-05-08 21:42:12
|
I think SSG needs to have some hooks to allow user defined image formats, or support more formats natively. Native support for complex formats like JPEG or PNG can only be done by duplicating a lot of code, since Steve doesn't want any extra library dependencies. Would this be useful to anyone else? Does anyone have any ideas on how we could allow user defined image formats? I'm a C programmer, so the first thing I think of is an array of function pointers and a function to register new formats, something like: int register(char *ext, void (*func)(char *fname, char **data, int *w, int *h, int *z) Then have ssgImageLoader::loadTexture look for a user function if an internal one doesn't exist. But maybe there is a better way in C++? The reason I need this is so I can call functions like ssgLoadAC, where the models have textures in them in formats that aren't supported by SSG. Converting my textures to BMP or SGI is not really an option, because they go from about 5 megs (jpg) to over 60 megs. |