|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
  129 #ifndef vtkOpenGLFramebufferObject_h 
  130 #define vtkOpenGLFramebufferObject_h 
  139 #define VTK_UPDATED_FRAMEBUFFER 
  148 #define vtkCheckFrameBufferStatusMacro(mode) 
  149 #define vtkStaticCheckFrameBufferStatusMacro(mode) 
  151 #define vtkCheckFrameBufferStatusMacroImpl(macro, mode)                                            \ 
  154     bool ok = vtkOpenGLFramebufferObject::GetFrameBufferStatus(mode, eStr);                        \ 
  157       macro(<< "OpenGL ERROR. The FBO is incomplete : " << eStr);                                  \ 
  160 #define vtkCheckFrameBufferStatusMacro(mode) vtkCheckFrameBufferStatusMacroImpl(vtkErrorMacro, mode) 
  161 #define vtkStaticCheckFrameBufferStatusMacro(mode)                                                 \ 
  162   vtkCheckFrameBufferStatusMacroImpl(vtkGenericWarningMacro, mode) 
  166 #include "vtkRenderingOpenGL2Module.h"  
  204   void Bind(
unsigned int mode);
 
  210   void UnBind(
unsigned int mode);
 
  216   void SaveCurrentBindingsAndBuffers();
 
  217   void SaveCurrentBindingsAndBuffers(
unsigned int mode);
 
  218   void RestorePreviousBindingsAndBuffers();
 
  219   void RestorePreviousBindingsAndBuffers(
unsigned int mode);
 
  232   bool Start(
int width, 
int height);
 
  233   bool StartNonOrtho(
int width, 
int height);
 
  240   void InitializeViewport(
int width, 
int height);
 
  244   void ActivateDrawBuffers(
unsigned int n);
 
  245   void ActivateDrawBuffers(
unsigned int* ids, 
int n);
 
  246   void ActivateDrawBuffer(
unsigned int id);
 
  247   void ActivateReadBuffer(
unsigned int id);
 
  250     this->ActivateDrawBuffer(
id);
 
  251     this->ActivateReadBuffer(
id);
 
  253   void DeactivateDrawBuffers();
 
  254   void DeactivateReadBuffer();
 
  257   vtkGetMacro(ActiveReadBuffer, 
unsigned int);
 
  258   unsigned int GetActiveDrawBuffer(
unsigned int id);
 
  270   void RenderQuad(
int minX, 
int maxX, 
int minY, 
int maxY, 
vtkShaderProgram* program,
 
  277   void AddColorAttachment(
unsigned int attId, 
vtkTextureObject* tex, 
unsigned int zslice = 0,
 
  278     unsigned int format = 0, 
unsigned int mipmapLevel = 0);
 
  280   void RemoveColorAttachment(
unsigned int index);
 
  281   void RemoveColorAttachments(
unsigned int num);
 
  287   int GetNumberOfColorAttachments();
 
  293   void AddDepthAttachment();
 
  296   void RemoveDepthAttachment();
 
  305   bool PopulateFramebuffer(
int width, 
int height);
 
  306   bool PopulateFramebuffer(
int width, 
int height, 
bool useTextures, 
int numberOfColorAttachments,
 
  307     int colorDataType, 
bool wantDepthAttachment, 
int depthBitplanes, 
int multisamples,
 
  308     bool wantStencilAttachment = 
false);
 
  316   unsigned int GetMaximumNumberOfActiveTargets();
 
  323   unsigned int GetMaximumNumberOfRenderTargets();
 
  331     vtkDebugMacro(<< this->
GetClassName() << 
" (" << 
this << 
"): returning LastSize pointer " 
  333     return this->LastSize;
 
  337     _arg1 = this->LastSize[0];
 
  338     _arg2 = this->LastSize[1];
 
  339     vtkDebugMacro(<< this->
GetClassName() << 
" (" << 
this << 
"): returning LastSize (" << _arg1
 
  340                   << 
"," << _arg2 << 
")");
 
  355   int CheckFrameBufferStatus(
unsigned int mode);
 
  360   virtual void ReleaseGraphicsResources(
vtkWindow* win);
 
  368   static bool GetFrameBufferStatus(
unsigned int mode, 
const char*& desc);
 
  370   vtkGetMacro(FBOIndex, 
unsigned int);
 
  379     const int srcExt[4], 
const int destExt[4], 
unsigned int bits, 
unsigned int mapping);
 
  410     int extent[4], 
int vtkType, 
int nComps, 
int oglType, 
int oglFormat);
 
  412   static void Download(
 
  418   static unsigned int GetDrawMode();
 
  419   static unsigned int GetReadMode();
 
  420   static unsigned int GetBothMode();
 
  425   void Resize(
int width, 
int height);
 
  427   int GetMultiSamples();
 
  433   void AttachColorBuffer(
unsigned int index);
 
  434   void AttachDepthBuffer();
 
  451   void DestroyColorBuffers(
vtkWindow* win);
 
  454   void ActivateBuffers();
 
  462   void DisplayFrameBufferAttachments();
 
  467   void DisplayFrameBufferAttachment(
unsigned int uattachment);
 
  472   void DisplayDrawBuffers();
 
  477   void DisplayReadBuffer();
 
  482   void DisplayBuffer(
int value);
 
  487   int GetOpenGLType(
int vtkType);
 
  
int * GetLastSize() override
Dimensions in pixels of the framebuffer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Internal class which encapsulates OpenGL FramebufferObject.
void GetLastSize(int _arg[2]) override
static bool LoadRequiredExtensions(vtkOpenGLRenderWindow *)
Load all necessary extensions.
abstract interface to OpenGL FBOs
window superclass for vtkRenderWindow
const char * GetClassName() const
Return the class name as a string.
The ShaderProgram uses one or more Shader objects.
a simple class to control print indentation
abstracts an OpenGL texture object.
static bool IsSupported(vtkOpenGLRenderWindow *)
Returns if the context supports the required extensions.
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
unsigned int ActiveReadBuffer
std::map< unsigned int, vtkFOInfo * > ColorBuffers
create a window for renderers to draw into
void GetLastSize(int &_arg1, int &_arg2) override
std::vector< unsigned int > ActiveBuffers
The VertexArrayObject class uses, or emulates, vertex array objects.
abstracts an OpenGL pixel buffer object.
void ActivateBuffer(unsigned int id)
vtkOpenGLRenderWindow * Context