28 #ifndef vtkOpenGLRenderWindow_h 29 #define vtkOpenGLRenderWindow_h 31 #include "vtkRenderingOpenGLModule.h" 51 static void SetGlobalMaximumNumberOfMultiSamples(
int val);
52 static int GetGlobalMaximumNumberOfMultiSamples();
64 unsigned char *
GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
int right=0)
69 int front,
int right=0)
override;
84 int front,
int blend=0,
int right=0)
override;
86 int front,
int blend=0,
int right=0)
override;
89 int front,
int right=0)
override;
93 unsigned char *
data,
int front,
94 int blend=0,
int right=0)
override;
97 int blend=0,
int right=0)
override;
105 int GetZbufferData(
int x1,
int y1,
int x2,
int y2,
float* z )
override;
108 int SetZbufferData(
int x1,
int y1,
int x2,
int y2,
float *buffer )
override;
116 void RegisterTextureResource (GLuint
id);
133 void SetSize(
int a[2])
override;
134 void SetSize(
int,
int)
override;
140 virtual void OpenGLInit();
143 virtual void OpenGLInitState();
146 virtual void OpenGLInitContext();
155 unsigned int GetBackLeftBuffer();
164 unsigned int GetBackRightBuffer();
173 unsigned int GetFrontLeftBuffer();
182 unsigned int GetFrontRightBuffer();
191 unsigned int GetBackBuffer();
200 unsigned int GetFrontBuffer();
251 int GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
unsigned char*
data,
int right=0);
254 unsigned char*
data,
int right=0);
265 int CreateHardwareOffScreenWindow(
int width,
int height);
267 int CreateHardwareOffScreenBuffers(
int width,
int height,
bool bind =
false);
268 void BindHardwareOffScreenBuffers();
275 void DestroyHardwareOffScreenWindow();
277 void UnbindHardwareOffScreenBuffers();
278 void DestroyHardwareOffScreenBuffers();
290 unsigned int TextureObjects[4];
293 int HardwareBufferSize[2];
300 virtual void CreateAWindow() = 0;
305 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().