Point sprite resource. On modern hardware it will be texture with extra parameters. On ancient hardware sprites will be drawn using bitmaps.
More...
|
| OpenGl_PointSprite (const TCollection_AsciiString &theResourceId) |
| Create uninitialized resource. More...
|
|
virtual | ~OpenGl_PointSprite () |
| Destroy object. More...
|
|
virtual void | Release (OpenGl_Context *theCtx) override |
| Destroy object - will release GPU memory if any. More...
|
|
virtual bool | IsPointSprite () const override |
| Returns TRUE for point sprite texture. More...
|
|
virtual bool | IsValid () const override |
|
Standard_Boolean | IsDisplayList () const |
|
void | DrawBitmap (const Handle< OpenGl_Context > &theCtx) const |
| Draw sprite using glBitmap. Please call glRasterPos3fv() before to setup sprite position. More...
|
|
void | SetDisplayList (const Handle< OpenGl_Context > &theCtx, const GLuint theBitmapList) |
| Initialize point sprite as display list. More...
|
|
| OpenGl_Texture (const TCollection_AsciiString &theResourceId=TCollection_AsciiString(), const Handle< Graphic3d_TextureParams > &theParams=Handle< Graphic3d_TextureParams >()) |
| Create uninitialized texture. More...
|
|
virtual | ~OpenGl_Texture () |
| Destroy object. More...
|
|
unsigned int | GetTarget () const |
|
const Graphic3d_Vec3i & | Size () const |
| Return texture dimensions (0 LOD) More...
|
|
Standard_Integer | SizeX () const |
| Return texture width (0 LOD) More...
|
|
Standard_Integer | SizeY () const |
| Return texture height (0 LOD) More...
|
|
Standard_Integer | SizeZ () const |
| Return texture depth (0 LOD) More...
|
|
unsigned int | TextureId () const |
|
unsigned int | GetFormat () const |
|
Standard_Integer | SizedFormat () const |
|
bool | IsAlpha () const |
| Return true for GL_RED and GL_ALPHA formats. More...
|
|
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). More...
|
|
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. More...
|
|
void | SetTopDown (bool theIsTopDown) |
| Set if 2D surface is defined top-down (TRUE) or bottom-up (FALSE). More...
|
|
bool | Create (const Handle< OpenGl_Context > &theCtx) |
| Creates Texture id if not yet generated. Data should be initialized by another method. More...
|
|
const Handle< OpenGl_Sampler > & | Sampler () const |
| Return texture sampler. More...
|
|
void | SetSampler (const Handle< OpenGl_Sampler > &theSampler) |
| Set texture sampler. More...
|
|
bool | InitSamplerObject (const Handle< OpenGl_Context > &theCtx) |
| Initialize the Sampler Object (as OpenGL object). More...
|
|
void | Bind (const Handle< OpenGl_Context > &theCtx) const |
| Bind this Texture to the unit specified in sampler parameters. Also binds Sampler Object if it is allocated. More...
|
|
void | Unbind (const Handle< OpenGl_Context > &theCtx) const |
| Unbind texture from the unit specified in sampler parameters. Also unbinds Sampler Object if it is allocated. More...
|
|
void | Bind (const Handle< OpenGl_Context > &theCtx, const Graphic3d_TextureUnit theTextureUnit) const |
| Bind this Texture to specified unit. Also binds Sampler Object if it is allocated. More...
|
|
void | Unbind (const Handle< OpenGl_Context > &theCtx, const Graphic3d_TextureUnit theTextureUnit) const |
| Unbind texture from specified unit. Also unbinds Sampler Object if it is allocated. More...
|
|
Standard_Size | Revision () const |
| Revision of associated data source. More...
|
|
void | SetRevision (const Standard_Size theRevision) |
| Set revision of associated data source. More...
|
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const Image_PixMap &theImage, const Graphic3d_TypeOfTexture theType, const Standard_Boolean theIsColorMap) |
| Notice that texture will be unbound after this call. More...
|
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const Graphic3d_Vec3i &theSizeXYZ, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=NULL) |
| 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. More...
|
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const Graphic3d_Vec2i &theSizeXY, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=NULL) |
| 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. More...
|
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const Handle< Graphic3d_TextureRoot > &theTextureMap) |
| Initialize the texture with Graphic3d_TextureMap. It is an universal way to initialize. Suitable initialization method will be chosen. More...
|
|
bool | GenerateMipmaps (const Handle< OpenGl_Context > &theCtx) |
| Generate mipmaps. More...
|
|
bool | InitCompressed (const Handle< OpenGl_Context > &theCtx, const Image_CompressedPixMap &theImage, const Standard_Boolean theIsColorMap) |
| Initialize the texture with Image_CompressedPixMap. More...
|
|
bool | Init2DMultisample (const Handle< OpenGl_Context > &theCtx, const Standard_Integer theNbSamples, const Standard_Integer theTextFormat, const Standard_Integer theSizeX, const Standard_Integer theSizeY) |
| Initialize the 2D multisampling texture using glTexImage2DMultisample(). More...
|
|
bool | InitRectangle (const Handle< OpenGl_Context > &theCtx, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const OpenGl_TextureFormat &theFormat) |
| Allocates texture rectangle with specified format and size. More...
|
|
bool | Init3D (const Handle< OpenGl_Context > &theCtx, const OpenGl_TextureFormat &theFormat, const Graphic3d_Vec3i &theSizeXYZ, const void *thePixels) |
| Initializes 3D texture rectangle with specified format and size. More...
|
|
Standard_Boolean | HasMipmaps () const |
|
Standard_Integer | MaxMipmapLevel () const |
| Return upper mipmap level index (0 means no mipmaps). More...
|
|
Standard_Integer | NbSamples () const |
| Return number of MSAA samples. More...
|
|
virtual Standard_Size | EstimatedDataSize () const override |
| Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules. More...
|
|
bool | ImageDump (Image_PixMap &theImage, const Handle< OpenGl_Context > &theCtx, Graphic3d_TextureUnit theTexUnit, Standard_Integer theLevel=0, Standard_Integer theCubeSide=0) const |
| Auxiliary method for making an image dump from texture data. More...
|
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const Standard_Integer theTextFormat, const unsigned int thePixelFormat, const unsigned int theDataType, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Graphic3d_TypeOfTexture theType, const Image_PixMap *theImage=NULL) |
|
bool | Init (const Handle< OpenGl_Context > &theCtx, const Image_PixMap &theImage, const Graphic3d_TypeOfTexture theType) |
|
bool | Init3D (const Handle< OpenGl_Context > &theCtx, const Standard_Integer theTextFormat, const unsigned int thePixelFormat, const unsigned int theDataType, const Standard_Integer theSizeX, const Standard_Integer theSizeY, const Standard_Integer theSizeZ, const void *thePixels) |
|
bool | InitCubeMap (const Handle< OpenGl_Context > &theCtx, const Handle< Graphic3d_CubeMap > &theCubeMap, Standard_Size theSize, Image_Format theFormat, Standard_Boolean theToGenMipmap, Standard_Boolean 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. More...
|
|
| OpenGl_NamedResource (const TCollection_AsciiString &theId) |
| Empty constructor. More...
|
|
const TCollection_AsciiString & | ResourceId () const |
| Return resource name. More...
|
|
| OpenGl_Resource () |
| Empty constructor. More...
|
|
virtual | ~OpenGl_Resource () |
| Destructor. Inheritors should call Clean (NULL) within it. More...
|
|
virtual void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
| Dumps the content of me into the stream. More...
|
|
Public Member Functions inherited from Standard_Transient |
| Standard_Transient () |
| Empty constructor. More...
|
|
| Standard_Transient (const Standard_Transient &) |
| Copy constructor – does nothing. More...
|
|
Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More...
|
|
virtual | ~Standard_Transient () |
| Destructor must be virtual. More...
|
|
virtual void | Delete () const |
| Memory deallocator for transient classes. More...
|
|
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. More...
|
|
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. More...
|
|
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More...
|
|
Standard_Boolean | 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. More...
|
|
Standard_Boolean | IsKind (const Standard_CString 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. More...
|
|
Standard_Transient * | This () 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. More...
|
|
Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More...
|
|
void | IncrementRefCounter () const |
| Increments the reference counter of this object. More...
|
|
Standard_Integer | DecrementRefCounter () const |
| Decrements the reference counter of this object; returns the decremented value. More...
|
|
Point sprite resource. On modern hardware it will be texture with extra parameters. On ancient hardware sprites will be drawn using bitmaps.