25 #ifndef vtkOpenGLRenderWindow_h 26 #define vtkOpenGLRenderWindow_h 28 #include "vtkRenderingOpenGLModule.h" 48 static void SetGlobalMaximumNumberOfMultiSamples(
int val);
49 static int GetGlobalMaximumNumberOfMultiSamples();
61 unsigned char *
GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
int right=0)
66 int front,
int right=0)
override;
81 int front,
int blend=0,
int right=0)
override;
83 int front,
int blend=0,
int right=0)
override;
86 int front,
int right=0)
override;
90 unsigned char *
data,
int front,
91 int blend=0,
int right=0)
override;
94 int blend=0,
int right=0)
override;
102 int GetZbufferData(
int x1,
int y1,
int x2,
int y2,
float* z )
override;
105 int SetZbufferData(
int x1,
int y1,
int x2,
int y2,
float *buffer )
override;
113 void RegisterTextureResource (GLuint
id);
130 void SetSize(
int a[2])
override;
131 void SetSize(
int,
int)
override;
137 virtual void OpenGLInit();
140 virtual void OpenGLInitState();
143 virtual void OpenGLInitContext();
152 unsigned int GetBackLeftBuffer();
161 unsigned int GetBackRightBuffer();
170 unsigned int GetFrontLeftBuffer();
179 unsigned int GetFrontRightBuffer();
188 unsigned int GetBackBuffer();
197 unsigned int GetFrontBuffer();
248 int GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
unsigned char*
data,
int right=0);
251 unsigned char*
data,
int right=0);
262 int CreateHardwareOffScreenWindow(
int width,
int height);
264 int CreateHardwareOffScreenBuffers(
int width,
int height,
bool bind =
false);
265 void BindHardwareOffScreenBuffers();
272 void DestroyHardwareOffScreenWindow();
274 void UnbindHardwareOffScreenBuffers();
275 void DestroyHardwareOffScreenBuffers();
287 unsigned int TextureObjects[4];
290 int HardwareBufferSize[2];
297 virtual void CreateAWindow() = 0;
302 virtual void DestroyWindow() = 0;
int OwnContext
Flag telling if the context has been created here or was inherited.
Wrapper around std::string to keep symbols short.
virtual unsigned char * GetPixelData(int x, int y, int x2, int y2, int front, int right=0)=0
Get the pixel data of an image, transmitted as RGBRGBRGB.
int OffScreenUseFrameBuffer
Flag telling if a framebuffer-based offscreen is currently in use.
virtual int SetUseOffScreenBuffers(bool)
Create and bind offscreen rendering buffers without destroying the current OpenGL context.
virtual int SetRGBAPixelData(int x, int y, int x2, int y2, float *, int front, int blend=0, int right=0)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
vtkTypeUInt32 vtkMTimeType
vtkTimeStamp ContextCreationTime
int NumberOfFrameBuffers
Variables used by the framebuffer-based offscreen method.
bool HardwareOffScreenBuffersBind
Variables used by the framebuffer-based offscreen method.
record modification and/or execution time
dynamic, self-adjusting array of float
virtual int GetColorBufferSizes(int *rgba)=0
Get the size of the color buffer.
vtkTextureUnitManager * TextureUnitManager
unsigned int FrontLeftBuffer
virtual int SetPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int right=0)=0
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
virtual void SetSize(int, int)
Set/Get the size of the window in screen coordinates in pixels.
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0, int right=0)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
vtkIdList * TextureResourceIds
a simple class to control print indentation
virtual float * GetRGBAPixelData(int x, int y, int x2, int y2, int front, int right=0)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
virtual void ReleaseRGBAPixelData(float *data)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
unsigned int FrameBufferObject
Variables used by the framebuffer-based offscreen method.
list of point or cell ids
unsigned int BackLeftBuffer
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetDepthBufferSize()=0
This method should be defined by the subclass.
virtual int SetZbufferData(int x, int y, int x2, int y2, float *z)=0
Set/Get the zbuffer data from the frame buffer.
Interface class for querying and using OpenGL extensions.
virtual unsigned char * GetRGBACharPixelData(int x, int y, int x2, int y2, int front, int right=0)=0
Same as Get/SetPixelData except that the image also contains an alpha component.
dynamic, self-adjusting array of unsigned char
allocate/free texture units.
unsigned int BackRightBuffer
create a window for renderers to draw into
virtual const char * GetRenderingBackend()
What rendering backend has the user requested.
virtual float * GetZbufferData(int x, int y, int x2, int y2)=0
Set/Get the zbuffer data from the frame buffer.
unsigned int FrontRightBuffer
unsigned int DepthRenderBufferObject
Variables used by the framebuffer-based offscreen method.
virtual bool GetUseOffScreenBuffers()
virtual void WaitForCompletion()=0
Block the thread until the actual rendering is finished().