32 #ifndef CopyTexSubImage_INCLUDE_ONCE 33 #define CopyTexSubImage_INCLUDE_ONCE 63 VL_DEBUG_SET_OBJECT_NAME()
113 VL_DEBUG_SET_OBJECT_NAME()
132 int level()
const {
return mLevel; }
134 int x()
const {
return mX; }
135 int y()
const {
return mY; }
136 int width()
const {
return mWidth; }
147 VL_CHECK(xoffset()+width() <= texture()->width())
149 #if defined(VL_OPENGL) 151 if (!texture()->isDepthTexture())
153 glGetIntegerv(GL_READ_BUFFER, &read_buffer);
VL_CHECK_OGL()
162 #if defined(VL_OPENGL) 187 VL_DEBUG_SET_OBJECT_NAME()
213 int level()
const {
return mLevel; }
216 int x()
const {
return mX; }
217 int y()
const {
return mY; }
218 int width()
const {
return mWidth; }
231 VL_CHECK(xoffset()+width() <= texture()->width())
232 VL_CHECK(yoffset()+height() <= texture()->height())
234 #if defined(VL_OPENGL) 236 if (!texture()->isDepthTexture())
238 glGetIntegerv(GL_READ_BUFFER, &read_buffer);
VL_CHECK_OGL()
252 bind_target = GL_TEXTURE_CUBE_MAP;
255 bind_target = target();
258 glBindTexture( bind_target, texture()->handle() );
VL_CHECK_OGL()
259 glCopyTexSubImage2D( target(), level(), xoffset(), yoffset(), x(), y(), width(), height() );
VL_CHECK_OGL()
262 #if defined(VL_OPENGL) 290 VL_DEBUG_SET_OBJECT_NAME()
316 int level()
const {
return mLevel; }
320 int x()
const {
return mX; }
321 int y()
const {
return mY; }
322 int width()
const {
return mWidth; }
338 VL_CHECK(xoffset()+width() <= texture()->width())
339 VL_CHECK(yoffset()+height() <= texture()->height())
340 VL_CHECK(zoffset() < texture()->depth())
342 #if defined(VL_OPENGL) 344 if (!texture()->isDepthTexture())
346 glGetIntegerv(GL_READ_BUFFER, &read_buffer);
VL_CHECK_OGL()
351 glBindTexture(texture()->dimension(), texture()->handle() );
VL_CHECK_OGL()
352 VL_glCopyTexSubImage3D(texture()->dimension(), level(), xoffset(), yoffset(), zoffset(), x(), y(), width(), height());
VL_CHECK_OGL()
353 glBindTexture(texture()->dimension(), 0 );
355 #if defined(VL_OPENGL) 363 Log::error(
"CopyTexSubImage3D requires OpenGL 1.2!\n");
void setYOffset(int yoffset)
virtual void copyPixels()
Copies the pixels from the specified read buffer to the specified texture.
void setTarget(ETex2DTarget target)
const Texture * texture() const
Wrapper class of the OpenGL function glCopyTexSubImage.
virtual bool onRendererStarted(const RendererAbstract *)
Reimplement to react to this event.
The RenderingAbstract class is the base of all the rendering related sub-classes. ...
void setXOffset(int xoffset)
void setXOffset(int xoffset)
CopyTexSubImage1D(int level, int xoffset, int x, int y, int width, Texture *texture=NULL, EReadDrawBuffer read_buffer=RDB_BACK_LEFT)
void setTexture(Texture *tex)
EReadDrawBuffer mReadBuffer
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
const Texture * texture() const
Wraps an OpenGL texture object representing and managing all the supported texture types...
virtual void copyPixels()=0
Copies the pixels from the specified read buffer to the specified texture.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
virtual void copyPixels()
Copies the pixels from the specified read buffer to the specified texture.
void setYOffset(int yoffset)
virtual bool onRendererFinished(const RendererAbstract *)
Reimplement to react to this event.
virtual bool onRenderingFinished(const RenderingAbstract *)
Reimplement to react to this event.
Visualization Library main namespace.
An abstract class used to react to rendering events.
virtual bool onRenderingStarted(const RenderingAbstract *)
Reimplement to react to this event.
void setReadBuffer(EReadDrawBuffer render_buffer)
The source buffer used when copying color buffers, ignored when using depth textures.
void setHeight(int height)
void setTexture(Texture *tex)
const Texture * texture() const
CopyTexSubImage2D(int level, int xoffset, int yoffset, int x, int y, int width, int height, Texture *texture=NULL, ETex2DTarget target=T2DT_TEXTURE_2D, EReadDrawBuffer read_buffer=RDB_BACK_LEFT)
Base class providing all the basic funtionalities of a Renderer.
ETex2DTarget target() const
void setZOffset(int zoffset)
CopyTexSubImage3D(int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height, Texture *texture, EReadDrawBuffer read_buffer=RDB_BACK_LEFT)
void setHeight(int height)
Wraps glCopyTexSubImage1D, see also CopyTexSubImage.
Wraps glCopyTexSubImage2D, see also CopyTexSubImage. To be used also for 1D array textures...
Wraps glCopyTexSubImage3D, see also CopyTexSubImage. To be used also for 2D array textures...
#define VL_INSTRUMENT_ABSTRACT_CLASS(ClassName, BaseClass)
The ref<> class is used to reference-count an Object.
void setXOffset(int xoffset)
virtual void copyPixels()
Copies the pixels from the specified read buffer to the specified texture.
void setTexture(Texture *tex)
EReadDrawBuffer readBuffer() const
The source buffer used when copying color buffers, ignored when using depth textures.