OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    OpenGl_Texture Class Reference

    Texture resource. More...

    #include <OpenGl_Texture.hxx>

    Inheritance diagram for OpenGl_Texture:

    Public Member Functions

     OpenGl_Texture (const TCollection_AsciiString &theResourceId=TCollection_AsciiString::EmptyString(), const occ::handle< Graphic3d_TextureParams > &theParams=occ::handle< Graphic3d_TextureParams >())
     Create uninitialized texture.
     ~OpenGl_Texture () override
     Destroy object.
    virtual bool IsValid () const
    unsigned int GetTarget () const
    const NCollection_Vec3< int > & Size () const
     Return texture dimensions (0 LOD).
    int SizeX () const
     Return texture width (0 LOD).
    int SizeY () const
     Return texture height (0 LOD).
    int SizeZ () const
     Return texture depth (0 LOD).
    unsigned int TextureId () const
    unsigned int GetFormat () const
    int SizedFormat () const
    bool IsAlpha () const
     Return true for GL_RED and GL_ALPHA formats.
    void SetAlpha (const bool theValue)
     Setup to interpret the format as Alpha by Shader Manager (should be GL_ALPHA within compatible context or GL_RED otherwise).
    bool IsTopDown () const
     Return if 2D surface is defined top-down (TRUE) or bottom-up (FALSE). Normally set from Image_PixMap::IsTopDown() within texture initialization.
    void SetTopDown (bool theIsTopDown)
     Set if 2D surface is defined top-down (TRUE) or bottom-up (FALSE).
    bool Create (const occ::handle< OpenGl_Context > &theCtx)
     Creates Texture id if not yet generated. Data should be initialized by another method.
    void Release (OpenGl_Context *theCtx) override
     Destroy object - will release GPU memory if any.
    const occ::handle< OpenGl_Sampler > & Sampler () const
     Return texture sampler.
    void SetSampler (const occ::handle< OpenGl_Sampler > &theSampler)
     Set texture sampler.
    bool InitSamplerObject (const occ::handle< OpenGl_Context > &theCtx)
     Initialize the Sampler Object (as OpenGL object).
    void Bind (const occ::handle< OpenGl_Context > &theCtx) const
     Bind this Texture to the unit specified in sampler parameters. Also binds Sampler Object if it is allocated.
    void Unbind (const occ::handle< OpenGl_Context > &theCtx) const
     Unbind texture from the unit specified in sampler parameters. Also unbinds Sampler Object if it is allocated.
    void Bind (const occ::handle< OpenGl_Context > &theCtx, const Graphic3d_TextureUnit theTextureUnit) const
     Bind this Texture to specified unit. Also binds Sampler Object if it is allocated.
    void Unbind (const occ::handle< OpenGl_Context > &theCtx, const Graphic3d_TextureUnit theTextureUnit) const
     Unbind texture from specified unit. Also unbinds Sampler Object if it is allocated.
    size_t Revision () const
     Revision of associated data source.
    void SetRevision (const size_t theRevision)
     Set revision of associated data source.
    bool Init (const occ::handle< OpenGl_Context > &theCtx, const Image_PixMap &theImage, const Graphic3d_TypeOfTexture theType, const bool theIsColorMap)
     Notice that texture will be unbound after this call.
    bool Init (const occ::handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const NCollection_Vec3< int > &theSizeXYZ, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=nullptr)
     Initialize the texture with specified format, size and texture type. If theImage is empty the texture data will contain trash. Notice that texture will be unbound after this call.
    bool Init (const occ::handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const NCollection_Vec2< int > &theSizeXY, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=nullptr)
     Initialize the 2D texture with specified format, size and texture type. If theImage is empty the texture data will contain trash. Notice that texture will be unbound after this call.
    bool Init (const occ::handle< OpenGl_Context > &theCtx, const occ::handle< Graphic3d_TextureRoot > &theTextureMap)
     Initialize the texture with Graphic3d_TextureMap. It is an universal way to initialize. Suitable initialization method will be chosen.
    bool GenerateMipmaps (const occ::handle< OpenGl_Context > &theCtx)
     Generate mipmaps.
    bool InitCompressed (const occ::handle< OpenGl_Context > &theCtx, const Image_CompressedPixMap &theImage, const bool theIsColorMap)
     Initialize the texture with Image_CompressedPixMap.
    bool Init2DMultisample (const occ::handle< OpenGl_Context > &theCtx, const int theNbSamples, const int theTextFormat, const int theSizeX, const int theSizeY)
     Initialize the 2D multisampling texture using glTexImage2DMultisample().
    bool InitRectangle (const occ::handle< OpenGl_Context > &theCtx, const int theSizeX, const int theSizeY, const OpenGl_TextureFormat &theFormat)
     Allocates texture rectangle with specified format and size.
    bool Init3D (const occ::handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const NCollection_Vec3< int > &theSizeXYZ, const void *thePixels)
     Initializes 3D texture rectangle with specified format and size.
    bool HasMipmaps () const
    int MaxMipmapLevel () const
     Return upper mipmap level index (0 means no mipmaps).
    int NbSamples () const
     Return number of MSAA samples.
    size_t EstimatedDataSize () const override
     Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.
    virtual bool IsPointSprite () const
     Returns TRUE for point sprite texture.
    bool ImageDump (Image_PixMap &theImage, const occ::handle< OpenGl_Context > &theCtx, Graphic3d_TextureUnit theTexUnit, int theLevel=0, int theCubeSide=0) const
     Auxiliary method for making an image dump from texture data.
    separate parameters bool Init (const occ::handle< OpenGl_Context > &theCtx, const int theTextFormat, const unsigned int thePixelFormat, const unsigned int theDataType, const int theSizeX, const int theSizeY, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=nullptr)
    specified bool Init (const occ::handle< OpenGl_Context > &theCtx, const Image_PixMap &theImage, const Graphic3d_TypeOfTexture theType)
    separate parameters bool Init3D (const occ::handle< OpenGl_Context > &theCtx, const int theTextFormat, const unsigned int thePixelFormat, const unsigned int theDataType, const int theSizeX, const int theSizeY, const int theSizeZ, const void *thePixels)
    bool InitCubeMap (const occ::handle< OpenGl_Context > &theCtx, const occ::handle< Graphic3d_CubeMap > &theCubeMap, size_t theSize, Image_Format theFormat, bool theToGenMipmap, bool theIsColorMap)
     Initializes 6 sides of cubemap. If theCubeMap is not NULL then size and format will be taken from it and corresponding arguments will be ignored. Otherwise this parameters will be taken from arguments.
    Public Member Functions inherited from OpenGl_NamedResource
     OpenGl_NamedResource (const TCollection_AsciiString &theId)
     Empty constructor.
    const TCollection_AsciiStringResourceId () const
     Return resource name.
    Public Member Functions inherited from OpenGl_Resource
     OpenGl_Resource ()
     Empty constructor.
     ~OpenGl_Resource () override
     Destructor. Inheritors should call Clean (NULL) within it.
    virtual void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Static Public Member Functions

    static size_t PixelSizeOfPixelFormat (int theInternalFormat)
     Return pixel size of pixel format in bytes. Note that this method considers that OpenGL natively supports this pixel format, which might be not the case - in the latter case, actual pixel size might differ!
    static instead bool GetDataFormat (const occ::handle< OpenGl_Context > &theCtx, const Image_Format theFormat, int &theTextFormat, unsigned int &thePixelFormat, unsigned int &theDataType)
    static instead bool GetDataFormat (const occ::handle< OpenGl_Context > &theCtx, const Image_PixMap &theData, int &theTextFormat, unsigned int &thePixelFormat, unsigned int &theDataType)
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.

    Static Public Attributes

    static const unsigned int NO_TEXTURE = 0
     Helpful constants.

    Protected Member Functions

    void applyDefaultSamplerParams (const occ::handle< OpenGl_Context > &theCtx)
     Apply default sampler parameters after texture creation.

    Protected Attributes

    occ::handle< OpenGl_SamplermySampler
     texture sampler
    size_t myRevision
     revision of associated data source
    unsigned int myTextureId
     GL resource ID.
    unsigned int myTarget
     GL_TEXTURE_1D/GL_TEXTURE_2D/GL_TEXTURE_3D.
    NCollection_Vec3< int > mySize
     texture width x height x depth
    unsigned int myTextFormat
     texture format - GL_RGB, GL_RGBA,...
    int mySizedFormat
     internal (sized) texture format
    int myNbSamples
     number of MSAA samples
    int myMaxMipLevel
     upper mipmap level index (0 means no mipmaps)
    bool myIsAlpha
     indicates alpha format
    bool myIsTopDown
     indicates if 2D surface is defined top-down (TRUE) or bottom-up (FALSE)
    Protected Attributes inherited from OpenGl_NamedResource
    TCollection_AsciiString myResourceId
     resource name

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.

    Detailed Description

    Texture resource.

    Constructor & Destructor Documentation

    ◆ OpenGl_Texture()

    OpenGl_Texture::OpenGl_Texture ( const TCollection_AsciiString & theResourceId = TCollection_AsciiString::EmptyString(),
    const occ::handle< Graphic3d_TextureParams > & theParams = occ::handleGraphic3d_TextureParams >() )

    Create uninitialized texture.

    ◆ ~OpenGl_Texture()

    OpenGl_Texture::~OpenGl_Texture ( )
    override

    Destroy object.

    Member Function Documentation

    ◆ applyDefaultSamplerParams()

    void OpenGl_Texture::applyDefaultSamplerParams ( const occ::handle< OpenGl_Context > & theCtx)
    protected

    Apply default sampler parameters after texture creation.

    ◆ Bind() [1/2]

    void OpenGl_Texture::Bind ( const occ::handle< OpenGl_Context > & theCtx) const
    inline

    Bind this Texture to the unit specified in sampler parameters. Also binds Sampler Object if it is allocated.

    ◆ Bind() [2/2]

    void OpenGl_Texture::Bind ( const occ::handle< OpenGl_Context > & theCtx,
    const Graphic3d_TextureUnit theTextureUnit ) const

    Bind this Texture to specified unit. Also binds Sampler Object if it is allocated.

    ◆ Create()

    bool OpenGl_Texture::Create ( const occ::handle< OpenGl_Context > & theCtx)

    Creates Texture id if not yet generated. Data should be initialized by another method.

    ◆ EstimatedDataSize()

    size_t OpenGl_Texture::EstimatedDataSize ( ) const
    overridevirtual

    Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules.

    Implements OpenGl_Resource.

    ◆ GenerateMipmaps()

    bool OpenGl_Texture::GenerateMipmaps ( const occ::handle< OpenGl_Context > & theCtx)

    Generate mipmaps.

    ◆ GetDataFormat() [1/2]

    instead bool OpenGl_Texture::GetDataFormat ( const occ::handle< OpenGl_Context > & theCtx,
    const Image_Format theFormat,
    int & theTextFormat,
    unsigned int & thePixelFormat,
    unsigned int & theDataType )
    inlinestatic
    Deprecated
    ("Deprecated method, OpenGl_TextureFormat::FindFormat() should be used "

    ◆ GetDataFormat() [2/2]

    instead bool OpenGl_Texture::GetDataFormat ( const occ::handle< OpenGl_Context > & theCtx,
    const Image_PixMap & theData,
    int & theTextFormat,
    unsigned int & thePixelFormat,
    unsigned int & theDataType )
    inlinestatic
    Deprecated
    ("Deprecated method, OpenGl_TextureFormat::FindFormat() should be used "

    ◆ GetFormat()

    unsigned int OpenGl_Texture::GetFormat ( ) const
    inline
    Returns
    texture format (not sized)

    ◆ GetTarget()

    unsigned int OpenGl_Texture::GetTarget ( ) const
    inline
    Returns
    target to which the texture is bound (GL_TEXTURE_1D, GL_TEXTURE_2D)

    ◆ HasMipmaps()

    bool OpenGl_Texture::HasMipmaps ( ) const
    inline
    Returns
    true if texture was generated within mipmaps

    ◆ ImageDump()

    bool OpenGl_Texture::ImageDump ( Image_PixMap & theImage,
    const occ::handle< OpenGl_Context > & theCtx,
    Graphic3d_TextureUnit theTexUnit,
    int theLevel = 0,
    int theCubeSide = 0 ) const

    Auxiliary method for making an image dump from texture data.

    Parameters
    [out]theImageresult image data (will be overridden)
    [in]theCtxactive GL context
    [in]theTexUnittexture slot to use
    [in]theLevelmipmap level to dump
    [in]theCubeSidecubemap side to dump within [0, 5] range
    Returns
    FALSE on error

    ◆ Init() [1/6]

    specified bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const Image_PixMap & theImage,
    const Graphic3d_TypeOfTexture theType )
    inline
    Deprecated
    ("Deprecated method, theIsColorMap parameter should be explicitly "

    ◆ Init() [2/6]

    bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const Image_PixMap & theImage,
    const Graphic3d_TypeOfTexture theType,
    const bool theIsColorMap )

    Notice that texture will be unbound after this call.

    ◆ Init() [3/6]

    separate parameters bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const int theTextFormat,
    const unsigned int thePixelFormat,
    const unsigned int theDataType,
    const int theSizeX,
    const int theSizeY,
    const Graphic3d_TypeOfTexture theType,
    const Image_PixMap * theImage = nullptr )
    inline
    Deprecated
    ("Deprecated method, OpenGl_TextureFormat should be passed instead of "

    ◆ Init() [4/6]

    bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const occ::handle< Graphic3d_TextureRoot > & theTextureMap )

    Initialize the texture with Graphic3d_TextureMap. It is an universal way to initialize. Suitable initialization method will be chosen.

    ◆ Init() [5/6]

    bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const OpenGl_TextureFormat & theFormat,
    const NCollection_Vec2< int > & theSizeXY,
    const Graphic3d_TypeOfTexture theType,
    const Image_PixMap * theImage = nullptr )
    inline

    Initialize the 2D texture with specified format, size and texture type. If theImage is empty the texture data will contain trash. Notice that texture will be unbound after this call.

    ◆ Init() [6/6]

    bool OpenGl_Texture::Init ( const occ::handle< OpenGl_Context > & theCtx,
    const OpenGl_TextureFormat & theFormat,
    const NCollection_Vec3< int > & theSizeXYZ,
    const Graphic3d_TypeOfTexture theType,
    const Image_PixMap * theImage = nullptr )

    Initialize the texture with specified format, size and texture type. If theImage is empty the texture data will contain trash. Notice that texture will be unbound after this call.

    ◆ Init2DMultisample()

    bool OpenGl_Texture::Init2DMultisample ( const occ::handle< OpenGl_Context > & theCtx,
    const int theNbSamples,
    const int theTextFormat,
    const int theSizeX,
    const int theSizeY )

    Initialize the 2D multisampling texture using glTexImage2DMultisample().

    ◆ Init3D() [1/2]

    separate parameters bool OpenGl_Texture::Init3D ( const occ::handle< OpenGl_Context > & theCtx,
    const int theTextFormat,
    const unsigned int thePixelFormat,
    const unsigned int theDataType,
    const int theSizeX,
    const int theSizeY,
    const int theSizeZ,
    const void * thePixels )
    inline
    Deprecated
    ("Deprecated method, OpenGl_TextureFormat should be passed instead of "

    ◆ Init3D() [2/2]

    bool OpenGl_Texture::Init3D ( const occ::handle< OpenGl_Context > & theCtx,
    const OpenGl_TextureFormat & theFormat,
    const NCollection_Vec3< int > & theSizeXYZ,
    const void * thePixels )

    Initializes 3D texture rectangle with specified format and size.

    ◆ InitCompressed()

    bool OpenGl_Texture::InitCompressed ( const occ::handle< OpenGl_Context > & theCtx,
    const Image_CompressedPixMap & theImage,
    const bool theIsColorMap )

    Initialize the texture with Image_CompressedPixMap.

    ◆ InitCubeMap()

    bool OpenGl_Texture::InitCubeMap ( const occ::handle< OpenGl_Context > & theCtx,
    const occ::handle< Graphic3d_CubeMap > & theCubeMap,
    size_t theSize,
    Image_Format theFormat,
    bool theToGenMipmap,
    bool theIsColorMap )

    Initializes 6 sides of cubemap. If theCubeMap is not NULL then size and format will be taken from it and corresponding arguments will be ignored. Otherwise this parameters will be taken from arguments.

    Parameters
    [in]theCtxactive OpenGL context
    [in]theCubeMapcubemap definition, can be NULL
    [in]theSizecubemap dimensions
    [in]theFormatimage format
    [in]theToGenMipmapflag to generate mipmaped cubemap
    [in]theIsColorMapflag indicating cubemap storing color values

    ◆ InitRectangle()

    bool OpenGl_Texture::InitRectangle ( const occ::handle< OpenGl_Context > & theCtx,
    const int theSizeX,
    const int theSizeY,
    const OpenGl_TextureFormat & theFormat )

    Allocates texture rectangle with specified format and size.

    Note
    Texture data is not initialized (will contain trash).

    ◆ InitSamplerObject()

    bool OpenGl_Texture::InitSamplerObject ( const occ::handle< OpenGl_Context > & theCtx)

    Initialize the Sampler Object (as OpenGL object).

    Parameters
    theCtxcurrently bound OpenGL context

    ◆ IsAlpha()

    bool OpenGl_Texture::IsAlpha ( ) const
    inline

    Return true for GL_RED and GL_ALPHA formats.

    ◆ IsPointSprite()

    virtual bool OpenGl_Texture::IsPointSprite ( ) const
    inlinevirtual

    Returns TRUE for point sprite texture.

    Reimplemented in OpenGl_PointSprite.

    ◆ IsTopDown()

    bool OpenGl_Texture::IsTopDown ( ) const
    inline

    Return if 2D surface is defined top-down (TRUE) or bottom-up (FALSE). Normally set from Image_PixMap::IsTopDown() within texture initialization.

    ◆ IsValid()

    virtual bool OpenGl_Texture::IsValid ( ) const
    inlinevirtual
    Returns
    true if current object was initialized

    Reimplemented in OpenGl_PointSprite.

    ◆ MaxMipmapLevel()

    int OpenGl_Texture::MaxMipmapLevel ( ) const
    inline

    Return upper mipmap level index (0 means no mipmaps).

    ◆ NbSamples()

    int OpenGl_Texture::NbSamples ( ) const
    inline

    Return number of MSAA samples.

    ◆ PixelSizeOfPixelFormat()

    size_t OpenGl_Texture::PixelSizeOfPixelFormat ( int theInternalFormat)
    static

    Return pixel size of pixel format in bytes. Note that this method considers that OpenGL natively supports this pixel format, which might be not the case - in the latter case, actual pixel size might differ!

    ◆ Release()

    void OpenGl_Texture::Release ( OpenGl_Context * theCtx)
    overridevirtual

    Destroy object - will release GPU memory if any.

    Implements OpenGl_Resource.

    ◆ Revision()

    size_t OpenGl_Texture::Revision ( ) const
    inline

    Revision of associated data source.

    ◆ Sampler()

    const occ::handle< OpenGl_Sampler > & OpenGl_Texture::Sampler ( ) const
    inline

    Return texture sampler.

    ◆ SetAlpha()

    void OpenGl_Texture::SetAlpha ( const bool theValue)
    inline

    Setup to interpret the format as Alpha by Shader Manager (should be GL_ALPHA within compatible context or GL_RED otherwise).

    ◆ SetRevision()

    void OpenGl_Texture::SetRevision ( const size_t theRevision)
    inline

    Set revision of associated data source.

    ◆ SetSampler()

    void OpenGl_Texture::SetSampler ( const occ::handle< OpenGl_Sampler > & theSampler)
    inline

    Set texture sampler.

    ◆ SetTopDown()

    void OpenGl_Texture::SetTopDown ( bool theIsTopDown)
    inline

    Set if 2D surface is defined top-down (TRUE) or bottom-up (FALSE).

    ◆ Size()

    const NCollection_Vec3< int > & OpenGl_Texture::Size ( ) const
    inline

    Return texture dimensions (0 LOD).

    ◆ SizedFormat()

    int OpenGl_Texture::SizedFormat ( ) const
    inline
    Returns
    texture format (sized)

    ◆ SizeX()

    int OpenGl_Texture::SizeX ( ) const
    inline

    Return texture width (0 LOD).

    ◆ SizeY()

    int OpenGl_Texture::SizeY ( ) const
    inline

    Return texture height (0 LOD).

    ◆ SizeZ()

    int OpenGl_Texture::SizeZ ( ) const
    inline

    Return texture depth (0 LOD).

    ◆ TextureId()

    unsigned int OpenGl_Texture::TextureId ( ) const
    inline
    Returns
    texture ID

    ◆ Unbind() [1/2]

    void OpenGl_Texture::Unbind ( const occ::handle< OpenGl_Context > & theCtx) const
    inline

    Unbind texture from the unit specified in sampler parameters. Also unbinds Sampler Object if it is allocated.

    ◆ Unbind() [2/2]

    void OpenGl_Texture::Unbind ( const occ::handle< OpenGl_Context > & theCtx,
    const Graphic3d_TextureUnit theTextureUnit ) const

    Unbind texture from specified unit. Also unbinds Sampler Object if it is allocated.

    Field Documentation

    ◆ myIsAlpha

    bool OpenGl_Texture::myIsAlpha
    protected

    indicates alpha format

    ◆ myIsTopDown

    bool OpenGl_Texture::myIsTopDown
    protected

    indicates if 2D surface is defined top-down (TRUE) or bottom-up (FALSE)

    ◆ myMaxMipLevel

    int OpenGl_Texture::myMaxMipLevel
    protected

    upper mipmap level index (0 means no mipmaps)

    ◆ myNbSamples

    int OpenGl_Texture::myNbSamples
    protected

    number of MSAA samples

    ◆ myRevision

    size_t OpenGl_Texture::myRevision
    protected

    revision of associated data source

    ◆ mySampler

    occ::handle<OpenGl_Sampler> OpenGl_Texture::mySampler
    protected

    texture sampler

    ◆ mySize

    NCollection_Vec3<int> OpenGl_Texture::mySize
    protected

    texture width x height x depth

    ◆ mySizedFormat

    int OpenGl_Texture::mySizedFormat
    protected

    internal (sized) texture format

    ◆ myTarget

    unsigned int OpenGl_Texture::myTarget
    protected

    GL_TEXTURE_1D/GL_TEXTURE_2D/GL_TEXTURE_3D.

    ◆ myTextFormat

    unsigned int OpenGl_Texture::myTextFormat
    protected

    texture format - GL_RGB, GL_RGBA,...

    ◆ myTextureId

    unsigned int OpenGl_Texture::myTextureId
    protected

    GL resource ID.

    ◆ NO_TEXTURE

    const unsigned int OpenGl_Texture::NO_TEXTURE = 0
    static

    Helpful constants.


    The documentation for this class was generated from the following file: