Re: [Plib-users] Texture scaling
Brought to you by:
sjbaker
From: <le...@ci...> - 2003-03-14 17:02:21
|
Quoting Erik Unemyr <un...@et...>: > Hello, > > I would like to change the scaling of a texture on an object. > What would be the easiest way to do that? Official SSG approach: put your object under (kid of) a ssgTextureTransform node, where you can issue the transformation you need to apply to the texture. My preferred: set an object's pre-draw callback which apply the texture matrix: glmatrixmode GL_TEXTURE; glloadmatrix <your matrix> or glscale ...; return 1; and a post-draw callback to reset the texture matrix: glmatrixmode GL_TEXTURE; glloadidentitymatrix; return 1; I like the latter since you don't need to rearrange your scene graph, just need object's node pointer. So I use it for leaf objects (meshes). Sorry for the pseudoGLcode, I can never remember exactly the call syntax when I'm far from my sources. > Best regards, > > Erik Greetings - Paolo ------------------------------------------- Paolo Leoncini E-mail: p.l...@ci... ------------------------------------------- > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |