MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoShader/Inventor/nodes/SoMLSamplerCubeMap.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 
00006 
00007 
00008 #ifndef  _SO_ML_SAMPLER_CUBEMAP_
00009 #define  _SO_ML_SAMPLER_CUBEMAP_
00010 
00011 #include "SoShaderSystem.h"
00012 #include "Inventor/nodes/SoMLSampler.h"
00013 #include <Inventor/SbLinear.h>
00014 #ifdef MEVISLAB
00015 #include <mlGLResources.h>
00016 #endif
00017 
00019 class INVENTOR_SHADER_API SoMLSamplerCubeMap : public SoMLSampler
00020 {
00021    typedef SoMLSampler inherited;
00022 
00023    SO_NODE_HEADER(SoMLSamplerCubeMap);
00024 
00025    public:
00026 
00028       SoSFEnum     wrapT;
00029       
00031       SoSFUInt32   startZ;
00032 
00034       SoSFEnum     texGenMode;
00035       
00037       SoMLSamplerCubeMap();
00038 
00039 
00040    SoINTERNAL public:
00041 
00043       static void    initClass();
00044 
00045      
00046    protected:
00047 
00049       virtual ~SoMLSamplerCubeMap();
00050 
00052       virtual void clearTexturData();
00053 
00055       virtual void updateTextureData(bool force);
00056 
00058       virtual void uploadTextureData();
00059 
00061       virtual void setGlTexImage(GLenum target, XVImageSize textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid* textureData);
00062   
00064       virtual void getTextureDataFromImage(XVImageSize size, XVImageSize pos);
00065 
00067       virtual void getSubimageProperties(XVImageSize inputSize, XVImageSize &subimageSize, XVImageSize &subimagePosition);
00068 
00069    private:
00070 
00071       MLuint8       *_textureDataCube[6];
00072       SoFieldSensor *_startZSensor;
00073 };
00074 
00075 #endif  // _SO_ML_SAMPLER_CUBEMAP_