forked from chebee7i/DTS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataItem.h
More file actions
67 lines (51 loc) · 2.42 KB
/
DataItem.h
File metadata and controls
67 lines (51 loc) · 2.42 KB
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
/*******************************************************************************
DataItem: OpenGL context data.
Copyright (c) 2006-2008 Jordan Van Aalsburg, Oliver Kreylos
This file is part of the Dynamics Toolset.
The Dynamics Toolset is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
The Dynamics Toolset is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
along with the Dynamics Toolset. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#ifndef DATA_ITEM_H
#define DATA_ITEM_H
// Vrui includes
//
#include <GL/GLObject.h>
#include <GL/GLContextData.h>
#include <GL/GLExtensionManager.h>
#include <GL/Extensions/GLARBPointParameters.h>
#include <GL/Extensions/GLARBVertexBufferObject.h>
#include <GL/Extensions/GLARBShaderObjects.h>
namespace DTS
{
/** Data structure storing OpenGL-dependent application data.
*/
struct DataItem: public GLObject::DataItem
{
public:
bool hasPointParameterExtension; ///< Flag whether point parameters are supported.
bool hasVertexBufferObjectExtension; ///< GFlag whether VBOs are supported.
bool hasShaders; ///< Flag whether local OpenGL supports GLSL shaders.
GLuint vertexBufferId; ///< Vertex object buffer ID.
GLuint spriteTextureObjectId; ///< Texture object ID for point sprites.
unsigned int version; ///< Used for syncing VOB rendering.
/* State for vertex / fragment shaders: */
GLhandleARB vertexShaderObject, fragmentShaderObject, programObject; ///< Shader for proper point size attenuation
GLint scaledParticleRadiusLocation; ///< Location of particle radius uniform variable in shader program
GLint tex0Location; ///< Location of texture sample uniform variable in shader program
int numParticles; ///< Number of particles still alive at last step()
/* Variables for StaticSolverTool */
GLuint dataDisplayListId;
unsigned int dataDisplayListVersion;
DataItem(void);
virtual ~DataItem(void);
};
}
#endif