28 #ifndef vtkOpenGLRenderWindow_h
29 #define vtkOpenGLRenderWindow_h
31 #include "vtkRenderingOpenGL2Module.h"
77 virtual unsigned char *
GetPixelData(
int x,
int y,
int x2,
int y2,
int front);
94 int front,
int blend=0);
96 int front,
int blend=0);
103 unsigned char *
data,
int front,
254 vtkGetMacro(FrameBufferObject,
unsigned int);
273 int numComponents,
int dataType,
void *
data);
280 int dstXmin,
int dstYmin,
int dstXmax,
int dstYmax,
281 int srcXmin,
int srcYmin,
int srcXmax,
int srcYmax,
282 int srcWidth,
int srcHeight,
int numComponents,
int dataType,
void *
data);
289 int srcWidth,
int srcHeight,
int numComponents,
int dataType,
void *
data);
295 return this->MaximumHardwareLineWidth; };
314 int vtktype,
int numComponents,
315 bool needInteger,
bool needFloat);
324 return this->OpenGLSupportMessage;
349 std::set<vtkGenericOpenGLResourceFreeCallback *>
Resources;
352 std::set<vtkGenericOpenGLResourceFreeCallback *>::iterator it
353 = this->Resources.find(cb);
354 if (it == this->Resources.end())
356 this->Resources.insert(cb);
361 std::set<vtkGenericOpenGLResourceFreeCallback *>::iterator it
362 = this->Resources.find(cb);
363 if (it != this->Resources.end())
365 this->Resources.erase(it);
401 unsigned char*
data);
430 int OffScreenUseFrameBuffer;
436 int NumberOfFrameBuffers;
437 unsigned int TextureObjects[4];
438 unsigned int FrameBufferObject;
439 unsigned int DepthRenderBufferObject;
440 int HardwareBufferSize[2];
441 bool HardwareOffScreenBuffersBind;
478 unsigned int BackLeftBuffer;
479 unsigned int BackRightBuffer;
480 unsigned int FrontLeftBuffer;
481 unsigned int FrontRightBuffer;
482 unsigned int FrontBuffer;
483 unsigned int BackBuffer;
485 #ifndef VTK_LEGACY_REMOVE
dynamic, self-adjusting array of float
list of point or cell ids
a simple class to control print indentation
virtual void DrawPixels(int dstXmin, int dstYmin, int dstXmax, int dstYmax, int srcXmin, int srcYmin, int srcXmax, int srcYmax, int srcWidth, int srcHeight, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function, but it allows for scaling the data and using only part...
virtual unsigned char * GetPixelData(int x, int y, int x2, int y2, int front)
Set/Get the pixel data of an image, transmitted as RGBRGB...
std::map< std::string, int > GLStateIntegers
virtual int GetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *z)
std::string GetOpenGLSupportMessage()
Return a message profiding additional details about the results of calling SupportsOpenGL() This can ...
virtual bool GetUseOffScreenBuffers()
static bool GetContextSupportsOpenGL32()
Get if the context includes opengl core profile 3.2 support.
virtual void DrawPixels(int x1, int y1, int x2, int y2, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function.
virtual void PopContext()
int GetColorBufferSizes(int *rgba)
Get the size of the color buffer.
vtkOpenGLShaderCache * ShaderCache
virtual int GetRGBAPixelData(int x, int y, int x2, int y2, int front, vtkFloatArray *data)
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
int GetTextureUnitForTexture(vtkTextureObject *)
Get the texture unit for a given texture object.
void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager)
Set the texture unit manager.
float MaximumHardwareLineWidth
unsigned int GetBackRightBuffer()
Return the OpenGL name of the back right buffer.
void RegisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
std::set< vtkGenericOpenGLResourceFreeCallback * > Resources
virtual void WaitForCompletion()
Block the thread until the actual rendering is finished().
virtual int SetZbufferData(int x1, int y1, int x2, int y2, float *buffer)
virtual void ReleaseRGBAPixelData(float *data)
static void SetGlobalMaximumNumberOfMultiSamples(int val)
Set/Get the maximum number of multisamples.
virtual float GetMaximumHardwareLineWidth()
Return the largest line width supported by the hardware.
int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, unsigned char *data)
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
virtual int SetRGBAPixelData(int x, int y, int x2, int y2, vtkFloatArray *data, int front, int blend=0)
void BindHardwareOffScreenBuffers()
void DestroyHardwareOffScreenBuffers()
virtual int SetPixelData(int x, int y, int x2, int y2, unsigned char *data, int front)
Set/Get the pixel data of an image, transmitted as RGBRGBRGB.
int GetDepthBufferSize()
Get the size of the depth buffer.
void ActivateTexture(vtkTextureObject *)
Activate a texture unit for this texture.
unsigned int GetBackBuffer()
Return the OpenGL name of the back left buffer.
vtkTextureObject * DrawPixelsTextureObject
virtual void SetSize(int, int)
void SetContextSupportsOpenGL32(bool val)
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0)
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
virtual int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int blend=0)
virtual int GetPixelData(int x, int y, int x2, int y2, int front, unsigned char *data)
int CreateHardwareOffScreenBuffers(int width, int height, bool bind=false)
void UnregisterGraphicsResources(vtkGenericOpenGLResourceFreeCallback *cb)
unsigned int GetFrontRightBuffer()
Return the OpenGL name of the front right buffer.
virtual const char * GetRenderingBackend()
What rendering backend has the user requested.
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
virtual bool IsPointSpriteBugPresent()
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
unsigned int LastGraphicError
unsigned int GetFrontBuffer()
Return the OpenGL name of the front left buffer.
virtual void OpenGLInitContext()
virtual int GetPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data)
virtual int SetRGBAPixelData(int x, int y, int x2, int y2, float *data, int front, int blend=0)
unsigned int GetBackLeftBuffer()
Return the OpenGL name of the back left buffer.
void InitializeTextureInternalFormats()
virtual void PushContext()
Ability to push and pop this window's context as the current context.
virtual void OpenGLInitState()
static int GetGlobalMaximumNumberOfMultiSamples()
virtual void CreateAWindow()=0
Create a not-off-screen window.
int GetRGBAPixelData(int x, int y, int x2, int y2, int front, float *data)
int GetDefaultTextureInternalFormat(int vtktype, int numComponents, bool needInteger, bool needFloat)
Get a mapping of vtk data types to native texture formats for this window we put this on the RenderWi...
int CreateHardwareOffScreenWindow(int width, int height)
Create an offScreen window based on OpenGL framebuffer extension.
unsigned int GetFrontLeftBuffer()
Return the OpenGL name of the front left buffer.
virtual unsigned char * GetRGBACharPixelData(int x, int y, int x2, int y2, int front)
virtual vtkMTimeType GetContextCreationTime()
Get the time when the OpenGL context was created.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void StereoUpdate()
Update system if needed due to stereo rendering.
void UnbindHardwareOffScreenBuffers()
virtual int SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray *buffer)
virtual void Initialize(void)
Initialize the rendering window.
virtual void OpenGLInit()
Initialize OpenGL for this window.
virtual float * GetRGBAPixelData(int x, int y, int x2, int y2, int front)
Set/Get the pixel data of an image, transmitted as RGBARGBA...
void DestroyHardwareOffScreenWindow()
Destroy an offscreen window based on OpenGL framebuffer extension.
void DeactivateTexture(vtkTextureObject *)
Deactive a previously activated texture.
void RestoreGLState()
Restore OpenGL state at end of the rendering.
void GetOpenGLVersion(int &major, int &minor)
Get the major and minor version numbers of the OpenGL context we are using ala 3.2,...
void SaveGLState()
Query and save OpenGL state.
virtual float * GetZbufferData(int x1, int y1, int x2, int y2)
Set/Get the zbuffer data from an image.
std::map< const vtkTextureObject *, int > TextureResourceIds
virtual int GetRGBACharPixelData(int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data)
virtual int SetUseOffScreenBuffers(bool offScreen)
Create and bind offscreen rendering buffers without destroying the current OpenGL context.
virtual void DrawPixels(int srcWidth, int srcHeight, int numComponents, int dataType, void *data)
Replacement for the old glDrawPixels function.
virtual int GetZbufferData(int x1, int y1, int x2, int y2, float *z)
virtual int SetPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front)
std::string OpenGLSupportMessage
manage Shader Programs within a context
The VertexArrayObject class uses, or emulates, vertex array objects.
create a window for renderers to draw into
virtual void MakeCurrent()=0
Attempt to make this window the current graphics context for the calling thread.
The ShaderProgram uses one or more Shader objects.
Wrapper around std::string to keep symbols short.
abstracts an OpenGL texture object.
allocate/free texture units.
handles properties associated with a texture map
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
vtkTypeUInt64 vtkMTimeType
#define VTK_UNICODE_STRING