20 #if !defined(__MITSUBA_HW_GLTEXTURE_H_)
21 #define __MITSUBA_HW_GLTEXTURE_H_
63 void bind(
int textureUnit = 0,
int textureIndex = 0)
const;
125 void lookupGLConstants();
128 void configureTexture();
136 mutable
bool m_needsUpdate;
virtual void refresh()=0
Refresh (re-upload) the texture.
General-purpose bitmap class with read and write support for several common file formats.
Definition: bitmap.h:50
virtual void cleanup()=0
Free the texture from GPU memory.
virtual void bind(int textureUnit=0, int textureIndex=0) const =0
Bind the texture and enable texturing.
virtual Color3 getPixel(int x, int y) const =0
Assuming that this is a 2D RGB framebuffer, read a single pixel from the GPU.
virtual void releaseTarget()=0
Deactivate the render target.
RGB color data type.
Definition: spectrum.h:612
virtual void download(Bitmap *bitmap=NULL)=0
OpenGL-based GPUTexture implementation.
Definition: gltexture.h:31
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
virtual void activateSide(int side)=0
Activate a certain face of a cube map as render target.
virtual void clear()=0
Clear (assuming that this is a render buffer)
virtual void setTargetRegion(const Point2i &offset, const Vector2i &size)=0
Restrict rendering to a sub-region of the texture.
A data structure for 1/2/3D and cube texture mapping. Also has optional render-to-texture functionali...
Definition: gputexture.h:32
virtual void init()=0
Upload the texture.
virtual void blit(GPUTexture *target, int what) const =0
Blit a render buffer into another render buffer.
virtual void unbind() const =0
Unbind the texture and disable texturing.
virtual void activateTarget()=0
Activate the render target.