*put brief class description here* More...
#include <OSGDVRSimpleLUTShader.h>
Public Types | |
| enum | { LutModeFieldId = Inherited::NextFieldId, ActiveLutModeFieldId = LutModeFieldId + 1, NextFieldId = ActiveLutModeFieldId + 1 } |
| typedef DVRSimpleLUTShaderPtr | Ptr |
| enum | { NextFieldId = 1 } |
Public Member Functions | |
Sync | |
| virtual void | changed (BitVector whichField, UInt32 from) |
| react to field changes | |
Output | |
| virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
| output the instance for debug purposes | |
FieldContainer Get | |
| virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Binary Access | |
| virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| virtual FieldContainerPtr | shallowCopy (void) const |
Volume Rendering | |
| virtual void | renderSlice (DVRVolume *volume, DrawActionBase *action, Real32 *data, UInt32 vertices, UInt32 values) |
| virtual void | renderSlice (DVRVolume *volume, DrawActionBase *action, DVRRenderSlice *clippedSlice) |
| virtual bool | hasRenderCallback (void) |
| virtual bool | useMTSlabs (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Static Public Member Functions | |
Class Get | |
| static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| static DVRSimpleLUTShaderPtr | create (void) |
| create a new instance of the class | |
| static DVRSimpleLUTShaderPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const osg::BitVector | LutModeFieldMask |
| static const osg::BitVector | ActiveLutModeFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Types | |
| enum | LutMode { LM_AUTO = 0, LM_TABLE_SGI, LM_PALETTE_EXT, LM_DEPENDENT, LM_FRAGPROG, LM_RELOAD, LM_NO } |
Protected Member Functions | |
Constructors | |
| DVRSimpleLUTShader (void) | |
| Constructor. | |
| DVRSimpleLUTShader (const DVRSimpleLUTShader &source) | |
| Copy Constructor. | |
Destructors | |
| virtual | ~DVRSimpleLUTShader (void) |
| Destructor. | |
Field Get | |
| SFInt8 * | editSFLutMode (void) |
| Get the DVRSimpleLUTShader::_sfLutMode field. | |
| const SFInt8 * | getSFLutMode (void) const |
| Get the DVRSimpleLUTShader::_sfLutMode field. | |
| SFInt8 * | getSFLutMode (void) |
| Get the DVRSimpleLUTShader::_sfLutMode field. | |
| SFInt8 * | editSFActiveLutMode (void) |
| Get the DVRSimpleLUTShader::_sfActiveLutMode field. | |
| const SFInt8 * | getSFActiveLutMode (void) const |
| Get the DVRSimpleLUTShader::_sfActiveLutMode field. | |
| SFInt8 * | getSFActiveLutMode (void) |
| Get the DVRSimpleLUTShader::_sfActiveLutMode field. | |
| Int8 & | editLutMode (void) |
| Get the value of the DVRSimpleLUTShader::_sfLutMode field. | |
| const Int8 & | getLutMode (void) const |
| Get the value of the DVRSimpleLUTShader::_sfLutMode field. | |
| Int8 & | getLutMode (void) |
| Get the value of the DVRSimpleLUTShader::_sfLutMode field. | |
| Int8 & | editActiveLutMode (void) |
| Get the value of the DVRSimpleLUTShader::_sfActiveLutMode field. | |
| const Int8 & | getActiveLutMode (void) const |
| Get the value of the DVRSimpleLUTShader::_sfActiveLutMode field. | |
| Int8 & | getActiveLutMode (void) |
| Get the value of the DVRSimpleLUTShader::_sfActiveLutMode field. | |
Field Set | |
| void | setLutMode (const Int8 &value) |
| Set the value of the DVRSimpleLUTShader::_sfLutMode field. | |
| void | setActiveLutMode (const Int8 &value) |
| Set the value of the DVRSimpleLUTShader::_sfActiveLutMode field. | |
Sync | |
| void | executeSyncImpl (DVRSimpleLUTShaderBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField)=0 |
MT Edit | |
| template<class FieldTypeT > | |
| void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT > | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| virtual void | onDestroy (void) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT > | |
| static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT > | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
| UInt8 | m_nTexturePaletteMode |
| Int8 | m_nTextureMode |
| FragmentProgramChunkPtr | m_pFragProg |
| TextureChunkPtr | m_pDepTexture |
| Int32 | m_nTextureId |
Fields | |
| SFInt8 | _sfLutMode |
| SFInt8 | _sfActiveLutMode |
Member | |
| UInt32 | _shares |
Private Types | |
| typedef DVRSimpleLUTShaderBase | Inherited |
Private Member Functions | |
| void | operator= (const DVRSimpleLUTShader &source) |
| prohibit default functions (move to 'public' if needed) | |
Static Private Member Functions | |
| static void | initMethod (void) |
| initialize the static features of the class, e.g. action callbacks | |
Static Private Attributes | |
| static char | _fragProg2D [] |
| static char | _fragProg3D [] |
| static char | _fragProg2DMulti [] |
| static UInt32 | _sgiTexColorTable |
| static UInt32 | _extPalettedTexture |
| static UInt32 | _extSharedPalettedTexture |
| static UInt32 | _arbMultitexture |
| static UInt32 | _nvTextureShader2 |
| static UInt32 | _arbFragmentProgram |
| static UInt32 | _nvRegisterCombiners |
| static UInt32 | _funcColorTableSGI |
| static UInt32 | _funcColorTableEXT |
| static UInt32 | _funcActiveTextureARB |
| static UInt32 | _funcFinalCombinerInputNV |
| static UInt32 | _funcCombinerInputNV |
| static UInt32 | _funcCombinerOutputNV |
Friends | |
| class | FieldContainer |
| class | DVRSimpleLUTShaderBase |
Volume Rendering | |
|
| |
| virtual bool | initialize (DVRVolume *volume, DrawActionBase *action) |
| Callback to set up shader - register textures here. | |
| virtual void | activate (DVRVolume *volume, DrawActionBase *action) |
| Callback before any slice is rendered - setup per volume. | |
| virtual void | brickActivate (DVRVolume *volume, DrawActionBase *action, Brick *brick) |
| Callback before any brick - state setup per brick. | |
| virtual void | deactivate (DVRVolume *volume, DrawActionBase *action) |
| Callback after all rendering of the volume is done. | |
| virtual void | cleanup (DVRVolume *volume, DrawActionBase *action) |
| Callback to clean up shader resources. | |
| void | getPaletteFormat (DrawActionBase *action, UInt8 lutMode, GLenum &internalFormat, GLenum &externalFormat) |
| returns texture formate for selected lookup table mode | |
| bool | isModeSupported (DrawActionBase *action, UInt8 mode, Int8 textureMode) |
| Checks whether the selected mode is supported. | |
| UInt8 | selectMode (DrawActionBase *action, Int8 textureMode) |
| Automatically select a lookup table mode. | |
| void | enablePalette (void) |
| enables lut | |
| void | disablePalette (void) |
| diasables lut | |
| void | initDependentTexture (Int32 size) |
| create dependent texture | |
| void | updateDependentTexture (Int32 size, const UInt8 *data) |
| update dependent texture | |
| void | destroyDependentTexture (void) |
| destroy dependent texture | |
| void | setupAlphaCorrectionRegisterCombiners (DrawActionBase *action) |
Shader for color volume rendering with transfer functions. Is intended to be stateless - NO FIELDS!!
Definition at line 57 of file OSGDVRSimpleLUTShader.h.
typedef DVRSimpleLUTShaderBase osg::DVRSimpleLUTShader::Inherited [private] |
Reimplemented from osg::DVRSimpleLUTShaderBase.
Reimplemented in osg::DVRMtexLUTShader, and osg::DVRMtexLUTShaderBase.
Definition at line 62 of file OSGDVRSimpleLUTShader.h.
typedef DVRSimpleLUTShaderPtr osg::DVRSimpleLUTShaderBase::Ptr [inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 91 of file OSGDVRSimpleLUTShaderBase.h.
enum osg::DVRSimpleLUTShader::LutMode [protected] |
Definition at line 120 of file OSGDVRSimpleLUTShader.h.
00121 { 00122 LM_AUTO = 0, 00123 LM_TABLE_SGI, 00124 LM_PALETTE_EXT, 00125 LM_DEPENDENT, 00126 LM_FRAGPROG, 00127 LM_RELOAD, 00128 LM_NO 00129 };
anonymous enum [inherited] |
Definition at line 93 of file OSGDVRSimpleLUTShaderBase.h.
00094 { 00095 LutModeFieldId = Inherited::NextFieldId, 00096 ActiveLutModeFieldId = LutModeFieldId + 1, 00097 NextFieldId = ActiveLutModeFieldId + 1 00098 };
anonymous enum [inherited] |
Definition at line 73 of file OSGFieldContainerImpl.h.
00073 { NextFieldId = 1 };
| DVRSimpleLUTShader::DVRSimpleLUTShader | ( | void | ) | [protected] |
Definition at line 113 of file OSGDVRSimpleLUTShader.cpp.
References _arbFragmentProgram, _arbMultitexture, _extPalettedTexture, _extSharedPalettedTexture, _funcActiveTextureARB, _funcColorTableEXT, _funcColorTableSGI, _funcCombinerInputNV, _funcCombinerOutputNV, _funcFinalCombinerInputNV, _nvRegisterCombiners, _nvTextureShader2, _sgiTexColorTable, OSG_DLSYM_UNDERSCORE, osg::Window::registerExtension(), and osg::Window::registerFunction().
00113 : 00114 Inherited ( ), 00115 m_nTexturePaletteMode( LM_NO), 00116 m_nTextureMode ( -1), 00117 m_pFragProg (NullFC), 00118 m_pDepTexture (NullFC) 00119 { 00120 _sgiTexColorTable = 00121 Window::registerExtension("GL_SGI_texture_color_table" ); 00122 00123 _extPalettedTexture = 00124 Window::registerExtension("GL_EXT_paletted_texture" ); 00125 00126 _extSharedPalettedTexture = 00127 Window::registerExtension("GL_EXT_shared_texture_palette" ); 00128 00129 _arbMultitexture = 00130 Window::registerExtension("GL_ARB_multitexture" ); 00131 00132 _nvTextureShader2 = 00133 Window::registerExtension("GL_NV_texture_shader2" ); 00134 00135 _arbFragmentProgram = 00136 Window::registerExtension("GL_ARB_fragment_program" ); 00137 00138 _nvRegisterCombiners = 00139 Window::registerExtension("GL_NV_register_combiners" ); 00140 00141 _funcColorTableSGI = 00142 Window::registerFunction (OSG_DLSYM_UNDERSCORE"glColorTableSGI", 00143 _sgiTexColorTable); 00144 00145 _funcColorTableEXT = 00146 Window::registerFunction (OSG_DLSYM_UNDERSCORE"glColorTableEXT", 00147 _extPalettedTexture); 00148 00149 _funcActiveTextureARB = 00150 Window::registerFunction(OSG_DLSYM_UNDERSCORE"glActiveTextureARB", 00151 _arbMultitexture ); 00152 00153 _funcFinalCombinerInputNV = 00154 Window::registerFunction(OSG_DLSYM_UNDERSCORE"glFinalCombinerInputNV", 00155 _nvRegisterCombiners); 00156 00157 _funcCombinerInputNV = 00158 Window::registerFunction(OSG_DLSYM_UNDERSCORE"glCombinerInputNV", 00159 _nvRegisterCombiners); 00160 00161 _funcCombinerOutputNV = 00162 Window::registerFunction(OSG_DLSYM_UNDERSCORE"glCombinerOutputNV", 00163 _nvRegisterCombiners); 00164 }
| DVRSimpleLUTShader::DVRSimpleLUTShader | ( | const DVRSimpleLUTShader & | source | ) | [protected] |
Definition at line 168 of file OSGDVRSimpleLUTShader.cpp.
00168 : 00169 Inherited (source), 00170 m_nTexturePaletteMode( LM_NO), 00171 m_nTextureMode ( -1), 00172 m_pFragProg (NullFC), 00173 m_pDepTexture (NullFC) 00174 { 00175 }
| DVRSimpleLUTShader::~DVRSimpleLUTShader | ( | void | ) | [protected, virtual] |
Definition at line 179 of file OSGDVRSimpleLUTShader.cpp.
References destroyDependentTexture(), m_pFragProg, osg::NullFC, and osg::subRefCP().
00180 { 00181 if(m_pFragProg != NullFC) 00182 { 00183 subRefCP(m_pFragProg); 00184 00185 m_pFragProg = NullFC; 00186 } 00187 00188 destroyDependentTexture(); 00189 }
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 596 of file OSGDVRSimpleLUTShader.cpp.
References osg::DVRSimpleShader::changed(), FDEBUG, FWARNING, LM_AUTO, osg::DVRSimpleLUTShaderBase::LutModeFieldMask, and osg::DVRSimpleLUTShaderBase::setActiveLutMode().
Referenced by osg::DVRMtexLUTShader::changed().
00597 { 00598 FDEBUG(("DVRSimpleLUTShader::changed\n")); 00599 FWARNING(("DVRSimpleLUTShader::changed\n")); 00600 00601 // trigger re-initialization 00602 if(whichField & LutModeFieldMask) 00603 { 00604 setActiveLutMode(LM_AUTO); 00605 } 00606 00607 Inherited::changed(whichField, origin); 00608 }
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 611 of file OSGDVRSimpleLUTShader.cpp.
References SLOG.
00613 { 00614 SLOG << "Dump DVRSimpleLUTShader NI" << std::endl; 00615 }
| bool DVRSimpleLUTShader::initialize | ( | DVRVolume * | volume, | |
| DrawActionBase * | action | |||
| ) | [virtual] |
! Should fix uninizialized textures
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 619 of file OSGDVRSimpleLUTShader.cpp.
References osg::beginEditCP(), DVRVOLUME_PARAMETER, osg::endEditCP(), FWARNING, osg::DVRSimpleLUTShaderBase::getLutMode(), getPaletteFormat(), osg::DVRVolume::getTextureManager(), osg::DVRVolume::getTextureMode(), osg::DrawActionBase::getWindow(), isModeSupported(), LM_AUTO, LM_NO, osg::DVRSimpleShader::m_nTextureId, m_nTexturePaletteMode, osg::NullFC, osg::TextureManager::registerTexture(), osg::TextureManager::reloadTexture(), selectMode(), osg::DVRSimpleLUTShaderBase::setActiveLutMode(), SWARNING, and osg::DVRLookupTableBase::TouchedFieldMask.
Referenced by activate().
00620 { 00621 FWARNING(("DVRSimpleLUTShader::initialize\n")); 00622 00623 GLenum nInternalFormat = GL_INTENSITY; 00624 GLenum nExternalFormat = GL_LUMINANCE; 00625 00626 m_nTexturePaletteMode = LM_NO; 00627 m_nTextureId = -1; 00628 00629 Window *win = action->getWindow(); 00630 00631 // Determine lookup table mechanism 00632 if(getLutMode() != LM_AUTO) 00633 { 00634 // A certain mode has been selected 00635 if(isModeSupported(action, getLutMode(), volume->getTextureMode(win))) 00636 { 00637 SWARNING << "DVRSimpleLUTShader - User specified lookup table " 00638 << "mode " 00639 << int(getLutMode()) << std::endl; 00640 00641 m_nTexturePaletteMode = getLutMode(); 00642 } 00643 else 00644 { 00645 SWARNING << "DVRSimpleLUTShader - Unsupported lookup table mode " 00646 << int(getLutMode()) << " disabling LUT" << std::endl; 00647 00648 m_nTexturePaletteMode = LM_NO; 00649 } 00650 } 00651 else 00652 { 00653 // Use automatic mode selection 00654 m_nTexturePaletteMode = selectMode(action, 00655 volume->getTextureMode(win)); 00656 } 00657 00658 setActiveLutMode(m_nTexturePaletteMode); 00659 00660 getPaletteFormat(action, 00661 m_nTexturePaletteMode, 00662 nInternalFormat, 00663 nExternalFormat ); 00664 00665 DVRLookupTablePtr lut = DVRVOLUME_PARAMETER(volume, DVRLookupTable ); 00666 DVRVolumeTexturePtr vol = DVRVOLUME_PARAMETER(volume, DVRVolumeTexture); 00667 00668 if((volume == NULL) || (vol == NullFC)) 00669 { 00670 SWARNING << "NO Volume..." << std::endl; 00671 00672 return false; 00673 } 00674 00675 m_nTextureId = volume->getTextureManager().registerTexture( 00676 vol->getImage(), // image 00677 nInternalFormat, // internalFormat 00678 nExternalFormat, // externalFormat 00679 1, // doBricking 00680 0, // textureStage0 00681 -1); // textureStage1 00682 00683 if(m_nTextureId == -1) 00684 { 00685 SWARNING << "Error registering textures ..." << std::endl; 00686 00687 return false; 00688 } 00689 else 00690 { 00691 SWARNING << "New texture Id: " << m_nTextureId << std::endl; 00692 00694 volume->getTextureManager().reloadTexture(m_nTextureId, action); 00695 } 00696 00697 if(lut != NullFC) 00698 { 00699 beginEditCP(lut, DVRLookupTable::TouchedFieldMask); 00700 { 00701 lut->setTouched(true); // force initialization in first render 00702 // pass 00703 } 00704 endEditCP (lut, DVRLookupTable::TouchedFieldMask); 00705 } 00706 00707 return true; 00708 }
| typedef const GLvoid *typedef const GLvoid *void DVRSimpleLUTShader::activate(DVRVolume *volume, DrawActionBase *action) | ( | DVRVolume * | volume, | |
| DrawActionBase * | action | |||
| ) | [virtual] |
! Texture Stage 1 - dependent lookup
! Texture Stage 0 - ordinary lookup
! Register combiners to account for alpha value correction
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 742 of file OSGDVRSimpleLUTShader.cpp.
References _extSharedPalettedTexture, _fragProg2D, _fragProg2DMulti, _fragProg3D, _funcActiveTextureARB, _funcColorTableEXT, _funcColorTableSGI, _sgiTexColorTable, osg::addRefCP(), osg::beginEditCP(), cleanup(), osg::DVRSimpleLUTShaderBase::create(), DVRVOLUME_PARAMETER, osg::endEditCP(), FDEBUG, FFATAL, osg::DVRSimpleLUTShaderBase::getActiveLutMode(), osg::Window::getFunction(), osg::DVRVolume::getTextureManager(), osg::DVRVolume::getTextureMode(), osg::DrawActionBase::getWindow(), GL_DEPENDENT_AR_TEXTURE_2D_NV, GL_REGISTER_COMBINERS_NV, GL_SHADER_OPERATION_NV, GL_SHARED_TEXTURE_PALETTE_EXT, GL_TEXTURE0_ARB, GL_TEXTURE1_ARB, GL_TEXTURE_3D, GL_TEXTURE_SHADER_NV, osg::Window::hasExtension(), initDependentTexture(), initialize(), LM_AUTO, LM_DEPENDENT, LM_FRAGPROG, LM_NO, LM_PALETTE_EXT, LM_RELOAD, LM_TABLE_SGI, osg::DVRSimpleShader::m_nTextureId, m_nTextureMode, m_nTexturePaletteMode, m_pDepTexture, m_pFragProg, osg::NullFC, osg::TextureManager::reloadTexture(), osg::DVRVolumeBase::ShaderFieldMask, SLOG, SNOTICE, SWARNING, osg::TextureManager::TM_2D, osg::TextureManager::TM_2D_Multi, osg::TextureManager::TM_3D, and updateDependentTexture().
00743 { 00744 // FDEBUG(("DVRSimpleLUTShader::activate - v1.2 (%d)\n", (int) this)); 00745 00746 Window *win = action->getWindow(); 00747 00748 // remove compiler warnings for unused variable 00749 #if defined GL_NV_texture_shader2 00750 ActiveTextureARBFunc ActiveTextureARB = 00751 reinterpret_cast<ActiveTextureARBFunc>( 00752 win->getFunction(_funcActiveTextureARB)); 00753 #endif 00754 00755 ColorTableSGIFunc ColorTableSGI = NULL; 00756 00757 if(win->hasExtension(_sgiTexColorTable)) 00758 { 00759 ColorTableSGI = 00760 reinterpret_cast<ColorTableSGIFunc>( 00761 win->getFunction(_funcColorTableSGI)); 00762 } 00763 00764 ColorTableEXTFunc ColorTableEXT = NULL; 00765 00766 if(win->hasExtension(_extSharedPalettedTexture)) 00767 { 00768 ColorTableEXT = 00769 reinterpret_cast<ColorTableEXTFunc>( 00770 win->getFunction(_funcColorTableEXT)); 00771 } 00772 00773 DVRSimpleShader::activate(volume, action); 00774 00775 DVRLookupTablePtr lut = DVRVOLUME_PARAMETER(volume, DVRLookupTable); 00776 DVRVolumeTexturePtr vol = DVRVOLUME_PARAMETER(volume, DVRVolumeTexture); 00777 00778 if((volume == NULL) || (vol == NullFC)) 00779 { 00780 SWARNING << "NO Volume ..." << std::endl; 00781 00782 return; 00783 } 00784 00785 00786 // reinitialize if hardware mode has not yet been chosen or mode has 00787 // changed 00788 00789 if(getActiveLutMode() == LM_AUTO) 00790 { 00791 SNOTICE << "Reinitializing DVRSimpleLUTShader" << std::endl; 00792 00793 cleanup (volume, action); 00794 initialize(volume, action); 00795 00796 // notify volume about shader changed 00797 beginEditCP(DVRVolumePtr(volume), DVRVolume::ShaderFieldMask); 00798 endEditCP (DVRVolumePtr(volume), DVRVolume::ShaderFieldMask); 00799 } 00800 00801 00802 // reload lookup table if neccessary 00803 if((lut != NullFC) && (lut->getTouched())) 00804 { 00805 Int32 colorTableSize = lut->getSize(0); 00806 const UInt8 *data = &(lut->getData(0)); 00807 00808 lut->setTouched(false); 00809 00810 switch(m_nTexturePaletteMode) 00811 { 00812 case LM_TABLE_SGI: 00813 00814 FDEBUG(("Using SGI postshading palette....\n")); 00815 00816 #if defined GL_SGI_texture_color_table 00817 glEnable(GL_TEXTURE_COLOR_TABLE_SGI); 00818 00819 ColorTableSGI( 00820 GL_TEXTURE_COLOR_TABLE_SGI, // GLenum target, 00821 GL_RGBA, // GLenum internalformat, 00822 colorTableSize, // GLsizei width, 00823 GL_RGBA, // GLenum format, 00824 GL_UNSIGNED_BYTE, // GLenum type, 00825 data); // const GLvoid *table 00826 #endif // GL_SGI_texture_color_table 00827 00828 break; 00829 00830 case LM_PALETTE_EXT: 00831 00832 FDEBUG(("Using preshading palette....\n")); 00833 00834 #if defined GL_EXT_paletted_texture && defined GL_EXT_shared_texture_palette 00835 00836 glEnable(GL_SHARED_TEXTURE_PALETTE_EXT); 00837 00838 ColorTableEXT( 00839 GL_SHARED_TEXTURE_PALETTE_EXT, // GLenum target, 00840 GL_RGBA, // GLenum internalformat, 00841 colorTableSize, // GLsizei width, 00842 GL_RGBA, // GLenum format, 00843 GL_UNSIGNED_BYTE, // GLenum type, 00844 data); // const GLvoid *table 00845 #endif 00846 00847 break; 00848 00849 case LM_RELOAD: 00850 { 00851 FDEBUG(("Using palette reload ....\n")); 00852 FFATAL(("Using palette reload ....\n")); 00853 00854 glPixelTransferi(GL_MAP_COLOR, GL_TRUE); 00855 00856 glPixelMapfv(GL_PIXEL_MAP_I_TO_R, 00857 colorTableSize, 00858 &(lut->getDataR(0))); 00859 00860 glPixelMapfv(GL_PIXEL_MAP_I_TO_G, 00861 colorTableSize, 00862 &(lut->getDataG(0))); 00863 00864 glPixelMapfv(GL_PIXEL_MAP_I_TO_B, 00865 colorTableSize, 00866 &(lut->getDataB(0))); 00867 00868 glPixelMapfv(GL_PIXEL_MAP_I_TO_A, 00869 colorTableSize, 00870 &(lut->getDataA(0))); 00871 00872 volume->getTextureManager().reloadTexture(m_nTextureId, 00873 action); 00874 00875 glPixelTransferi(GL_MAP_COLOR, GL_FALSE); 00876 break; 00877 } 00878 00879 case LM_DEPENDENT: 00880 { 00881 // Initialize dependent texture 00882 if(m_pDepTexture == NullFC) 00883 initDependentTexture(lut->getSize(0)); 00884 00885 // Setup the correct texture shader mode 00886 if(volume->getTextureMode(win) != m_nTextureMode) 00887 { 00888 switch (volume->getTextureMode(win)) 00889 { 00890 case TextureManager::TM_3D: 00891 SLOG << "Setup texture shader for 3D" << std::endl; 00892 break; 00893 00894 case TextureManager::TM_2D: 00895 SLOG << "Setup texture shader for 2D" << std::endl; 00896 break; 00897 00898 default: 00899 FFATAL( 00900 ( "Texture mode for dependent textures" 00901 " not supported by DVRSimpleLUTShader\n")); 00902 return; 00903 } 00904 00905 m_nTextureMode = volume->getTextureMode(win); 00906 } 00907 00908 // Update dependent texture if neccessary 00909 updateDependentTexture(lut->getSize(0), &(lut->getData(0))); 00910 break; 00911 } 00912 00913 case LM_FRAGPROG: 00914 { 00915 // Initialize dependent texture 00916 if(m_pDepTexture == NullFC) 00917 initDependentTexture(lut->getSize(0)); 00918 00919 // Initialize fragment program 00920 if(m_pFragProg == NullFC) 00921 { 00922 FDEBUG(("Initializing fragment program ")); 00923 00924 m_pFragProg = FragmentProgramChunk::create(); 00925 00926 addRefCP( m_pFragProg ); 00927 00928 FDEBUG((" - DONE\n")); 00929 } 00930 00931 // Load the appropriate program 00932 if(volume->getTextureMode(win) != m_nTextureMode) 00933 { 00934 switch(volume->getTextureMode(win)) 00935 { 00936 case TextureManager::TM_3D: 00937 //SLOG << "Loading ... lutFragProg3D.asm" 00938 // << std::endl; 00939 00940 beginEditCP(m_pFragProg); 00941 { 00942 m_pFragProg->setProgram(_fragProg3D); 00943 // m_pFragProg->read("lutFragProg3D.asm"); 00944 } 00945 endEditCP (m_pFragProg); 00946 break; 00947 00948 case TextureManager::TM_2D: 00949 //SLOG << "Loading ... lutFragProg2D.asm" 00950 // << std::endl; 00951 00952 beginEditCP(m_pFragProg); 00953 { 00954 m_pFragProg->setProgram(_fragProg2D); 00955 // m_pFragProg->read("lutFragProg2D.asm"); 00956 } 00957 endEditCP (m_pFragProg); 00958 break; 00959 00960 case TextureManager::TM_2D_Multi: 00961 //SLOG << "Loading ... lutFragProg2DMulti.asm" 00962 // << std::endl; 00963 00964 beginEditCP(m_pFragProg); 00965 { 00966 m_pFragProg->setProgram(_fragProg2DMulti); 00967 //m_pFragProg->read("lutFragProg2DMulti.asm"); 00968 } 00969 endEditCP (m_pFragProg); 00970 break; 00971 00972 default: 00973 FFATAL(( "Texture mode for fragment programs" 00974 " not supported by DVRSimpleLUTShader" )); 00975 return; 00976 } 00977 00978 m_nTextureMode = volume->getTextureMode(win); 00979 } 00980 00981 // Update dependent texture if neccessary 00982 updateDependentTexture(lut->getSize(0), &(lut->getData(0))); 00983 break; 00984 } 00985 00986 case LM_NO: 00987 FDEBUG(("Using NO palette reload ....\n")); 00988 break; 00989 } 00990 } 00991 00992 00993 // enable lookup table 00994 if(lut != NullFC) 00995 { 00996 switch(m_nTexturePaletteMode) 00997 { 00998 case LM_TABLE_SGI: 00999 01000 #if defined GL_SGI_texture_color_table 01001 glEnable(GL_TEXTURE_COLOR_TABLE_SGI); 01002 #endif 01003 01004 break; 01005 01006 case LM_PALETTE_EXT: 01007 01008 #if defined GL_EXT_paletted_texture && defined GL_EXT_shared_texture_palette 01009 glEnable(GL_SHARED_TEXTURE_PALETTE_EXT); 01010 #endif 01011 break; 01012 01013 case LM_DEPENDENT: 01014 01015 #if defined GL_NV_texture_shader2 01016 if(m_pDepTexture == NullFC) 01017 { 01018 SWARNING << "LM_DEPENDENT - no dependent texture" 01019 << std::endl; 01020 } 01021 01022 //beginEditCP(m_pDepTexture, 01023 // TextureChunk::EnvModeFieldMask | 01024 // TextureChunk::ShaderOperationFieldMask); 01025 //{ 01026 // m_pDepTexture->setEnvMode (GL_REPLACE); 01027 // m_pDepTexture->setShaderOperation( 01028 // GL_DEPENDENT_AR_TEXTURE_2D_NV); 01029 //} 01030 //endEditCP (m_pDepTexture, 01031 // TextureChunk::EnvModeFieldMask | 01032 // TextureChunk::ShaderOperationFieldMask); 01033 01034 m_pDepTexture->activate(action, 1); 01035 01037 glEnable(GL_TEXTURE_SHADER_NV); 01038 01039 ActiveTextureARB(GL_TEXTURE1_ARB); 01040 01041 glTexEnvf(GL_TEXTURE_ENV, 01042 GL_TEXTURE_ENV_MODE, 01043 GL_REPLACE); 01044 01045 glTexEnvi(GL_TEXTURE_SHADER_NV, 01046 GL_SHADER_OPERATION_NV, 01047 GL_DEPENDENT_AR_TEXTURE_2D_NV); 01048 01050 01051 ActiveTextureARB(GL_TEXTURE0_ARB); 01052 01053 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 01054 01055 switch(volume->getTextureMode(win)) 01056 { 01057 case TextureManager::TM_3D: 01058 01059 glTexEnvi(GL_TEXTURE_SHADER_NV, 01060 GL_SHADER_OPERATION_NV, 01061 GL_TEXTURE_3D); 01062 break; 01063 01064 case TextureManager::TM_2D: 01065 01066 glTexEnvi(GL_TEXTURE_SHADER_NV, 01067 GL_SHADER_OPERATION_NV, GL_TEXTURE_2D); 01068 break; 01069 01070 default: 01071 01072 //FFATAL(("Texture mode for dependent texture not " 01073 // "supported by DVRSimpleLUTShader")); 01074 break; 01075 } 01076 #endif 01077 01078 #if defined GL_NV_register_combiners 01080 setupAlphaCorrectionRegisterCombiners(action); 01081 glEnable(GL_REGISTER_COMBINERS_NV); 01082 break; 01083 #endif 01084 01085 case LM_FRAGPROG: 01086 01087 // activate fragment program chunk 01088 m_pDepTexture->activate(action, 2); 01089 m_pFragProg ->activate(action ); 01090 01091 break; 01092 01093 default: 01094 break; 01095 } 01096 } 01097 01098 }
| void DVRSimpleLUTShader::brickActivate | ( | DVRVolume * | volume, | |
| DrawActionBase * | action, | |||
| Brick * | brick | |||
| ) | [virtual] |
! FIXME: This is a workaround for the current snapshot since ! it overwrites the texture shader settings on texture activation
Reimplemented from osg::DVRSimpleShader.
Definition at line 1101 of file OSGDVRSimpleLUTShader.cpp.
References osg::DVRVolume::getTextureMode(), osg::DrawActionBase::getWindow(), GL_SHADER_OPERATION_NV, GL_TEXTURE_3D, GL_TEXTURE_SHADER_NV, LM_DEPENDENT, m_nTexturePaletteMode, osg::TextureManager::TM_2D, and osg::TextureManager::TM_3D.
01104 { 01105 //FDEBUG(("DVRSimpleLUTShader::brickActivate %d\n", (int) this)); 01106 01107 DVRSimpleShader::brickActivate(volume, action, brick); 01108 01111 01112 if(m_nTexturePaletteMode == LM_DEPENDENT) 01113 { 01114 switch(volume->getTextureMode(action->getWindow())) 01115 { 01116 case TextureManager::TM_3D: 01117 glTexEnvi(GL_TEXTURE_SHADER_NV, 01118 GL_SHADER_OPERATION_NV, 01119 GL_TEXTURE_3D); 01120 break; 01121 01122 case TextureManager::TM_2D: 01123 glTexEnvi(GL_TEXTURE_SHADER_NV, 01124 GL_SHADER_OPERATION_NV, 01125 GL_TEXTURE_2D); 01126 break; 01127 01128 default: 01129 // FFATAL(("Texture mode for dependent texture not " 01130 // "supported by DVRSimpleLUTShader")); 01131 break; 01132 } 01133 } 01134 }
| void DVRSimpleLUTShader::deactivate | ( | DVRVolume * | volume, | |
| DrawActionBase * | action | |||
| ) | [virtual] |
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 1137 of file OSGDVRSimpleLUTShader.cpp.
References _funcActiveTextureARB, FDEBUG, osg::Window::getFunction(), osg::DrawActionBase::getWindow(), GL_REGISTER_COMBINERS_NV, GL_SHARED_TEXTURE_PALETTE_EXT, GL_TEXTURE_SHADER_NV, LM_DEPENDENT, LM_FRAGPROG, LM_PALETTE_EXT, LM_RELOAD, LM_TABLE_SGI, m_nTexturePaletteMode, m_pDepTexture, m_pFragProg, and osg::NullFC.
01138 { 01139 FDEBUG(("DVRSimpleLUTShader::deactivate\n")); 01140 01141 // remove compiler warnings for unused variable 01142 #if defined GL_NV_texture_shader2 01143 ActiveTextureARBFunc ActiveTextureARB = 01144 reinterpret_cast<ActiveTextureARBFunc>( 01145 action->getWindow()->getFunction(_funcActiveTextureARB)); 01146 #endif 01147 01148 switch(m_nTexturePaletteMode) 01149 { 01150 case LM_TABLE_SGI: 01151 #if defined GL_SGI_texture_color_table 01152 glDisable(GL_TEXTURE_COLOR_TABLE_SGI); 01153 #endif 01154 break; 01155 01156 case LM_PALETTE_EXT: 01157 #if defined GL_EXT_paletted_texture && defined GL_EXT_shared_texture_palette 01158 glDisable(GL_SHARED_TEXTURE_PALETTE_EXT); 01159 #endif 01160 break; 01161 01162 case LM_DEPENDENT: 01163 #if defined GL_NV_register_combiners 01164 glEnable(GL_REGISTER_COMBINERS_NV); 01165 #endif 01166 #if defined GL_NV_texture_shader2 01167 glDisable(GL_TEXTURE_SHADER_NV); 01168 01169 if(m_pDepTexture != NullFC) 01170 m_pDepTexture->deactivate(action, 1); 01171 break; 01172 #endif 01173 01174 case LM_FRAGPROG: 01175 // de-activate fragment program chunk 01176 if(m_pFragProg != NullFC) 01177 { 01178 m_pFragProg->deactivate(action); 01179 } 01180 if(m_pDepTexture != NullFC) 01181 { 01182 m_pDepTexture->deactivate(action, 2); 01183 } 01184 break; 01185 01186 case LM_RELOAD: 01187 glPixelTransferi(GL_MAP_COLOR, GL_FALSE); 01188 break; 01189 01190 default: 01191 break; 01192 } 01193 01194 DVRSimpleShader::deactivate(volume, action); 01195 }
| void DVRSimpleLUTShader::cleanup | ( | DVRVolume * | volume, | |
| DrawActionBase * | action | |||
| ) | [virtual] |
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 1198 of file OSGDVRSimpleLUTShader.cpp.
References destroyDependentTexture(), osg::DVRVolume::getTextureManager(), osg::DVRSimpleShader::m_nTextureId, and osg::TextureManager::unregisterTexture().
Referenced by activate().
01199 { 01200 if (volume != NULL) 01201 { 01202 if(m_nTextureId != -1) 01203 { 01204 volume->getTextureManager().unregisterTexture(m_nTextureId); 01205 01206 m_nTextureId = -1; 01207 } 01208 } 01209 01210 destroyDependentTexture(); 01211 }
| void DVRSimpleLUTShader::getPaletteFormat | ( | DrawActionBase * | action, | |
| UInt8 | lutMode, | |||
| GLenum & | internalFormat, | |||
| GLenum & | externalFormat | |||
| ) | [protected] |
Definition at line 195 of file OSGDVRSimpleLUTShader.cpp.
References GL_COLOR_INDEX8_EXT, LM_DEPENDENT, LM_FRAGPROG, LM_NO, LM_PALETTE_EXT, LM_RELOAD, and LM_TABLE_SGI.
Referenced by initialize(), and osg::DVRMtexLUTShader::initialize().
00199 { 00200 switch(mode) 00201 { 00202 case LM_TABLE_SGI: 00203 internalFormat = GL_INTENSITY; 00204 externalFormat = GL_LUMINANCE; 00205 break; 00206 00207 #if defined GL_EXT_paletted_texture && defined GL_EXT_shared_texture_palette 00208 case LM_PALETTE_EXT: 00209 internalFormat = GL_COLOR_INDEX8_EXT; 00210 externalFormat = GL_COLOR_INDEX; 00211 break; 00212 #endif 00213 00214 case LM_DEPENDENT: 00215 internalFormat = GL_INTENSITY; 00216 externalFormat = GL_LUMINANCE; 00217 break; 00218 00219 case LM_FRAGPROG: 00220 internalFormat = GL_INTENSITY; 00221 externalFormat = GL_LUMINANCE; 00222 break; 00223 00224 case LM_RELOAD: 00225 internalFormat = GL_RGBA; 00226 externalFormat = GL_COLOR_INDEX; 00227 break; 00228 00229 case LM_NO: 00230 default: 00231 internalFormat = GL_INTENSITY; 00232 externalFormat = GL_LUMINANCE; 00233 } 00234 }
| bool DVRSimpleLUTShader::isModeSupported | ( | DrawActionBase * | action, | |
| UInt8 | mode, | |||
| Int8 | textureMode | |||
| ) | [protected] |
Definition at line 279 of file OSGDVRSimpleLUTShader.cpp.
References _arbFragmentProgram, _arbMultitexture, _extPalettedTexture, _extSharedPalettedTexture, _nvRegisterCombiners, _nvTextureShader2, _sgiTexColorTable, osg::DrawActionBase::getWindow(), osg::Window::hasExtension(), LM_DEPENDENT, LM_FRAGPROG, LM_NO, LM_PALETTE_EXT, LM_RELOAD, LM_TABLE_SGI, and osg::TextureManager::TM_2D_Multi.
Referenced by initialize(), osg::DVRMtexLUTShader::initialize(), and selectMode().
00282 { 00283 bool result = false; 00284 00285 switch(mode) 00286 { 00287 case LM_TABLE_SGI: 00288 result = 00289 (action->getWindow()->hasExtension(_sgiTexColorTable) && 00290 (0 != strncmp("IMPACT", 00291 reinterpret_cast<const char *>( 00292 glGetString(GL_RENDERER)), 00293 6))); 00294 break; 00295 00296 case LM_PALETTE_EXT: 00297 result = 00298 (action->getWindow()->hasExtension(_extPalettedTexture ) && 00299 action->getWindow()->hasExtension(_extSharedPalettedTexture)); 00300 break; 00301 00302 case LM_DEPENDENT: 00303 result = 00304 (action->getWindow()->hasExtension(_arbMultitexture ) && 00305 action->getWindow()->hasExtension(_nvTextureShader2 ) && 00306 action->getWindow()->hasExtension(_nvRegisterCombiners) && 00307 textureMode != TextureManager::TM_2D_Multi ); 00308 break; 00309 00310 case LM_FRAGPROG: 00311 result = (action->getWindow()->hasExtension(_arbMultitexture ) && 00312 action->getWindow()->hasExtension(_arbFragmentProgram) && 00313 textureMode != TextureManager::TM_2D_Multi ); 00314 break; 00315 00316 case LM_RELOAD: 00317 result = true; 00318 break; 00319 00320 case LM_NO: 00321 result = true; 00322 break; 00323 00324 default: 00325 result = false; 00326 } 00327 00328 return result; 00329 }
| UInt8 DVRSimpleLUTShader::selectMode | ( | DrawActionBase * | action, | |
| Int8 | textureMode | |||
| ) | [protected] |
Definition at line 238 of file OSGDVRSimpleLUTShader.cpp.
References FDEBUG, FFATAL, isModeSupported(), LM_DEPENDENT, LM_FRAGPROG, LM_PALETTE_EXT, LM_RELOAD, and LM_TABLE_SGI.
Referenced by initialize(), and osg::DVRMtexLUTShader::initialize().
00239 { 00240 if(isModeSupported( action, LM_TABLE_SGI, textureMode )) 00241 { 00242 FDEBUG(("Using SGI postshading palette....\n")); 00243 FFATAL(("Using SGI postshading palette....\n")); 00244 00245 return LM_TABLE_SGI; 00246 } 00247 00248 if(isModeSupported( action, LM_DEPENDENT, textureMode )) 00249 { 00250 FDEBUG(("Using dependent texture postshading palette....\n")); 00251 FFATAL(("Using dependent texture postshading palette....\n")); 00252 00253 return LM_DEPENDENT; 00254 } 00255 00256 if(isModeSupported( action, LM_FRAGPROG, textureMode )) 00257 { 00258 FDEBUG(("Using fragment program postshading palette....\n")); 00259 FFATAL(("Using fragment program postshading palette....\n")); 00260 00261 return LM_FRAGPROG; 00262 } 00263 00264 if(isModeSupported( action, LM_PALETTE_EXT, textureMode )) 00265 { 00266 FDEBUG(("Using preshading palette....\n")); 00267 FFATAL(("Using preshading palette....\n")); 00268 00269 return LM_PALETTE_EXT; 00270 } 00271 00272 FDEBUG(("Using palette reload ....\n")); 00273 FFATAL(("Using palette reload ....\n")); 00274 00275 return LM_RELOAD; 00276 }
| void DVRSimpleLUTShader::enablePalette | ( | void | ) | [protected] |
Definition at line 332 of file OSGDVRSimpleLUTShader.cpp.
| void DVRSimpleLUTShader::disablePalette | ( | void | ) | [protected] |
Definition at line 337 of file OSGDVRSimpleLUTShader.cpp.
| void DVRSimpleLUTShader::initDependentTexture | ( | Int32 | size | ) | [protected] |
Definition at line 342 of file OSGDVRSimpleLUTShader.cpp.
References osg::addRefCP(), osg::beginEditCP(), osg::DVRSimpleLUTShaderBase::create(), osg::endEditCP(), FDEBUG, GL_CLAMP_TO_EDGE, m_pDepTexture, and osg::Image::OSG_RGBA_PF.
Referenced by activate().
00343 { 00344 FDEBUG(("Initializing dependent texture")); 00345 00346 ImagePtr img = Image::create(); 00347 00348 // we create a dummy 2D texture here since there is only a dependent 00349 // 2D texture lookup with texture shaders 00350 00351 beginEditCP(img); 00352 { 00353 img->set (Image::OSG_RGBA_PF, size, 2); 00354 img->clear(128); 00355 } 00356 endEditCP(img); 00357 00358 m_pDepTexture = TextureChunk::create(); 00359 00360 addRefCP(m_pDepTexture); 00361 00362 TextureChunkPtr &chunk = m_pDepTexture; 00363 00364 beginEditCP(chunk); 00365 { 00366 chunk->setImage (img ); 00367 chunk->setInternalFormat(GL_RGBA ); 00368 chunk->setExternalFormat(GL_RGBA ); 00369 00370 chunk->setWrapS (GL_CLAMP_TO_EDGE); 00371 chunk->setWrapT (GL_CLAMP_TO_EDGE); 00372 chunk->setWrapR (GL_CLAMP_TO_EDGE); 00373 00374 chunk->setMinFilter (GL_LINEAR ); 00375 chunk->setMagFilter (GL_LINEAR ); 00376 00377 chunk->setEnvMode (GL_REPLACE ); 00378 } 00379 endEditCP (chunk); 00380 00381 FDEBUG((" - DONE\n")); 00382 }
Definition at line 385 of file OSGDVRSimpleLUTShader.cpp.
References osg::beginEditCP(), osg::endEditCP(), FDEBUG, and m_pDepTexture.
Referenced by activate().
00386 { 00387 FDEBUG(("Updating dependent texture\n")); 00388 00389 ImagePtr img = m_pDepTexture->getImage(); 00390 00391 beginEditCP(img); 00392 { 00393 img->setSubData(0, 0, 0, size, 1, 1, data); 00394 img->setSubData(0, 1, 0, size, 1, 1, data); 00395 } 00396 endEditCP (img); 00397 00398 m_pDepTexture->imageContentChanged(); // makes begin/end edit unneccessary 00399 00400 FDEBUG((" - DONE\n")); 00401 }
| void DVRSimpleLUTShader::destroyDependentTexture | ( | void | ) | [protected] |
Definition at line 404 of file OSGDVRSimpleLUTShader.cpp.
References m_pDepTexture, osg::NullFC, and osg::subRefCP().
Referenced by cleanup(), and ~DVRSimpleLUTShader().
00405 { 00406 if(m_pDepTexture != NullFC) 00407 { 00408 subRefCP(m_pDepTexture); 00409 00410 m_pDepTexture = NullFC; 00411 } 00412 }
| void DVRSimpleLUTShader::setupAlphaCorrectionRegisterCombiners | ( | DrawActionBase * | action | ) | [protected] |
! First general combiner: multiply result of texture stage 1 ! by primary color
! Final combiner: route color and opacity of first general combinter ! to output (spare0)
Definition at line 437 of file OSGDVRSimpleLUTShader.cpp.
References _funcCombinerInputNV, _funcCombinerOutputNV, _funcFinalCombinerInputNV, _nvRegisterCombiners, osg::Window::getFunction(), osg::DrawActionBase::getWindow(), GL_COMBINER0_NV, GL_DISCARD_NV, GL_PRIMARY_COLOR_NV, GL_SPARE0_NV, GL_TEXTURE1_ARB, GL_UNSIGNED_IDENTITY_NV, GL_VARIABLE_A_NV, GL_VARIABLE_B_NV, GL_VARIABLE_C_NV, GL_VARIABLE_D_NV, GL_VARIABLE_E_NV, GL_VARIABLE_F_NV, GL_VARIABLE_G_NV, and osg::Window::hasExtension().
00439 { 00440 Window *win = action->getWindow(); 00441 00442 if(!win->hasExtension(_nvRegisterCombiners)) 00443 return; 00444 00445 FinalCombinerInputNVFunc FinalCombinerInputNV = NULL; 00446 CombinerInputNVFunc CombinerInputNV = NULL; 00447 CombinerOutputNVFunc CombinerOutputNV = NULL; 00448 00449 FinalCombinerInputNV = 00450 reinterpret_cast<FinalCombinerInputNVFunc>( 00451 win->getFunction(_funcFinalCombinerInputNV)); 00452 00453 CombinerInputNV = 00454 reinterpret_cast<CombinerInputNVFunc>( 00455 win->getFunction(_funcCombinerInputNV)); 00456 00457 CombinerOutputNV = 00458 reinterpret_cast<CombinerOutputNVFunc>( 00459 win->getFunction(_funcCombinerOutputNV)); 00460 00461 #if defined GL_NV_register_combiners 00464 // ---------------------------------------------------------------------- 00465 00466 // Input: RGB-portion 00467 CombinerInputNV(GL_COMBINER0_NV, 00468 GL_RGB, 00469 GL_VARIABLE_A_NV, 00470 GL_TEXTURE1_ARB, 00471 GL_UNSIGNED_IDENTITY_NV, 00472 GL_RGB); 00473 00474 CombinerInputNV(GL_COMBINER0_NV, 00475 GL_RGB, 00476 GL_VARIABLE_B_NV, 00477 GL_PRIMARY_COLOR_NV, 00478 GL_UNSIGNED_IDENTITY_NV, 00479 GL_RGB); 00480 00481 CombinerInputNV(GL_COMBINER0_NV, 00482 GL_RGB, 00483 GL_VARIABLE_C_NV, 00484 GL_ZERO, 00485 GL_UNSIGNED_IDENTITY_NV, 00486 GL_RGB); 00487 00488 CombinerInputNV(GL_COMBINER0_NV, 00489 GL_RGB, 00490 GL_VARIABLE_D_NV, 00491 GL_ZERO, 00492 GL_UNSIGNED_IDENTITY_NV, 00493 GL_RGB); 00494 00495 // Input: Alpha Portion 00496 CombinerInputNV(GL_COMBINER0_NV, 00497 GL_ALPHA, 00498 GL_VARIABLE_A_NV, 00499 GL_TEXTURE1_ARB, 00500 GL_UNSIGNED_IDENTITY_NV, 00501 GL_ALPHA); 00502 00503 CombinerInputNV(GL_COMBINER0_NV, 00504 GL_ALPHA, 00505 GL_VARIABLE_B_NV, 00506 GL_PRIMARY_COLOR_NV, 00507 GL_UNSIGNED_IDENTITY_NV, 00508 GL_ALPHA); 00509 00510 CombinerInputNV(GL_COMBINER0_NV, 00511 GL_ALPHA, 00512 GL_VARIABLE_C_NV, 00513 GL_ZERO, 00514 GL_UNSIGNED_IDENTITY_NV, 00515 GL_ALPHA); 00516 00517 CombinerInputNV(GL_COMBINER0_NV, 00518 GL_ALPHA, 00519 GL_VARIABLE_D_NV, 00520 GL_ZERO, 00521 GL_UNSIGNED_IDENTITY_NV, 00522 GL_ALPHA); 00523 00524 // Output 00525 CombinerOutputNV(GL_COMBINER0_NV, // stage 00526 GL_RGB, // portion 00527 GL_SPARE0_NV, // abOutput 00528 GL_DISCARD_NV, // cdOutput 00529 GL_DISCARD_NV, // sumOutput 00530 GL_NONE, // scale 00531 GL_NONE, // bias 00532 GL_FALSE, // abDotProduct 00533 GL_FALSE, // cdDotproduct 00534 GL_FALSE); // muxSum 00535 00536 CombinerOutputNV(GL_COMBINER0_NV, 00537 GL_ALPHA, 00538 GL_SPARE0_NV, // abOutput 00539 GL_DISCARD_NV, // cdOutput 00540 GL_DISCARD_NV, // sumOutput 00541 GL_NONE, 00542 GL_NONE, 00543 GL_FALSE, 00544 GL_FALSE, 00545 GL_FALSE); 00546 00549 // ----------------------------------------------------------------------- 00550 00551 // RGB portion 00552 FinalCombinerInputNV(GL_VARIABLE_A_NV, 00553 GL_ZERO, 00554 GL_UNSIGNED_IDENTITY_NV, 00555 GL_RGB); 00556 00557 FinalCombinerInputNV(GL_VARIABLE_B_NV, 00558 GL_ZERO, 00559 GL_UNSIGNED_IDENTITY_NV, 00560 GL_RGB); 00561 00562 FinalCombinerInputNV(GL_VARIABLE_C_NV, 00563 GL_ZERO, 00564 GL_UNSIGNED_IDENTITY_NV, 00565 GL_RGB); 00566 00567 FinalCombinerInputNV(GL_VARIABLE_E_NV, 00568 GL_ZERO, 00569 GL_UNSIGNED_IDENTITY_NV, 00570 GL_RGB); 00571 00572 FinalCombinerInputNV(GL_VARIABLE_F_NV, 00573 GL_ZERO, 00574 GL_UNSIGNED_IDENTITY_NV, 00575 GL_RGB); 00576 00577 FinalCombinerInputNV(GL_VARIABLE_D_NV, 00578 GL_SPARE0_NV, 00579 GL_UNSIGNED_IDENTITY_NV, 00580 GL_RGB); 00581 00582 // Alpha component 00583 FinalCombinerInputNV(GL_VARIABLE_G_NV, 00584 GL_SPARE0_NV, 00585 GL_UNSIGNED_IDENTITY_NV, 00586 GL_ALPHA); 00587 #endif 00588 }
| void DVRSimpleLUTShader::initMethod | ( | void | ) | [static, private] |
Reimplemented from osg::DVRSimpleShader.
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 591 of file OSGDVRSimpleLUTShader.cpp.
| void osg::DVRSimpleLUTShader::operator= | ( | const DVRSimpleLUTShader & | other | ) | [private] |
Reimplemented from osg::DVRSimpleLUTShaderBase.
Reimplemented in osg::DVRMtexLUTShader, and osg::DVRMtexLUTShaderBase.
| osg::FieldContainerType & osg::DVRSimpleLUTShaderBase::getClassType | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 58 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_type.
Referenced by osg::DVRSimpleLUTShaderBase::create().
00059 { 00060 return _type; 00061 }
| osg::UInt32 osg::DVRSimpleLUTShaderBase::getClassTypeId | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 65 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_type, and osg::TypeBase::getId().
00066 { 00067 return _type.getId(); 00068 }
| FieldContainerType & osg::DVRSimpleLUTShaderBase::getType | ( | void | ) | [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 117 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_type.
00118 { 00119 return _type; 00120 }
| const FieldContainerType & osg::DVRSimpleLUTShaderBase::getType | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 122 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_type.
00123 { 00124 return _type; 00125 }
| UInt32 osg::DVRSimpleLUTShaderBase::getContainerSize | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 137 of file OSGDVRSimpleLUTShaderBase.cpp.
| UInt32 osg::DVRSimpleLUTShaderBase::getBinSize | ( | const BitVector & | whichField | ) | [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 202 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, osg::DVRSimpleLUTShaderBase::_sfLutMode, osg::DVRSimpleLUTShaderBase::ActiveLutModeFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::DVRSimpleShaderBase::getBinSize(), osg::DVRSimpleLUTShaderBase::LutModeFieldMask, and osg::FieldBits::NoField.
Referenced by osg::DVRMtexLUTShaderBase::getBinSize().
00203 { 00204 UInt32 returnValue = Inherited::getBinSize(whichField); 00205 00206 if(FieldBits::NoField != (LutModeFieldMask & whichField)) 00207 { 00208 returnValue += _sfLutMode.getBinSize(); 00209 } 00210 00211 if(FieldBits::NoField != (ActiveLutModeFieldMask & whichField)) 00212 { 00213 returnValue += _sfActiveLutMode.getBinSize(); 00214 } 00215 00216 00217 return returnValue; 00218 }
| void osg::DVRSimpleLUTShaderBase::copyToBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 220 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, osg::DVRSimpleLUTShaderBase::_sfLutMode, osg::DVRSimpleLUTShaderBase::ActiveLutModeFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::DVRSimpleShaderBase::copyToBin(), osg::DVRSimpleLUTShaderBase::LutModeFieldMask, and osg::FieldBits::NoField.
Referenced by osg::DVRMtexLUTShaderBase::copyToBin().
00222 { 00223 Inherited::copyToBin(pMem, whichField); 00224 00225 if(FieldBits::NoField != (LutModeFieldMask & whichField)) 00226 { 00227 _sfLutMode.copyToBin(pMem); 00228 } 00229 00230 if(FieldBits::NoField != (ActiveLutModeFieldMask & whichField)) 00231 { 00232 _sfActiveLutMode.copyToBin(pMem); 00233 } 00234 00235 00236 }
| void osg::DVRSimpleLUTShaderBase::copyFromBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 238 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, osg::DVRSimpleLUTShaderBase::_sfLutMode, osg::DVRSimpleLUTShaderBase::ActiveLutModeFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::DVRSimpleShaderBase::copyFromBin(), osg::DVRSimpleLUTShaderBase::LutModeFieldMask, and osg::FieldBits::NoField.
Referenced by osg::DVRMtexLUTShaderBase::copyFromBin().
00240 { 00241 Inherited::copyFromBin(pMem, whichField); 00242 00243 if(FieldBits::NoField != (LutModeFieldMask & whichField)) 00244 { 00245 _sfLutMode.copyFromBin(pMem); 00246 } 00247 00248 if(FieldBits::NoField != (ActiveLutModeFieldMask & whichField)) 00249 { 00250 _sfActiveLutMode.copyFromBin(pMem); 00251 } 00252 00253 00254 }
| DVRSimpleLUTShaderPtr osg::DVRSimpleLUTShaderBase::create | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 72 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::getClassType(), osg::NullFC, and osg::DVRSimpleLUTShaderBase::shallowCopy().
Referenced by activate(), and initDependentTexture().
00073 { 00074 DVRSimpleLUTShaderPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = DVRSimpleLUTShaderPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
| DVRSimpleLUTShaderPtr osg::DVRSimpleLUTShaderBase::createEmpty | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 87 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::FieldContainer::newPtr().
00088 { 00089 DVRSimpleLUTShaderPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
| FieldContainerPtr osg::DVRSimpleLUTShaderBase::shallowCopy | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 128 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::FieldContainer::newPtr().
Referenced by osg::DVRSimpleLUTShaderBase::create().
00129 { 00130 DVRSimpleLUTShaderPtr returnValue; 00131 00132 newPtr(returnValue, dynamic_cast<const DVRSimpleLUTShader *>(this)); 00133 00134 return returnValue; 00135 }
| SFInt8 * osg::DVRSimpleLUTShaderBase::editSFLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 108 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode.
00109 { 00110 return &_sfLutMode; 00111 }
| const SFInt8 * osg::DVRSimpleLUTShaderBase::getSFLutMode | ( | void | ) | const [inline, protected, inherited] |
Definition at line 101 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode.
00102 { 00103 return &_sfLutMode; 00104 }
| SFInt8 * osg::DVRSimpleLUTShaderBase::getSFLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 116 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode.
00117 { 00118 return &_sfLutMode; 00119 }
| SFInt8 * osg::DVRSimpleLUTShaderBase::editSFActiveLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 131 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode.
00132 { 00133 return &_sfActiveLutMode; 00134 }
| const SFInt8 * osg::DVRSimpleLUTShaderBase::getSFActiveLutMode | ( | void | ) | const [inline, protected, inherited] |
Definition at line 124 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode.
00125 { 00126 return &_sfActiveLutMode; 00127 }
| SFInt8 * osg::DVRSimpleLUTShaderBase::getSFActiveLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 139 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode.
00140 { 00141 return &_sfActiveLutMode; 00142 }
| Int8 & osg::DVRSimpleLUTShaderBase::editLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 148 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00149 { 00150 return _sfLutMode.getValue(); 00151 }
| const Int8 & osg::DVRSimpleLUTShaderBase::getLutMode | ( | void | ) | const [inline, protected, inherited] |
Definition at line 155 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by initialize(), and osg::DVRMtexLUTShader::initialize().
00156 { 00157 return _sfLutMode.getValue(); 00158 }
| Int8 & osg::DVRSimpleLUTShaderBase::getLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 163 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00164 { 00165 return _sfLutMode.getValue(); 00166 }
| Int8 & osg::DVRSimpleLUTShaderBase::editActiveLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 178 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00179 { 00180 return _sfActiveLutMode.getValue(); 00181 }
| const Int8 & osg::DVRSimpleLUTShaderBase::getActiveLutMode | ( | void | ) | const [inline, protected, inherited] |
Definition at line 185 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by activate().
00186 { 00187 return _sfActiveLutMode.getValue(); 00188 }
| Int8 & osg::DVRSimpleLUTShaderBase::getActiveLutMode | ( | void | ) | [inline, protected, inherited] |
Definition at line 193 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00194 { 00195 return _sfActiveLutMode.getValue(); 00196 }
| void osg::DVRSimpleLUTShaderBase::setLutMode | ( | const Int8 & | value | ) | [inline, protected, inherited] |
Definition at line 171 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
00172 { 00173 _sfLutMode.setValue(value); 00174 }
| void osg::DVRSimpleLUTShaderBase::setActiveLutMode | ( | const Int8 & | value | ) | [inline, protected, inherited] |
Definition at line 201 of file OSGDVRSimpleLUTShaderBase.inl.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by changed(), initialize(), and osg::DVRMtexLUTShader::initialize().
00202 { 00203 _sfActiveLutMode.setValue(value); 00204 }
| void osg::DVRSimpleLUTShaderBase::executeSyncImpl | ( | DVRSimpleLUTShaderBase * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 257 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::_sfActiveLutMode, osg::DVRSimpleLUTShaderBase::_sfLutMode, osg::DVRSimpleLUTShaderBase::ActiveLutModeFieldMask, osg::DVRSimpleShaderBase::executeSyncImpl(), osg::DVRSimpleLUTShaderBase::LutModeFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().
Referenced by osg::DVRSimpleLUTShaderBase::executeSync(), and osg::DVRMtexLUTShaderBase::executeSyncImpl().
00259 { 00260 00261 Inherited::executeSyncImpl(pOther, whichField); 00262 00263 if(FieldBits::NoField != (LutModeFieldMask & whichField)) 00264 _sfLutMode.syncWith(pOther->_sfLutMode); 00265 00266 if(FieldBits::NoField != (ActiveLutModeFieldMask & whichField)) 00267 _sfActiveLutMode.syncWith(pOther->_sfActiveLutMode); 00268 00269 00270 }
| void osg::DVRSimpleLUTShaderBase::executeSync | ( | FieldContainer & | other, | |
| const BitVector & | whichField | |||
| ) | [protected, virtual, inherited] |
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 144 of file OSGDVRSimpleLUTShaderBase.cpp.
References osg::DVRSimpleLUTShaderBase::executeSyncImpl().
00146 { 00147 this->executeSyncImpl(static_cast<DVRSimpleLUTShaderBase *>(&other), 00148 whichField); 00149 }
| virtual void osg::FieldContainer::executeSync | ( | FieldContainer & | other, | |
| const BitVector & | whichField | |||
| ) | [protected, pure virtual, inherited] |
Referenced by osg::FieldContainerPtrBase::executeSync().
| void DVRShader::renderSlice | ( | DVRVolume * | volume, | |
| DrawActionBase * | action, | |||
| Real32 * | data, | |||
| UInt32 | vertices, | |||
| UInt32 | values | |||
| ) | [virtual, inherited] |
Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.
Definition at line 85 of file OSGDVRShader.cpp.
References SLOG.
00090 { 00091 SLOG << "DVRShader::renderSlice - NI" << std::endl; 00092 }
| void DVRShader::renderSlice | ( | DVRVolume * | volume, | |
| DrawActionBase * | action, | |||
| DVRRenderSlice * | clippedSlice | |||
| ) | [virtual, inherited] |
Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.
Definition at line 94 of file OSGDVRShader.cpp.
References SLOG.
00097 { 00098 SLOG << "DVRShader::renderSlice - NI" << std::endl; 00099 }
| bool DVRShader::hasRenderCallback | ( | void | ) | [virtual, inherited] |
Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.
Definition at line 101 of file OSGDVRShader.cpp.
| bool DVRShader::useMTSlabs | ( | void | ) | [virtual, inherited] |
Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.
Definition at line 106 of file OSGDVRShader.cpp.
| UInt16 osg::FieldContainer::getClassGroupId | ( | void | ) | [inline, static, inherited] |
Definition at line 71 of file OSGFieldContainerImpl.inl.
References osg::FieldContainer::_type, and osg::FieldContainerType::getGroupId().
00072 { 00073 return _type.getGroupId(); 00074 }
| UInt32 osg::FieldContainer::getTypeId | ( | void | ) | const [inline, inherited] |
Definition at line 77 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getId(), and osg::FieldContainer::getType().
Referenced by osg::TextureChunk::changeFrom(), and osg::CubeTextureChunk::changeFrom().
00078 { 00079 return getType().getId(); 00080 }
| UInt16 osg::FieldContainer::getGroupId | ( | void | ) | const [inline, inherited] |
Definition at line 83 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::getGroupId(), and osg::FieldContainer::getType().
Referenced by osg::Image::setAttachmentField().
00084 { 00085 return getType().getGroupId(); 00086 }
| const Char8 * osg::FieldContainer::getTypeName | ( | void | ) | const [inline, inherited] |
Definition at line 89 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getCName(), and osg::FieldContainer::getType().
00090 { 00091 return getType().getCName(); 00092 }
Generic Field Access
Definition at line 95 of file OSGFieldContainerImpl.inl.
References osg::FieldDescription::getField(), osg::FieldContainerType::getFieldDescription(), and osg::FieldContainer::getType().
Referenced by osg::QFCItem::expand(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::QFieldViewBase::getFieldPtr(), osg::QFieldEditorBase::getFieldPtr(), osg::getParentsField(), and osg::QFCItem::setup().
00096 { 00097 const FieldDescription *desc = getType().getFieldDescription(fieldId); 00098 00099 return desc ? desc->getField(*this) : NULL; 00100 }
Generic Field Access
Definition at line 103 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::findFieldDescription(), osg::FieldDescription::getField(), and osg::FieldContainer::getType().
00104 { 00105 const FieldDescription *desc =getType().findFieldDescription(fieldName); 00106 00107 return desc ? desc->getField(*this) : NULL; 00108 }
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result, | |
| const typename ObjectPtrT::StoredObjectType * | prototypeP | |||
| ) | [inline, static, protected, inherited] |
Definition at line 138 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
Referenced by osg::XWindowBase::createEmpty(), osg::WIN32WindowBase::createEmpty(), osg::ViewportBase::createEmpty(), osg::VertexProgramChunkBase::createEmpty(), osg::TwoSidedLightingChunkBase::createEmpty(), osg::TransformChunkBase::createEmpty(), osg::TransformBase::createEmpty(), osg::TileCameraDecoratorBase::createEmpty(), osg::TextureTransformChunkBase::createEmpty(), osg::TextureGrabForegroundBase::createEmpty(), osg::TextureGrabBackgroundBase::createEmpty(), osg::TextureChunkBase::createEmpty(), osg::TextureBackgroundBase::createEmpty(), osg::TexGenChunkBase::createEmpty(), osg::SwitchMaterialBase::createEmpty(), osg::SwitchBase::createEmpty(), osg::SurfaceBase::createEmpty(), osg::StringAttributeMapBase::createEmpty(), osg::StereoBufferViewportBase::createEmpty(), osg::StencilChunkBase::createEmpty(), osg::StateSortingGroupBase::createEmpty(), osg::StateBase::createEmpty(), osg::SpotLightBase::createEmpty(), osg::SortFirstWindowBase::createEmpty(), osg::SolidBackgroundBase::createEmpty(), osg::SlicesBase::createEmpty(), osg::SkyBackgroundBase::createEmpty(), osg::SimpleTexturedMaterialBase::createEmpty(), osg::SimpleStatisticsForegroundBase::createEmpty(), osg::SimpleMaterialBase::createEmpty(), osg::SHLParameterChunkBase::createEmpty(), osg::SHLChunkBase::createEmpty(), osg::ShearedStereoCameraDecoratorBase::createEmpty(), osg::ShaderParameterVec4fBase::createEmpty(), osg::ShaderParameterVec3fBase::createEmpty(), osg::ShaderParameterVec2fBase::createEmpty(), osg::ShaderParameterStringBase::createEmpty(), osg::ShaderParameterRealBase::createEmpty(), osg::ShaderParameterMVec4fBase::createEmpty(), osg::ShaderParameterMVec3fBase::createEmpty(), osg::ShaderParameterMVec2fBase::createEmpty(), osg::ShaderParameterMRealBase::createEmpty(), osg::ShaderParameterMMatrixBase::createEmpty(), osg::ShaderParameterMIntBase::createEmpty(), osg::ShaderParameterMatrixBase::createEmpty(), osg::ShaderParameterIntBase::createEmpty(), osg::ShaderParameterBoolBase::createEmpty(), osg::ShadeModelChunkBase::createEmpty(), osg::ScreenGroupBase::createEmpty(), osg::SClipPlaneChunkBase::createEmpty(), osg::ResolutionDisplayFilterBase::createEmpty(), osg::RenderOptionsBase::createEmpty(), osg::RegisterCombinersChunkBase::createEmpty(), osg::QTWindowBase::createEmpty(), osg::ProxyGroupBase::createEmpty(), osg::ProjectionCameraDecoratorBase::createEmpty(), osg::PolygonForegroundBase::createEmpty(), osg::PolygonChunkBase::createEmpty(), osg::PolygonBackgroundBase::createEmpty(), osg::PointLightBase::createEmpty(), osg::PointChunkBase::createEmpty(), osg::PhongMaterialBase::createEmpty(), osg::PerspectiveCameraBase::createEmpty(), osg::PassiveWindowBase::createEmpty(), osg::PassiveViewportBase::createEmpty(), osg::PassiveBackgroundBase::createEmpty(), osg::ParticlesBase::createEmpty(), osg::OrthographicCameraBase::createEmpty(), osg::OffsetCameraDecoratorBase::createEmpty(), osg::OffCenterPerspectiveCameraBase::createEmpty(), osg::MultiSwitchBase::createEmpty(), osg::MultiPassMaterialBase::createEmpty(), osg::MultiDisplayWindowBase::createEmpty(), osg::MatrixCameraDecoratorBase::createEmpty(), osg::MatrixCameraBase::createEmpty(), osg::MaterialPoolBase::createEmpty(), osg::MaterialGroupBase::createEmpty(), osg::MaterialChunkBase::createEmpty(), osg::LogicOpChunkBase::createEmpty(), osg::LineChunkBase::createEmpty(), osg::LightModelChunkBase::createEmpty(), osg::LightEnvBase::createEmpty(), osg::LightChunkBase::createEmpty(), osg::InverseTransformBase::createEmpty(), osg::InlineBase::createEmpty(), osg::ImageForegroundBase::createEmpty(), osg::ImageBase::createEmpty(), osg::ImageBackgroundBase::createEmpty(), osg::GroupBase::createEmpty(), osg::GraphicStatisticsForegroundBase::createEmpty(), osg::GradientBackgroundBase::createEmpty(), osg::GrabForegroundBase::createEmpty(), osg::GLUTWindowBase::createEmpty(), osg::GeometryBase::createEmpty(), osg::FresnelMaterialBase::createEmpty(), osg::FragmentProgramChunkBase::createEmpty(), osg::FogChunkBase::createEmpty(), osg::FogBase::createEmpty(), osg::FileGrabForegroundBase::createEmpty(), osg::FCPtrAttributeMapBase::createEmpty(), osg::FBOViewportBase::createEmpty(), osg::FatBorderChunkBase::createEmpty(), osg::DVRVolumeTextureBase::createEmpty(), osg::DVRVolumeBase::createEmpty(), osg::DVRSimpleShaderBase::createEmpty(), osg::DVRSimpleLUTShaderBase::createEmpty(), osg::DVRMtexLUTShaderBase::createEmpty(), osg::DVRLookupTableBase::createEmpty(), osg::DVRIsoSurfaceBase::createEmpty(), osg::DVRIsoShaderBase::createEmpty(), osg::DVRGeometryBase::createEmpty(), osg::DVRClipObjectsBase::createEmpty(), osg::DVRClipGeometryBase::createEmpty(), osg::DVRAppearanceBase::createEmpty(), osg::DistortionDisplayFilterBase::createEmpty(), osg::DistanceLODBase::createEmpty(), osg::DisplayFilterForegroundBase::createEmpty(), osg::DisplayCalibrationBase::createEmpty(), osg::DirectionalLightBase::createEmpty(), osg::DepthClearBackgroundBase::createEmpty(), osg::DepthChunkBase::createEmpty(), osg::CubeTextureChunkBase::createEmpty(), osg::ComponentTransformBase::createEmpty(), osg::ColorMaskChunkBase::createEmpty(), osg::ColorDisplayFilterBase::createEmpty(), osg::ColorBufferViewportBase::createEmpty(), osg::ClusterWindowBase::createEmpty(), osg::ClipPlaneChunkBase::createEmpty(), osg::ClipPlaneBase::createEmpty(), osg::ChunkMaterialBase::createEmpty(), osg::BlendChunkBase::createEmpty(), osg::BillboardBase::createEmpty(), osg::XWindowBase::shallowCopy(), osg::WIN32WindowBase::shallowCopy(), osg::ViewportBase::shallowCopy(), osg::VertexProgramChunkBase::shallowCopy(), osg::TwoSidedLightingChunkBase::shallowCopy(), osg::TransformChunkBase::shallowCopy(), osg::TransformBase::shallowCopy(), osg::TileCameraDecoratorBase::shallowCopy(), osg::TextureTransformChunkBase::shallowCopy(), osg::TextureGrabForegroundBase::shallowCopy(), osg::TextureGrabBackgroundBase::shallowCopy(), osg::TextureChunkBase::shallowCopy(), osg::TextureBackgroundBase::shallowCopy(), osg::TexGenChunkBase::shallowCopy(), osg::SwitchMaterialBase::shallowCopy(), osg::SwitchBase::shallowCopy(), osg::SurfaceBase::shallowCopy(), osg::StringAttributeMapBase::shallowCopy(), osg::StereoBufferViewportBase::shallowCopy(), osg::StencilChunkBase::shallowCopy(), osg::StateSortingGroupBase::shallowCopy(), osg::StateBase::shallowCopy(), osg::SpotLightBase::shallowCopy(), osg::SortFirstWindowBase::shallowCopy(), osg::SolidBackgroundBase::shallowCopy(), osg::SlicesBase::shallowCopy(), osg::SkyBackgroundBase::shallowCopy(), osg::SimpleTexturedMaterialBase::shallowCopy(), osg::SimpleStatisticsForegroundBase::shallowCopy(), osg::SimpleMaterialBase::shallowCopy(), osg::SHLParameterChunkBase::shallowCopy(), osg::SHLChunkBase::shallowCopy(), osg::ShearedStereoCameraDecoratorBase::shallowCopy(), osg::ShaderParameterVec4fBase::shallowCopy(), osg::ShaderParameterVec3fBase::shallowCopy(), osg::ShaderParameterVec2fBase::shallowCopy(), osg::ShaderParameterStringBase::shallowCopy(), osg::ShaderParameterRealBase::shallowCopy(), osg::ShaderParameterMVec4fBase::shallowCopy(), osg::ShaderParameterMVec3fBase::shallowCopy(), osg::ShaderParameterMVec2fBase::shallowCopy(), osg::ShaderParameterMRealBase::shallowCopy(), osg::ShaderParameterMMatrixBase::shallowCopy(), osg::ShaderParameterMIntBase::shallowCopy(), osg::ShaderParameterMatrixBase::shallowCopy(), osg::ShaderParameterIntBase::shallowCopy(), osg::ShaderParameterBoolBase::shallowCopy(), osg::ShadeModelChunkBase::shallowCopy(), osg::ScreenGroupBase::shallowCopy(), osg::SClipPlaneChunkBase::shallowCopy(), osg::ResolutionDisplayFilterBase::shallowCopy(), osg::RenderOptionsBase::shallowCopy(), osg::RegisterCombinersChunkBase::shallowCopy(), osg::QTWindowBase::shallowCopy(), osg::ProxyGroupBase::shallowCopy(), osg::ProjectionCameraDecoratorBase::shallowCopy(), osg::PolygonForegroundBase::shallowCopy(), osg::PolygonChunkBase::shallowCopy(), osg::PolygonBackgroundBase::shallowCopy(), osg::PointLightBase::shallowCopy(), osg::PointChunkBase::shallowCopy(), osg::PhongMaterialBase::shallowCopy(), osg::PerspectiveCameraBase::shallowCopy(), osg::PassiveWindowBase::shallowCopy(), osg::PassiveViewportBase::shallowCopy(), osg::PassiveBackgroundBase::shallowCopy(), osg::ParticlesBase::shallowCopy(), osg::OrthographicCameraBase::shallowCopy(), osg::OffsetCameraDecoratorBase::shallowCopy(), osg::OffCenterPerspectiveCameraBase::shallowCopy(), osg::MultiSwitchBase::shallowCopy(), osg::MultiPassMaterialBase::shallowCopy(), osg::MultiDisplayWindowBase::shallowCopy(), osg::MatrixCameraDecoratorBase::shallowCopy(), osg::MatrixCameraBase::shallowCopy(), osg::MaterialPoolBase::shallowCopy(), osg::MaterialGroupBase::shallowCopy(), osg::MaterialChunkBase::shallowCopy(), osg::LogicOpChunkBase::shallowCopy(), osg::LineChunkBase::shallowCopy(), osg::LightModelChunkBase::shallowCopy(), osg::LightEnvBase::shallowCopy(), osg::LightChunkBase::shallowCopy(), osg::InverseTransformBase::shallowCopy(), osg::InlineBase::shallowCopy(), osg::ImageForegroundBase::shallowCopy(), osg::ImageBase::shallowCopy(), osg::ImageBackgroundBase::shallowCopy(), osg::GroupBase::shallowCopy(), osg::GraphicStatisticsForegroundBase::shallowCopy(), osg::GradientBackgroundBase::shallowCopy(), osg::GrabForegroundBase::shallowCopy(), osg::GLUTWindowBase::shallowCopy(), osg::GeometryBase::shallowCopy(), osg::FresnelMaterialBase::shallowCopy(), osg::FragmentProgramChunkBase::shallowCopy(), osg::FogChunkBase::shallowCopy(), osg::FogBase::shallowCopy(), osg::FileGrabForegroundBase::shallowCopy(), osg::FCPtrAttributeMapBase::shallowCopy(), osg::FBOViewportBase::shallowCopy(), osg::FatBorderChunkBase::shallowCopy(), osg::DVRVolumeTextureBase::shallowCopy(), osg::DVRVolumeBase::shallowCopy(), osg::DVRSimpleShaderBase::shallowCopy(), osg::DVRSimpleLUTShaderBase::shallowCopy(), osg::DVRMtexLUTShaderBase::shallowCopy(), osg::DVRLookupTableBase::shallowCopy(), osg::DVRIsoSurfaceBase::shallowCopy(), osg::DVRIsoShaderBase::shallowCopy(), osg::DVRGeometryBase::shallowCopy(), osg::DVRClipObjectsBase::shallowCopy(), osg::DVRClipGeometryBase::shallowCopy(), osg::DVRAppearanceBase::shallowCopy(), osg::DistortionDisplayFilterBase::shallowCopy(), osg::DistanceLODBase::shallowCopy(), osg::DisplayFilterForegroundBase::shallowCopy(), osg::DisplayCalibrationBase::shallowCopy(), osg::DirectionalLightBase::shallowCopy(), osg::DepthClearBackgroundBase::shallowCopy(), osg::DepthChunkBase::shallowCopy(), osg::CubeTextureChunkBase::shallowCopy(), osg::ComponentTransformBase::shallowCopy(), osg::ColorMaskChunkBase::shallowCopy(), osg::ColorDisplayFilterBase::shallowCopy(), osg::ColorBufferViewportBase::shallowCopy(), osg::ClusterWindowBase::shallowCopy(), osg::ClipPlaneChunkBase::shallowCopy(), osg::ClipPlaneBase::shallowCopy(), osg::ChunkMaterialBase::shallowCopy(), osg::BlendChunkBase::shallowCopy(), and osg::BillboardBase::shallowCopy().
00141 { 00142 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00143 00144 UInt8 *pTmp; 00145 00146 result._containerSize = sizeof(ObjectType); 00147 00148 pTmp = 00149 static_cast<UInt8 *>(operator new( 00150 sizeof(Int32) + // ReferenceCount 00151 sizeof(UInt32) + // ContainerId 00152 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00153 00154 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00155 00156 pTmp += sizeof(Int32); 00157 00158 result._storeP = (pTmp + sizeof(UInt32)); 00159 00160 #ifdef OSG_DEBUG_FCPTR 00161 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00162 #endif 00163 00164 *(reinterpret_cast<UInt32 *>(pTmp)) = 00165 FieldContainerFactory::the()->registerFieldContainer(result); 00166 00167 #ifdef OSG_INVALID_PTR_CHECK 00168 result._id = *(reinterpret_cast<UInt32 *>(pTmp)); 00169 #endif 00170 00171 Thread::getCurrentChangeList()->addCreated( 00172 *(reinterpret_cast<UInt32 *>(pTmp))); 00173 00174 pTmp += sizeof(UInt32); 00175 00176 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00177 00178 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00179 { 00180 pTmp = 00181 reinterpret_cast<UInt8 *>(new (pTmp) ObjectType(*prototypeP)); 00182 00183 pTmp += sizeof(ObjectType); 00184 } 00185 00186 result->onCreate(prototypeP); 00187 00188 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00189 { 00190 aObject[i].onCreateAspect(aObject, prototypeP); 00191 } 00192 00193 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00194 00195 fprintf(stderr, "GV_MEM_FC_DBG : (%u) cc (%p|%u)\n", 00196 Thread::getAspect(), 00197 result._storeP, 00198 // ObjectType::getClassType().getCName(), 00199 ObjectType::getClassType().getId()); 00200 #endif 00201 00202 #ifdef OSG_DEBUG_TYPED_FCPTR 00203 result.updateTypedStore(); 00204 #endif 00205 }
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result | ) | [inline, static, protected, inherited] |
Definition at line 208 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
00209 { 00210 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00211 00212 UInt8 *pTmp; 00213 00214 result._containerSize = sizeof(ObjectType); 00215 00216 pTmp = 00217 static_cast<UInt8 *>(operator new( 00218 sizeof(Int32) + // ReferenceCount 00219 sizeof(UInt32) + // ContainerId 00220 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00221 00222 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00223 00224 pTmp += sizeof(Int32); 00225 00226 result._storeP = (pTmp + sizeof(UInt32)); 00227 00228 #ifdef OSG_DEBUG_FCPTR 00229 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00230 #endif 00231 00232 *(reinterpret_cast<UInt32 *>(pTmp)) = 00233 FieldContainerFactory::the()->registerFieldContainer(result); 00234 00235 #ifdef OSG_INVALID_PTR_CHECK 00236 result._id = *(reinterpret_cast<UInt32 *>(pTmp)); 00237 #endif 00238 00239 Thread::getCurrentChangeList()->addCreated( 00240 *(reinterpret_cast<UInt32 *>(pTmp))); 00241 00242 pTmp += sizeof(UInt32); 00243 00244 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00245 00246 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00247 { 00248 pTmp = reinterpret_cast<UInt8 *>(new (pTmp) ObjectType()); 00249 00250 pTmp += sizeof(ObjectType); 00251 } 00252 00253 result->onCreate(); 00254 00255 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00256 { 00257 aObject[i].onCreateAspect(aObject); 00258 } 00259 00260 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00261 fprintf(stderr, "GV_MEM_FC_DBG : (%u) c (%p|%u)\n", 00262 Thread::getAspect(), 00263 result._storeP, 00264 // ObjectType::getClassType().getCName(), 00265 ObjectType::getClassType().getId()); 00266 #endif 00267 00268 #ifdef OSG_DEBUG_TYPED_FCPTR 00269 result.updateTypedStore(); 00270 #endif 00271 }
| void osg::FieldContainer::beginEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
Definition at line 293 of file OSGFieldContainerImpl.inl.
| void osg::FieldContainer::endEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
Definition at line 299 of file OSGFieldContainerImpl.inl.
References osg::endEditCP().
00300 { 00301 FieldContainerPtr tmpPtr(this); 00302 endEditCP(tmpPtr, whichField); 00303 }
| void osg::FieldContainer::onCreate | ( | const FieldContainer * | source = NULL |
) | [inline, protected, inherited] |
Reimplemented in osg::Node, osg::Geometry, osg::FatBorderChunk, osg::Surface, osg::CubeTextureChunk, osg::FragmentProgramChunk, osg::ProgramChunk, osg::TextureChunk, osg::VertexProgramChunk, osg::FBOViewport, osg::SkyBackground, osg::Window, osg::ShaderParameterChunk, and osg::SHLChunk.
Definition at line 326 of file OSGFieldContainerImpl.inl.
Referenced by osg::SkyBackground::onCreate(), and osg::ShaderParameterChunk::onCreate().
| void osg::FieldContainer::onCreateAspect | ( | const FieldContainer * | aspect0, | |
| const FieldContainer * | source = NULL | |||
| ) | [inline, protected, inherited] |
Reimplemented in osg::Window.
Definition at line 331 of file OSGFieldContainerImpl.inl.
| void FieldContainer::onDestroy | ( | void | ) | [protected, virtual, inherited] |
Reimplemented in osg::NodeCore, osg::Attachment, osg::Geometry, osg::Surface, osg::MaterialPool, osg::CubeTextureChunk, osg::TextureChunk, osg::FBOViewport, osg::SkyBackground, osg::Window, osg::ShaderParameterChunk, and osg::SHLChunk.
Definition at line 98 of file OSGFieldContainer.cpp.
Referenced by osg::SkyBackground::onDestroy().
friend class FieldContainer [friend] |
Reimplemented from osg::DVRSimpleLUTShaderBase.
Reimplemented in osg::DVRMtexLUTShader, and osg::DVRMtexLUTShaderBase.
Definition at line 205 of file OSGDVRSimpleLUTShader.h.
friend class DVRSimpleLUTShaderBase [friend] |
Definition at line 206 of file OSGDVRSimpleLUTShader.h.
UInt8 osg::DVRSimpleLUTShader::m_nTexturePaletteMode [protected] |
Definition at line 115 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), brickActivate(), deactivate(), initialize(), and osg::DVRMtexLUTShader::initialize().
Int8 osg::DVRSimpleLUTShader::m_nTextureMode [protected] |
Definition at line 116 of file OSGDVRSimpleLUTShader.h.
Referenced by activate().
Definition at line 117 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), deactivate(), and ~DVRSimpleLUTShader().
Definition at line 118 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), deactivate(), destroyDependentTexture(), initDependentTexture(), and updateDependentTexture().
char DVRSimpleLUTShader::_fragProg2D [static, private] |
"!!ARBfp1.0 \n"
"TEMP volume; \n"
"PARAM bias = {0.001953125, 0.0, 0.0, 0.0};\n"
"PARAM scale = {0.99609375, 0.99609375, 0.99609375}; # 255/256\n"
"PARAM const = {0.0, 0.0, 0.0, 0.0};\n"
"TEMP depCoor;\n"
"TEX volume, fragment.texcoord[0], texture[0], 2D;\n"
"MOV depCoor, const;\n"
"MOV depCoor.x, volume;\n"
"MAD depCoor, depCoor, scale, bias;\n"
"TEX result.color, depCoor, texture[2], 2D;\n"
"END\n"
Definition at line 184 of file OSGDVRSimpleLUTShader.h.
Referenced by activate().
char DVRSimpleLUTShader::_fragProg3D [static, private] |
"!!ARBfp1.0 \n"
"TEMP volume; \n"
"PARAM bias = {0.001953125, 0.0, 0.0, 0.0};\n"
"PARAM scale = {0.99609375, 0.99609375, 0.99609375}; # 255/256\n"
"PARAM const = {0.0, 0.0, 0.0, 0.0};\n"
"TEMP depCoor;\n"
"TEMP outColor;\n"
"TEX volume, fragment.texcoord[0], texture[0], 3D;\n"
"MOV depCoor, const;\n"
"MOV depCoor.x, volume;\n"
"MAD depCoor, depCoor, scale, bias;\n"
"TEX outColor, depCoor, texture[2], 2D;\n"
"MUL result.color, outColor, fragment.color;\n"
"END\n"
Definition at line 185 of file OSGDVRSimpleLUTShader.h.
Referenced by activate().
char DVRSimpleLUTShader::_fragProg2DMulti [static, private] |
"!!ARBfp1.0 \n"
"TEMP volume; \n"
"TEMP stage0; \n"
"TEMP stage1; \n"
"PARAM bias = {0.001953125, 0.0, 0.0, 0.0};\n"
"PARAM scale = {0.99609375, 0.99609375, 0.99609375}; # 255/256\n"
"PARAM const = {0.0, 0.0, 0.0, 0.0};\n"
"TEMP depCoor;\n"
"TEMP outColor;\n"
"TEX stage0, fragment.texcoord[0], texture[0], 2D;\n"
"TEX stage1, fragment.texcoord[1], texture[1], 2D;\n"
"LRP volume, state.fog.color.a, stage1, stage0;\n"
"MOV depCoor, const;\n"
"MOV depCoor.x, volume;\n"
"MAD depCoor, depCoor, scale, bias;\n"
"TEX outColor, depCoor, texture[2], 2D;\n"
"MUL result.color, outColor, fragment.color;\n"
"END\n"
Definition at line 186 of file OSGDVRSimpleLUTShader.h.
Referenced by activate().
UInt32 DVRSimpleLUTShader::_sgiTexColorTable [static, private] |
Definition at line 189 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_extPalettedTexture [static, private] |
Definition at line 190 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_extSharedPalettedTexture [static, private] |
Definition at line 191 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_arbMultitexture [static, private] |
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 192 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_nvTextureShader2 [static, private] |
Definition at line 193 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_arbFragmentProgram [static, private] |
Definition at line 194 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and isModeSupported().
UInt32 DVRSimpleLUTShader::_nvRegisterCombiners [static, private] |
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 195 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), isModeSupported(), and setupAlphaCorrectionRegisterCombiners().
UInt32 DVRSimpleLUTShader::_funcColorTableSGI [static, private] |
Definition at line 198 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), and DVRSimpleLUTShader().
UInt32 DVRSimpleLUTShader::_funcColorTableEXT [static, private] |
Definition at line 199 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), and DVRSimpleLUTShader().
UInt32 DVRSimpleLUTShader::_funcActiveTextureARB [static, private] |
Definition at line 200 of file OSGDVRSimpleLUTShader.h.
Referenced by activate(), deactivate(), and DVRSimpleLUTShader().
UInt32 DVRSimpleLUTShader::_funcFinalCombinerInputNV [static, private] |
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 201 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and setupAlphaCorrectionRegisterCombiners().
UInt32 DVRSimpleLUTShader::_funcCombinerInputNV [static, private] |
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 202 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and setupAlphaCorrectionRegisterCombiners().
UInt32 DVRSimpleLUTShader::_funcCombinerOutputNV [static, private] |
Reimplemented in osg::DVRMtexLUTShader.
Definition at line 203 of file OSGDVRSimpleLUTShader.h.
Referenced by DVRSimpleLUTShader(), and setupAlphaCorrectionRegisterCombiners().
const osg::BitVector osg::DVRSimpleLUTShaderBase::LutModeFieldMask [static, inherited] |
(TypeTraits<BitVector>::One << DVRSimpleLUTShaderBase::LutModeFieldId)
Definition at line 100 of file OSGDVRSimpleLUTShaderBase.h.
Referenced by changed(), osg::DVRSimpleLUTShaderBase::copyFromBin(), osg::DVRSimpleLUTShaderBase::copyToBin(), osg::DVRSimpleLUTShaderBase::executeSyncImpl(), and osg::DVRSimpleLUTShaderBase::getBinSize().
const osg::BitVector osg::DVRSimpleLUTShaderBase::ActiveLutModeFieldMask [static, inherited] |
(TypeTraits<BitVector>::One << DVRSimpleLUTShaderBase::ActiveLutModeFieldId)
Definition at line 101 of file OSGDVRSimpleLUTShaderBase.h.
Referenced by osg::DVRSimpleLUTShaderBase::copyFromBin(), osg::DVRSimpleLUTShaderBase::copyToBin(), osg::DVRSimpleLUTShaderBase::executeSyncImpl(), and osg::DVRSimpleLUTShaderBase::getBinSize().
const osg::BitVector osg::DVRSimpleLUTShaderBase::MTInfluenceMask [static, inherited] |
(Inherited::MTInfluenceMask) |
(static_cast<BitVector>(0x0) << Inherited::NextFieldId)
Reimplemented from osg::DVRSimpleShaderBase.
Reimplemented in osg::DVRMtexLUTShaderBase.
Definition at line 104 of file OSGDVRSimpleLUTShaderBase.h.
Int8 osg::DVRSimpleLUTShaderBase::_sfLutMode [protected, inherited] |
Debug field to manually select a harware method
Definition at line 164 of file OSGDVRSimpleLUTShaderBase.h.
Referenced by osg::DVRSimpleLUTShaderBase::copyFromBin(), osg::DVRSimpleLUTShaderBase::copyToBin(), osg::DVRSimpleLUTShaderBase::editLutMode(), osg::DVRSimpleLUTShaderBase::editSFLutMode(), osg::DVRSimpleLUTShaderBase::executeSyncImpl(), osg::DVRSimpleLUTShaderBase::getBinSize(), osg::DVRSimpleLUTShaderBase::getLutMode(), osg::DVRSimpleLUTShaderBase::getSFLutMode(), and osg::DVRSimpleLUTShaderBase::setLutMode().
Int8 osg::DVRSimpleLUTShaderBase::_sfActiveLutMode [protected, inherited] |
READ ONLY - The currently active hardware method
Definition at line 165 of file OSGDVRSimpleLUTShaderBase.h.
Referenced by osg::DVRSimpleLUTShaderBase::copyFromBin(), osg::DVRSimpleLUTShaderBase::copyToBin(), osg::DVRSimpleLUTShaderBase::editActiveLutMode(), osg::DVRSimpleLUTShaderBase::editSFActiveLutMode(), osg::DVRSimpleLUTShaderBase::executeSyncImpl(), osg::DVRSimpleLUTShaderBase::getActiveLutMode(), osg::DVRSimpleLUTShaderBase::getBinSize(), osg::DVRSimpleLUTShaderBase::getSFActiveLutMode(), and osg::DVRSimpleLUTShaderBase::setActiveLutMode().
Int32 osg::DVRSimpleShader::m_nTextureId [protected, inherited] |
Definition at line 112 of file OSGDVRSimpleShader.h.
Referenced by activate(), osg::DVRSimpleShader::cleanup(), cleanup(), osg::DVRMtexLUTShader::cleanup(), osg::DVRSimpleShader::initialize(), initialize(), and osg::DVRMtexLUTShader::initialize().
const BitVector osg::FieldContainer::NextFieldMask [static, inherited] |
(TypeTraits<BitVector>::One << NextFieldId)
Definition at line 75 of file OSGFieldContainerImpl.h.
const bool osg::FieldContainer::isNodeCore = false [static, inherited] |
Reimplemented in osg::NodeCore.
Definition at line 181 of file OSGFieldContainerImpl.h.
UInt32 osg::FieldContainer::_shares [protected, inherited] |
Definition at line 199 of file OSGFieldContainerImpl.h.
1.6.1