Commit 37f39403 authored by Ken Martin's avatar Ken Martin

Clenup some OpenGL2 code

As we get closer to a next VTK release, make sure this is
fairly clean or at least cleaner than it was.
parent d6d45a2b
......@@ -19,6 +19,8 @@
#include "vtkMatrix4x4.h"
#include "vtkOpenGLActor.h"
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
......@@ -28,6 +30,8 @@
#include "vtkSphereMapperVS.h"
#include "vtk_glew.h"
using vtkgl::substitute;
//-----------------------------------------------------------------------------
......@@ -177,15 +181,16 @@ void vtkOpenGLSphereMapper::SetCameraShaderParameters(
}
//-----------------------------------------------------------------------------
void vtkOpenGLSphereMapper::SetMapperShaderParameters(vtkgl::CellBO &cellBO,
vtkRenderer *ren, vtkActor *actor)
void vtkOpenGLSphereMapper::SetMapperShaderParameters(
vtkgl::CellBO &cellBO,
vtkRenderer *ren, vtkActor *actor)
{
if (cellBO.indexCount && (this->VBOBuildTime > cellBO.attributeUpdateTime ||
cellBO.ShaderSourceTime > cellBO.attributeUpdateTime))
if (cellBO.IndexCount && (this->VBOBuildTime > cellBO.AttributeUpdateTime ||
cellBO.ShaderSourceTime > cellBO.AttributeUpdateTime))
{
vtkgl::VBOLayout &layout = this->Layout;
cellBO.vao.Bind();
if (!cellBO.vao.AddAttributeArray(cellBO.Program, this->VBO,
cellBO.VAO->Bind();
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"offsetMC", layout.ColorOffset+sizeof(float),
layout.Stride, VTK_FLOAT, 2, false))
{
......@@ -210,7 +215,7 @@ namespace
vtkgl::VBOLayout vtkOpenGLSphereMapperCreateVBO(float * points, vtkIdType numPts,
unsigned char *colors, int colorComponents,
float *sizes,
vtkgl::BufferObject &vertexBuffer)
vtkOpenGLBufferObject *vertexBuffer)
{
vtkgl::VBOLayout layout;
// Figure out how big each block will be, currently 6 or 7 floats.
......@@ -265,14 +270,16 @@ vtkgl::VBOLayout vtkOpenGLSphereMapperCreateVBO(float * points, vtkIdType numPts
*(it++) = 0.0f;
*(it++) = 2.0f*radius;
}
vertexBuffer.Upload(packedVBO, vtkgl::BufferObject::ArrayBuffer);
vertexBuffer->Upload(packedVBO, vtkOpenGLBufferObject::ArrayBuffer);
layout.VertexCount = numPts*3;
return layout;
}
}
//-------------------------------------------------------------------------
bool vtkOpenGLSphereMapper::GetNeedToRebuildBufferObjects(vtkRenderer *vtkNotUsed(ren), vtkActor *act)
bool vtkOpenGLSphereMapper::GetNeedToRebuildBufferObjects(
vtkRenderer *vtkNotUsed(ren),
vtkActor *act)
{
// picking state does not require a rebuild, unlike our parent
if (this->VBOBuildTime < this->GetMTime() ||
......@@ -286,7 +293,8 @@ bool vtkOpenGLSphereMapper::GetNeedToRebuildBufferObjects(vtkRenderer *vtkNotUse
//-------------------------------------------------------------------------
void vtkOpenGLSphereMapper::BuildBufferObjects(
vtkRenderer *vtkNotUsed(ren), vtkActor *vtkNotUsed(act))
vtkRenderer *vtkNotUsed(ren),
vtkActor *vtkNotUsed(act))
{
vtkPolyData *poly = this->CurrentInput;
......@@ -314,10 +322,10 @@ void vtkOpenGLSphereMapper::BuildBufferObjects(
this->VBO);
// create the IBO
this->Points.indexCount = 0;
this->Lines.indexCount = 0;
this->TriStrips.indexCount = 0;
this->Tris.indexCount = this->Layout.VertexCount;
this->Points.IndexCount = 0;
this->Lines.IndexCount = 0;
this->TriStrips.IndexCount = 0;
this->Tris.IndexCount = this->Layout.VertexCount;
}
......@@ -343,7 +351,7 @@ void vtkOpenGLSphereMapper::RenderPieceDraw(vtkRenderer* ren, vtkActor *actor)
vtkgl::VBOLayout &layout = this->Layout;
// draw polygons
if (this->Tris.indexCount)
if (this->Tris.IndexCount)
{
// First we do the triangles, update the shader, set uniforms, etc.
this->UpdateShader(this->Tris, ren, actor);
......
......@@ -19,6 +19,8 @@
#include "vtkMatrix4x4.h"
#include "vtkOpenGLActor.h"
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
......@@ -29,6 +31,8 @@
#include "vtkStickMapperVS.h"
#include "vtk_glew.h"
using vtkgl::substitute;
//-----------------------------------------------------------------------------
......@@ -243,30 +247,32 @@ void vtkOpenGLStickMapper::SetCameraShaderParameters(vtkgl::CellBO &cellBO,
}
//-----------------------------------------------------------------------------
void vtkOpenGLStickMapper::SetMapperShaderParameters(vtkgl::CellBO &cellBO,
vtkRenderer *ren, vtkActor *actor)
void vtkOpenGLStickMapper::SetMapperShaderParameters(
vtkgl::CellBO &cellBO,
vtkRenderer *ren,
vtkActor *actor)
{
if (cellBO.indexCount && (this->VBOBuildTime > cellBO.attributeUpdateTime ||
cellBO.ShaderSourceTime > cellBO.attributeUpdateTime))
if (cellBO.IndexCount && (this->VBOBuildTime > cellBO.AttributeUpdateTime ||
cellBO.ShaderSourceTime > cellBO.AttributeUpdateTime))
{
vtkHardwareSelector* selector = ren->GetSelector();
bool picking = (ren->GetRenderWindow()->GetIsPicking() || selector != NULL);
vtkgl::VBOLayout &layout = this->Layout;
cellBO.vao.Bind();
if (!cellBO.vao.AddAttributeArray(cellBO.Program, this->VBO,
cellBO.VAO->Bind();
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"orientMC", layout.ColorOffset+sizeof(float),
layout.Stride, VTK_FLOAT, 3, false))
{
vtkErrorMacro(<< "Error setting 'orientMC' in shader VAO.");
}
if (!cellBO.vao.AddAttributeArray(cellBO.Program, this->VBO,
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"offsetMC", layout.ColorOffset+4*sizeof(float),
layout.Stride, VTK_UNSIGNED_CHAR, 3, false))
{
vtkErrorMacro(<< "Error setting 'offsetMC' in shader VAO.");
}
if (!cellBO.vao.AddAttributeArray(cellBO.Program, this->VBO,
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"radiusMC", layout.ColorOffset+5*sizeof(float),
layout.Stride, VTK_FLOAT, 1, false))
{
......@@ -274,7 +280,7 @@ void vtkOpenGLStickMapper::SetMapperShaderParameters(vtkgl::CellBO &cellBO,
}
if (picking)
{
if (!cellBO.vao.AddAttributeArray(cellBO.Program, this->VBO,
if (!cellBO.VAO->AddAttributeArray(cellBO.Program, this->VBO,
"selectionId", layout.ColorOffset+6*sizeof(float),
layout.Stride, VTK_UNSIGNED_CHAR, 4, true))
{
......@@ -283,7 +289,7 @@ void vtkOpenGLStickMapper::SetMapperShaderParameters(vtkgl::CellBO &cellBO,
}
else
{
cellBO.vao.RemoveAttributeArray("selectionId");
cellBO.VAO->RemoveAttributeArray("selectionId");
}
}
......@@ -305,7 +311,7 @@ vtkgl::VBOLayout vtkOpenGLStickMapperCreateVBO(float * points, vtkIdType numPts,
float *orients,
float *sizes,
vtkIdType *selectionIds,
vtkgl::BufferObject &vertexBuffer)
vtkOpenGLBufferObject *vertexBuffer)
{
vtkgl::VBOLayout layout;
// Figure out how big each block will be, currently 6 or 7 floats.
......@@ -462,14 +468,14 @@ vtkgl::VBOLayout vtkOpenGLStickMapperCreateVBO(float * points, vtkIdType numPts,
*(it++) = selId.f;
}
}
vertexBuffer.Upload(packedVBO, vtkgl::BufferObject::ArrayBuffer);
vertexBuffer->Upload(packedVBO, vtkOpenGLBufferObject::ArrayBuffer);
layout.VertexCount = numPts*6;
return layout;
}
}
size_t vtkOpenGLStickMapperCreateTriangleIndexBuffer(
vtkgl::BufferObject &indexBuffer,
vtkOpenGLBufferObject *indexBuffer,
int numPts)
{
std::vector<unsigned int> indexArray;
......@@ -490,12 +496,14 @@ size_t vtkOpenGLStickMapperCreateTriangleIndexBuffer(
indexArray.push_back(i*6+4);
indexArray.push_back(i*6+5);
}
indexBuffer.Upload(indexArray, vtkgl::BufferObject::ElementArrayBuffer);
indexBuffer->Upload(indexArray, vtkOpenGLBufferObject::ElementArrayBuffer);
return indexArray.size();
}
//-------------------------------------------------------------------------
bool vtkOpenGLStickMapper::GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act)
bool vtkOpenGLStickMapper::GetNeedToRebuildBufferObjects(
vtkRenderer *ren,
vtkActor *act)
{
// picking state changing always requires a rebuild
vtkHardwareSelector* selector = ren->GetSelector();
......@@ -548,11 +556,11 @@ void vtkOpenGLStickMapper::BuildBufferObjects(vtkRenderer *ren,
this->VBO);
// create the IBO
this->Points.indexCount = 0;
this->Lines.indexCount = 0;
this->TriStrips.indexCount = 0;
this->Tris.indexCount =
vtkOpenGLStickMapperCreateTriangleIndexBuffer(this->Tris.ibo,
this->Points.IndexCount = 0;
this->Lines.IndexCount = 0;
this->TriStrips.IndexCount = 0;
this->Tris.IndexCount =
vtkOpenGLStickMapperCreateTriangleIndexBuffer(this->Tris.IBO,
poly->GetPoints()->GetNumberOfPoints());
}
......@@ -562,16 +570,16 @@ void vtkOpenGLStickMapper::RenderPieceDraw(vtkRenderer* ren, vtkActor *actor)
vtkgl::VBOLayout &layout = this->Layout;
// draw polygons
if (this->Tris.indexCount)
if (this->Tris.IndexCount)
{
// First we do the triangles, update the shader, set uniforms, etc.
this->UpdateShader(this->Tris, ren, actor);
this->Tris.ibo.Bind();
this->Tris.IBO->Bind();
glDrawRangeElements(GL_TRIANGLES, 0,
static_cast<GLuint>(layout.VertexCount - 1),
static_cast<GLsizei>(this->Tris.indexCount),
static_cast<GLsizei>(this->Tris.IndexCount),
GL_UNSIGNED_INT,
reinterpret_cast<const GLvoid *>(NULL));
this->Tris.ibo.Release();
this->Tris.IBO->Release();
}
}
......@@ -15,44 +15,39 @@
#include "vtkOpenGLContextDevice2D.h"
#include "vtkMathTextUtilities.h"
#include "vtkTextRendererStringToImage.h"
#include "vtkVector.h"
#include "vtkRect.h"
#include "vtkPen.h"
#include "vtkAbstractContextBufferId.h"
#include "vtkBrush.h"
#include "vtkTextProperty.h"
#include "vtkPoints2D.h"
#include "vtkMatrix3x3.h"
#include "vtkFloatArray.h"
#include "vtkSmartPointer.h"
#include "vtkImageData.h"
#include "vtkMath.h"
#include "vtkMathTextUtilities.h"
#include "vtkMatrix3x3.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLShaderCache.h"
#include "vtkOpenGLTexture.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkPen.h"
#include "vtkPoints2D.h"
#include "vtkRect.h"
#include "vtkShaderProgram.h"
#include "vtkSmartPointer.h"
#include "vtkTextProperty.h"
#include "vtkTextRendererStringToImage.h"
#include "vtkTexture.h"
#include "vtkTextureUnitManager.h"
#include "vtkTransform.h"
#include "vtkVector.h"
#include "vtkViewport.h"
#include "vtkWindow.h"
#include "vtkTexture.h"
#include "vtkImageData.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
#include "vtkglVBOHelper.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLContextDevice2DPrivate.h"
#include "vtkAbstractContextBufferId.h"
#include "vtkOpenGLShaderCache.h"
#include "vtkShaderProgram.h"
#include "vtkTransform.h"
#include "vtkOpenGLTexture.h"
#include "vtkglVBOHelper.h"
#include "vtkTextureUnitManager.h"
#include <algorithm>
......@@ -347,10 +342,10 @@ void vtkOpenGLContextDevice2D::BuildVBO(
}
// upload the data
cellBO->ibo.Upload(va, vtkgl::BufferObject::ArrayBuffer);
cellBO->vao.Bind();
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
cellBO->IBO->Upload(va, vtkOpenGLBufferObject::ArrayBuffer);
cellBO->VAO->Bind();
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"vertexMC", 0,
sizeof(float)*stride,
VTK_FLOAT, 2, false))
......@@ -359,8 +354,8 @@ void vtkOpenGLContextDevice2D::BuildVBO(
}
if (colors)
{
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"vertexScalar", sizeof(float)*cOffset,
sizeof(float)*stride,
VTK_UNSIGNED_CHAR, 4, true))
......@@ -370,8 +365,8 @@ void vtkOpenGLContextDevice2D::BuildVBO(
}
if (tcoords)
{
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"tcoordMC", sizeof(float)*tOffset,
sizeof(float)*stride,
VTK_FLOAT, 2, false))
......@@ -380,7 +375,7 @@ void vtkOpenGLContextDevice2D::BuildVBO(
}
}
cellBO->vao.Bind();
cellBO->VAO->Bind();
}
void vtkOpenGLContextDevice2D::ReadyVBOProgram()
......
......@@ -24,6 +24,8 @@
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLVertexArrayObject.h"
#include "vtkObjectFactory.h"
......@@ -237,10 +239,10 @@ void vtkOpenGLContextDevice3D::BuildVBO(
}
// upload the data
cellBO->ibo.Upload(va, vtkgl::BufferObject::ArrayBuffer);
cellBO->vao.Bind();
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
cellBO->IBO->Upload(va, vtkOpenGLBufferObject::ArrayBuffer);
cellBO->VAO->Bind();
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"vertexMC", 0,
sizeof(float)*stride,
VTK_FLOAT, 3, false))
......@@ -249,8 +251,8 @@ void vtkOpenGLContextDevice3D::BuildVBO(
}
if (colors)
{
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"vertexScalar", sizeof(float)*cOffset,
sizeof(float)*stride,
VTK_UNSIGNED_CHAR, 4, true))
......@@ -260,8 +262,8 @@ void vtkOpenGLContextDevice3D::BuildVBO(
}
if (tcoords)
{
if (!cellBO->vao.AddAttributeArray(
cellBO->Program, cellBO->ibo,
if (!cellBO->VAO->AddAttributeArray(
cellBO->Program, cellBO->IBO,
"tcoordMC", sizeof(float)*tOffset,
sizeof(float)*stride,
VTK_FLOAT, 2, false))
......@@ -270,7 +272,7 @@ void vtkOpenGLContextDevice3D::BuildVBO(
}
}
cellBO->vao.Bind();
cellBO->VAO->Bind();
}
void vtkOpenGLContextDevice3D::ReadyVBOProgram()
......
......@@ -34,6 +34,7 @@
#include "vtkCompositeSurfaceLICMapper.h"
#include "vtk_glew.h"
#include <vector>
#include <string>
......
......@@ -718,7 +718,7 @@ public:
computeBounds[0]*2.0-1.0, computeBounds[3]*2.0-1.0, 0.0f};
vtkOpenGLRenderWindow::RenderQuad(verts, tcoords,
cbo->Program, &cbo->vao);
cbo->Program, cbo->VAO);
vtkOpenGLStaticCheckErrorMacro("failed at RenderQuad");
}
......
......@@ -585,7 +585,7 @@ int vtkStructuredGridLIC2D::RequestData(
vtkDebugMacro( << "glFinish before rendering quad" << endl );
fbo->RenderQuad(0, magWidth-1,0, magHeight-1,
pgm, &this->LICProgram->vao);
pgm, this->LICProgram->VAO);
vtkOpenGLCheckErrorMacro("StructuredGridLIC2D projection fialed");
vtkDebugMacro( << "glFinish after rendering quad" << endl );
......
......@@ -1167,7 +1167,7 @@ public:
quadTCoords[0]*2.0-1.0, quadTCoords[3]*2.0-1.0, 0.0f};
vtkOpenGLRenderWindow::RenderQuad(verts, tcoords,
cbo->Program, &cbo->vao);
cbo->Program, cbo->VAO);
vtkOpenGLStaticCheckErrorMacro("failed at RenderQuad");
}
......
......@@ -61,9 +61,9 @@ set(Module_SRCS
vtkTextureUnitManager.cxx
vtkTranslucentPass.cxx
vtkVolumetricPass.cxx
vtkglBufferObject.cxx
vtkOpenGLBufferObject.cxx
vtkglVBOHelper.cxx
vtkglVertexArrayObject.cxx
vtkOpenGLVertexArrayObject.cxx
)
if (NOT DEFINED OPENGL_ES_VERSION)
......@@ -92,9 +92,9 @@ set(${vtk-module}_HDRS
)
set_source_files_properties(
vtkglBufferObject
vtkOpenGLBufferObject
vtkglVBOHelper
vtkglVertexArrayObject
vtkOpenGLVertexArrayObject
vtkFrameBufferObject
vtkOpenGLGlyph3DHelper
vtkOpenGLGlyph3DMapper
......@@ -124,12 +124,12 @@ set(shader_files
glsl/vtkPointGaussianVS.glsl
glsl/vtkTextureObjectFS.glsl
glsl/vtkTextureObjectVS.glsl
glsl/vtkglGlyph3DVSFragmentLit.glsl
glsl/vtkglPolyData2DFS.glsl
glsl/vtkglPolyData2DVS.glsl
glsl/vtkglPolyDataFS.glsl
glsl/vtkglPolyDataGS.glsl
glsl/vtkglPolyDataVSFragmentLit.glsl
glsl/vtkGlyph3DVS.glsl
glsl/vtkPolyData2DFS.glsl
glsl/vtkPolyData2DVS.glsl
glsl/vtkPolyDataFS.glsl
glsl/vtkPolyDataGS.glsl
glsl/vtkPolyDataVS.glsl
)
unset(shader_h_files)
foreach(file ${shader_files})
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyDataVSFragmentLit.glsl
Module: vtkGlyph3DVS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyData2DFS.glsl
Module: vtkPolyData2DFS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyData2DVS.glsl
Module: vtkPolyData2DVS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -40,4 +40,3 @@ void main()
//VTK::TCoord::Impl
//VTK::Color::Impl
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyDataFS.glsl
Module: vtkPolyDataFS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyDataGS.glsl
Module: vtkPolyDataGS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkglPolyDataVSFragmentLit.glsl
Module: vtkPolyDataVS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -58,6 +58,3 @@ void main()
//VTK::PositionVC::Impl
}
......@@ -25,6 +25,7 @@
#include "vtkMultiBlockDataSet.h"
#include "vtkMultiPieceDataSet.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLBufferObject.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLTexture.h"
#include "vtkPointData.h"
......@@ -355,11 +356,11 @@ void vtkCompositePolyDataMapper2::RenderPieceDraw(
}
// draw polygons
if (this->Tris.indexCount)
if (this->Tris.IndexCount)
{
// First we do the triangles, update the shader, set uniforms, etc.
this->UpdateShader(this->Tris, ren, actor);
this->Tris.ibo.Bind();
this->Tris.IBO->Bind();
GLenum mode = (representation == VTK_POINTS) ? GL_POINTS :
(representation == VTK_WIREFRAME) ? GL_LINES : GL_TRIANGLES;
unsigned int modeDenom = (representation == VTK_POINTS) ? 1 :
......@@ -410,7 +411,7 @@ void vtkCompositePolyDataMapper2::RenderPieceDraw(
((it->EndIndex - it->StartIndex + 1)/modeDenom);
}
this->Tris.ibo.Release();
this->Tris.IBO->Release();
}
}
......@@ -430,11 +431,11 @@ void vtkCompositePolyDataMapper2::RenderEdges(
this->DrawingEdges = true;
// draw polygons
if (this->TrisEdges.indexCount)
if (this->TrisEdges.IndexCount)
{
// First we do the triangles, update the shader, set uniforms, etc.
this->UpdateShader(this->TrisEdges, ren, actor);
this->TrisEdges.ibo.Bind();
this->TrisEdges.IBO->Bind();
std::vector<
vtkCompositePolyDataMapper2::RenderValue>::iterator it;
for (it = this->RenderValues.begin(); it != this->RenderValues.end(); it++)
......@@ -449,7 +450,7 @@ void vtkCompositePolyDataMapper2::RenderEdges(
reinterpret_cast<const GLvoid *>(it->StartEdgeIndex*sizeof(GLuint)));
}