Commit f66acc8e authored by Dave Demarle's avatar Dave Demarle

ENH: Make multisample ivar accessors accessible from the abstract class. This...

ENH: Make multisample ivar accessors accessible from the abstract class. This is needed for parallel compositing because we need to be able to turn off antialiasing to prevent RLencoding bleeding.
parent d9d9365f
......@@ -23,7 +23,7 @@
#include "vtkTimerLog.h"
#include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro(vtkCompositeRenderManager, "1.10");
vtkCxxRevisionMacro(vtkCompositeRenderManager, "1.11");
vtkStandardNewMacro(vtkCompositeRenderManager);
vtkCxxSetObjectMacro(vtkCompositeRenderManager, Compositer, vtkCompositer);
......@@ -72,11 +72,16 @@ void vtkCompositeRenderManager::PreRenderProcessing()
{
this->RenderWindow->SwapBuffersOff();
}
this->SavedMultiSamplesSetting = this->RenderWindow->GetMultiSamples();
this->RenderWindow->SetMultiSamples(0);
}
//----------------------------------------------------------------------------
void vtkCompositeRenderManager::PostRenderProcessing()
{
this->RenderWindow->SetMultiSamples(this->SavedMultiSamplesSetting);
if (!this->UseCompositing || this->CheckForAbortComposite())
{
return;
......
......@@ -58,6 +58,8 @@ protected:
vtkUnsignedCharArray *TmpPixelData;
vtkFloatArray *TmpDepthData;
int SavedMultiSamplesSetting;
private:
vtkCompositeRenderManager(const vtkCompositeRenderManager &);//Not implemented
void operator=(const vtkCompositeRenderManager &); //Not implemented
......
......@@ -26,7 +26,7 @@
#include "vtkUnsignedCharArray.h"
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.70");
vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.71");
#endif
#define MAX_LIGHTS 8
......@@ -157,8 +157,6 @@ void vtkOpenGLRenderWindow::OpenGLInit()
void vtkOpenGLRenderWindow::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "MultiSamples: " << this->MultiSamples << "\n";
}
int vtkOpenGLRenderWindow::GetDepthBufferSize()
......
......@@ -31,7 +31,6 @@ class vtkIdList;
class VTK_RENDERING_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
{
protected:
int MultiSamples;
long OldMonitorSetting;
public:
......@@ -43,11 +42,6 @@ public:
static void SetGlobalMaximumNumberOfMultiSamples(int val);
static int GetGlobalMaximumNumberOfMultiSamples();
// Description:
// Set / Get the number of multisamples to use for hardware antialiasing.
vtkSetMacro(MultiSamples,int);
vtkGetMacro(MultiSamples,int);
// Description:
// Update system if needed due to stereo rendering.
virtual void StereoUpdate();
......
......@@ -23,7 +23,7 @@
#include "vtkRendererCollection.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkRenderWindow, "1.148");
vtkCxxRevisionMacro(vtkRenderWindow, "1.149");
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
......@@ -789,6 +789,8 @@ void vtkRenderWindow::PrintSelf(ostream& os, vtkIndent indent)
{
os << "(none)" << endl;
}
os << indent << "MultiSamples: " << this->MultiSamples << "\n";
}
......
......@@ -469,6 +469,11 @@ public:
// this render window.
vtkGetObjectMacro(PainterDeviceAdapter, vtkPainterDeviceAdapter);
// Description:
// Set / Get the number of multisamples to use for hardware antialiasing.
vtkSetMacro(MultiSamples,int);
vtkGetMacro(MultiSamples,int);
protected:
vtkRenderWindow();
~vtkRenderWindow();
......@@ -510,7 +515,7 @@ protected:
int IsPicking;
float AnaglyphColorSaturation;
int AnaglyphColorMask[2];
int MultiSamples;
private:
vtkRenderWindow(const vtkRenderWindow&); // Not implemented.
void operator=(const vtkRenderWindow&); // Not implemented.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment