MCPcopy Create free account
hub / github.com/Kitware/VTK / GetOpenGLType

Method GetOpenGLType

Rendering/OpenGL2/vtkOpenGLFramebufferObject.cxx:297–323  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

295
296//------------------------------------------------------------------------------
297int vtkOpenGLFramebufferObject::GetOpenGLType(int vtkType)
298{
299 // convert vtk type to open gl type
300 int oglType = 0;
301 switch (vtkType)
302 {
303 case VTK_FLOAT:
304 oglType = GL_FLOAT;
305 break;
306 case VTK_INT:
307 oglType = GL_INT;
308 break;
309 case VTK_UNSIGNED_INT:
310 oglType = GL_UNSIGNED_INT;
311 break;
312 case VTK_CHAR:
313 oglType = GL_BYTE;
314 break;
315 case VTK_UNSIGNED_CHAR:
316 oglType = GL_UNSIGNED_BYTE;
317 break;
318 default:
319 vtkErrorMacro("Unsupported type");
320 return 0;
321 }
322 return oglType;
323}
324
325unsigned int vtkOpenGLFramebufferObject::GetDrawMode()
326{

Callers 4

DownloadDepthMethod · 0.95
DownloadColor4Method · 0.95
DownloadColor3Method · 0.95
DownloadColor1Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected