24 #include <osg/Texture2D>
32 class DtMipmapGenerateOp;
63 virtual bool loadTextureFromFile(
const std::string& fileName )
override;
66 virtual bool loadTextureFromFile(
const std::string& fileName,
75 virtual bool allocateGpuStorage(
const std::string& key,
int width,
int height )
override;
79 virtual void setCpuBackingBuffer(
const uint8_t* pixels )
override;
84 virtual bool markCpuBackingBufferDirty()
override;
96 virtual bool enqueueSubRegion(
int x,
int y,
int width,
int height,
97 const uint8_t* rgbaPixels )
override;
100 virtual const std::string&
filename()
const override;
102 virtual float textureWidth()
const override;
105 virtual void scaleTexture(
int w,
int h )
override;
108 virtual bool getStipplePattern(
char** stipplePattern )
override;
111 virtual bool valid()
const override;
114 virtual DtVector4<float> color(
unsigned int x,
unsigned int y )
const override;
122 osg::Texture* texture()
const;
Definition: DtTextureInterface.h:109
Factory that creates DtGlTextureWrapper instances. Registered by vrvOsg at startup via DtTextureInter...
Definition: DtGlTextureWrapper.h:146
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
const char * filename
Definition: ioapi.h:38
int myWidth
Texture width in pixels.
Definition: DtGlTextureWrapper.h:131
DtTextureInterface implementation that owns a raw GLuint texture handle.
Definition: DtGlTextureWrapper.h:46
std::unique_ptr< DtMipmapGenerateOp > myMipmapOp
Persistent mipmap-gen op; registered on the arena.
Definition: DtGlTextureWrapper.h:141
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:26
DtDe & myDe
Engine context; not owned.
Definition: DtGlTextureWrapper.h:128
Contains makVrv::DtTextureInterface class.
std::shared_ptr< std::atomic< bool > > myMipmapDirty
Shared dirty flag for deferred mipmap generation.
Definition: DtGlTextureWrapper.h:140
Contains makVrv::DtFileCache class.
const uint8_t * myCpuBackingBuffer
Non-owning pointer to the CPU pixel mirror; may be null.
Definition: DtGlTextureWrapper.h:134
osg::ref_ptr< osg::Texture2D > myOsgTexture
Scenegraph face. Declared as osg::Texture2D* here; the concrete type (DtGlOwnedTexture2D) is private ...
Definition: DtGlTextureWrapper.h:138
Definition: DtFileCache.h:45
Top-level pre-draw osg::Operation registered on the OSG viewer that coordinates all GPU work requirin...
Definition: DtGpuArena.h:79
std::string myFilename
Logical key set by allocateGpuStorage().
Definition: DtGlTextureWrapper.h:130
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
int myHeight
Texture height in pixels.
Definition: DtGlTextureWrapper.h:132
std::shared_ptr< GLuint > myGlHandle
Shared GL texture name; zero-initialised until the allocation op runs.
Definition: DtGlTextureWrapper.h:133
DtGpuArena * myGpuArena
GPU arena; not owned.
Definition: DtGlTextureWrapper.h:129