#include <stdlib.h>#include <stdio.h>#include <OSGConfig.h>#include <OSGGL.h>#include <OSGGLU.h>#include "OSGDrawActionBase.h"#include "OSGTextureChunk.h"#include "OSGTexGenChunk.h"#include "OSGCamera.h"#include "OSGViewport.h"Go to the source code of this file.
Namespaces | |
| namespace | osg |
Functions | |
| static void | setGenFunc (GLenum coord, GLenum gen, GLenum func, Vec4f &plane, NodePtr beacon, Matrix &cameraMat) |
| static void | changeGenFunc (GLenum oldfunc, NodePtr oldbeacon, GLenum coord, GLenum gen, GLenum func, Vec4f &plane, NodePtr beacon, Matrix &cameraMat) |
Variables | |
| static Char8 | cvsid_cpp [] = "@(#)$Id: $" |
| static Char8 | cvsid_hpp [] = OSGTEXGENCHUNK_HEADER_CVSID |
| static Char8 | cvsid_inl [] = OSGTEXGENCHUNK_INLINE_CVSID |
| static Char8 | cvsid_fields_hpp [] = OSGTEXGENCHUNKFIELDS_HEADER_CVSID |
|
||||||||||||||||||||||||||||
|
Definition at line 142 of file OSGTexGenChunk.cpp. References osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::TransformationMatrix< ValueTypeT >::multLeft(), and osg::NullFC. Referenced by osg::TexGenChunk::activate(). 00144 { 00145 if(beacon != NullFC) 00146 { 00147 Matrix beaconMat; 00148 beacon->getToWorld(beaconMat); 00149 beaconMat.multLeft(cameraMat); 00150 glPushMatrix(); 00151 glLoadMatrixf(beaconMat.getValues()); 00152 glTexGenfv(coord, GL_EYE_PLANE, (GLfloat*)plane.getValues()); 00153 glTexGeni(coord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); 00154 glPopMatrix(); 00155 glEnable(gen); 00156 } 00157 else if(func == GL_EYE_LINEAR) 00158 { 00159 glPushMatrix(); 00160 glLoadIdentity(); 00161 glTexGenfv(coord, GL_EYE_PLANE, (GLfloat*)plane.getValues()); 00162 glTexGeni(coord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); 00163 glPopMatrix(); 00164 glEnable(gen); 00165 } 00166 else if(func != GL_NONE) 00167 { 00168 glTexGeni(coord, GL_TEXTURE_GEN_MODE, func); 00169 00170 if(func == GL_OBJECT_LINEAR) 00171 glTexGenfv(coord, GL_OBJECT_PLANE, (GLfloat*)plane.getValues()); 00172 else if(func == GL_EYE_LINEAR) 00173 glTexGenfv(coord, GL_EYE_PLANE, (GLfloat*)plane.getValues()); 00174 00175 glEnable(gen); 00176 } 00177 }
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 234 of file OSGTexGenChunk.cpp. References osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::TransformationMatrix< ValueTypeT >::multLeft(), and osg::NullFC. Referenced by osg::TexGenChunk::changeFrom(). 00237 { 00238 if(beacon != NullFC) 00239 { 00240 Matrix beaconMat; 00241 beacon->getToWorld(beaconMat); 00242 beaconMat.multLeft(cameraMat); 00243 glPushMatrix(); 00244 glLoadMatrixf(beaconMat.getValues()); 00245 glTexGenfv(coord, GL_EYE_PLANE, (GLfloat*)plane.getValues()); 00246 glTexGeni(coord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); 00247 glPopMatrix(); 00248 if(oldfunc == GL_NONE && oldbeacon == NullFC) 00249 glEnable(gen); 00250 } 00251 else if(func != GL_NONE) 00252 { 00253 glTexGeni(coord, GL_TEXTURE_GEN_MODE, func); 00254 00255 if(func == GL_OBJECT_LINEAR) 00256 glTexGenfv(coord, GL_OBJECT_PLANE, (GLfloat*)plane.getValues()); 00257 else if(func == GL_EYE_LINEAR) 00258 glTexGenfv(coord, GL_EYE_PLANE, (GLfloat*)plane.getValues()); 00259 00260 if(oldfunc == GL_NONE && oldbeacon == NullFC) 00261 glEnable(gen); 00262 } 00263 else if(oldfunc != GL_NONE || oldbeacon != NullFC) 00264 glDisable(gen); 00265 }
|
|
|
Definition at line 434 of file OSGTexGenChunk.cpp. |
|
|
Definition at line 435 of file OSGTexGenChunk.cpp. |
|
|
Definition at line 436 of file OSGTexGenChunk.cpp. |
|
|
Definition at line 438 of file OSGTexGenChunk.cpp. |
1.4.3