/usr/include/VTKEdge/vtkKWEVertexBufferObject.h is in libvtkedge-dev 0.2.0~20110819-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | //=============================================================================
// This file is part of VTKEdge. See vtkedge.org for more information.
//
// Copyright (c) 2010 Kitware, Inc.
//
// VTKEdge may be used under the terms of the BSD License
// Please see the file Copyright.txt in the root directory of
// VTKEdge for further information.
//
// Alternatively, you may see:
//
// http://www.vtkedge.org/vtkedge/project/license.html
//
//
// For custom extensions, consulting services, or training for
// this or any other Kitware supported open source project, please
// contact Kitware at sales@kitware.com.
//
//
//=============================================================================
// .NAME vtkKWEVertexBufferObject
// .SECTION Description
#ifndef __vtkKWEVertexBufferObject_h
#define __vtkKWEVertexBufferObject_h
#include "vtkObject.h"
#include "VTKEdgeConfigure.h" // include configuration header
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class vtkRenderWindow;
class vtkOpenGLExtensionManager;
class vtkDataArray;
class vtkCellArray;
class vtkPainterDeviceAdapter;
class VTKEdge_RENDERING_EXPORT vtkKWEVertexBufferObject : public vtkObject
{
public:
static vtkKWEVertexBufferObject* New();
vtkTypeRevisionMacro(vtkKWEVertexBufferObject, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Get/Set the context. Context must be a vtkOpenGLRenderWindow.
// This does not increase the reference count of the
// context to avoid reference loops.
// SetContext() may raise an error is the OpenGL context does not support the
// required OpenGL extensions.
void SetContext(vtkRenderWindow* context);
vtkRenderWindow* GetContext();
//BTX
enum BufferType{
ARRAY_BUFFER,
ELEMENT_ARRAY_BUFFER
};
// Description:
// Make the buffer active.
void Bind(BufferType buffer);
//ETX
// Description:
// Inactivate the buffer.
void UnBind();
// Description:
// Upload the data array.
bool Upload(vtkDataArray* array, BufferType type=ARRAY_BUFFER);
bool UploadIndices(vtkCellArray* ca, bool build_draw_multielements_arrays=false);
bool RenderIndices(int vtkprimtype);
vtkGetMacro(Initialized, bool);
//BTX
protected:
vtkKWEVertexBufferObject();
~vtkKWEVertexBufferObject();
// Description:
// Loads all required OpenGL extensions. Must be called every time a new
// context is set.
bool LoadRequiredExtensions(vtkOpenGLExtensionManager* mgr);
// Description:
// Create the pixel buffer object.
void CreateBuffer();
// Description:
// Destroys the pixel buffer object.
void DestroyBuffer();
vtkWeakPointer<vtkRenderWindow> Context;
unsigned int BufferTarget; // actually GLenum
unsigned int Handle;
bool Initialized;
private:
vtkKWEVertexBufferObject(const vtkKWEVertexBufferObject&); // Not implemented.
void operator=(const vtkKWEVertexBufferObject&); // Not implemented.
class vtkInternals;
vtkInternals* Internals;
//ETX
};
#endif
|