Re: [Plib-devel] SSG: Using the bitmap loaders for own texture classes?
Brought to you by:
sjbaker
From: <p.l...@ci...> - 2005-08-12 15:06:46
|
You could approach by overriding the default createTexture() method in the ssgLoaderOptions class, which is then used by almost all 3D loaders. To do that: class LoaderOpts_CustomCreateTextures : public ssgLoaderOptions { public: virtual void createTexture( char* tfname, int wrapu, int wrapv, int mipmap ) { // fill it with your code // refer to the default ssgLoaderOptions::createTexture in ssgLoad.cxx } } LoaderOpts_CustomCreateTextures loader_opts; ssgSetCurrentOptions( &loader_opts ); // all further calls to ssgLoad() will call LoaderOpts_CustomCreateTextures:createTexture() Greetings - Paolo Scrive Jan Reucker <slo...@gm...>: > Hello, > > I'm planning to create my own ssgTexture classes, because I need > some special handling not covered by the standard ssgTextures: > > - subdivision of large bitmaps (1536x1536 or 2048x2048) into > small textures suitable for the given OpenGL implementation > - no mipmapping > - GL_CLAMP_TO_EDGE, if supported by the implementation, > GL_CLAMP otherwise > > Creating the texture class wouldn't be a problem, but I'd > like to use SSG's bitmap loaders to get access to all > supported file types at once. The only problem is that the > loader routines automatically call ssgMakeMipmaps() to create > the textures which is, in my situation, not applicable. > > Wouldn't it be a useful extension to SSG if the loaders could > be accessed separately if someone only needs the raw pixels? > What do you think? > > Kind regards, > Jan R. > > -- > Jan Reucker > email: jan dot reucker at web dot de > web: http://www.reucker-online.de > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > plib-devel mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-devel > |