MeVisLab Toolbox Reference
GLVertexArrayAccess.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2018, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 #include "SoUtilsSystem.h"
16 
17 #include <mlOpenGL.h>
18 
21 {
26 
27  GLint type;
28  GLint binding;
29  GLint stride;
30  GLint size;
31  GLvoid* pointer;
32 
33  GLint colorType;
34  GLint colorBinding;
35  GLint colorStride;
36  GLint colorSize;
37  GLvoid* colorPointer;
38 
39  GLint normalType;
41  GLint normalStride;
42  GLvoid* normalPointer;
43 
44  GLint texCoordType;
47  GLint texCoordSize;
48  GLvoid* texCoordPointer;
49 
50 private:
51  void mapFromGL();
52  void unmap();
53 };
54 
57 {
58  GLElementArrayAccess(GLvoid* indices);
60 
61  GLint binding;
62  GLvoid* indicesPointer;
63 
64 private:
65  void mapFromGL(GLvoid* indices);
66  void unmap();
67 };
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition: SoUtilsSystem.h:31
Helper struct for getting access to the OpenGL element array data.
GLElementArrayAccess(GLvoid *indices)
Helper struct for getting access to the OpenGL vertex array data.
~GLVertexArrayAccess()
Unmaps vertex arrays on destruction.
GLVertexArrayAccess()
Maps bound GL vertex array state on construction.