1
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2
2
* Copyright (C) 2003-2005 3Dlabs Inc. Ltd.
3
* Copyright (C) 2008 Zebra Imaging
4
5
* This application is open source and may be redistributed and/or modified
5
6
* freely and without restriction, both in commericial and non commericial
137
138
float _mat[3][3];
141
// TODO add new GL 2.1 non-square matrix types
142
// class OSG_EXPORT Matrix2x3
143
// class OSG_EXPORT Matrix3x2
144
// class OSG_EXPORT Matrix2x4
145
// class OSG_EXPORT Matrix4x2
146
// class OSG_EXPORT Matrix3x4
147
// class OSG_EXPORT Matrix4x3
140
150
///////////////////////////////////////////////////////////////////////////
142
152
/** Uniform encapsulates glUniform values */
170
180
SAMPLER_2D_ARRAY = GL_SAMPLER_2D_ARRAY_EXT,
171
181
SAMPLER_1D_ARRAY_SHADOW = GL_SAMPLER_1D_ARRAY_SHADOW_EXT,
172
182
SAMPLER_2D_ARRAY_SHADOW = GL_SAMPLER_2D_ARRAY_SHADOW_EXT,
184
// TODO the following must be integrated fully here and Uniform.cpp
185
FLOAT_MAT2x3 = GL_FLOAT_MAT2x3,
186
FLOAT_MAT2x4 = GL_FLOAT_MAT2x4,
187
FLOAT_MAT3x2 = GL_FLOAT_MAT3x2,
188
FLOAT_MAT3x4 = GL_FLOAT_MAT3x4,
189
FLOAT_MAT4x2 = GL_FLOAT_MAT4x2,
190
FLOAT_MAT4x3 = GL_FLOAT_MAT4x3,
191
SAMPLER_BUFFER = GL_SAMPLER_BUFFER_EXT,
192
SAMPLER_CUBE_SHADOW = GL_SAMPLER_CUBE_SHADOW_EXT,
193
UNSIGNED_INT_VEC2 = GL_UNSIGNED_INT_VEC2_EXT,
194
UNSIGNED_INT_VEC3 = GL_UNSIGNED_INT_VEC3_EXT,
195
UNSIGNED_INT_VEC4 = GL_UNSIGNED_INT_VEC4_EXT,
196
INT_SAMPLER_1D = GL_INT_SAMPLER_1D_EXT,
197
INT_SAMPLER_2D = GL_INT_SAMPLER_2D_EXT,
198
INT_SAMPLER_3D = GL_INT_SAMPLER_3D_EXT,
199
INT_SAMPLER_CUBE = GL_INT_SAMPLER_CUBE_EXT,
200
INT_SAMPLER_2D_RECT = GL_INT_SAMPLER_2D_RECT_EXT,
201
INT_SAMPLER_1D_ARRAY = GL_INT_SAMPLER_1D_ARRAY_EXT,
202
INT_SAMPLER_2D_ARRAY = GL_INT_SAMPLER_2D_ARRAY_EXT,
203
INT_SAMPLER_BUFFER = GL_INT_SAMPLER_BUFFER_EXT,
204
UNSIGNED_INT_SAMPLER_1D = GL_UNSIGNED_INT_SAMPLER_1D_EXT,
205
UNSIGNED_INT_SAMPLER_2D = GL_UNSIGNED_INT_SAMPLER_2D_EXT,
206
UNSIGNED_INT_SAMPLER_3D = GL_UNSIGNED_INT_SAMPLER_3D_EXT,
207
UNSIGNED_INT_SAMPLER_CUBE = GL_UNSIGNED_INT_SAMPLER_CUBE_EXT,
208
UNSIGNED_INT_SAMPLER_2D_RECT = GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT,
209
UNSIGNED_INT_SAMPLER_1D_ARRAY = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT,
210
UNSIGNED_INT_SAMPLER_2D_ARRAY = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT,
211
UNSIGNED_INT_SAMPLER_BUFFER = GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT,
236
275
Uniform( const char* name, bool b0, bool b1 );
237
276
Uniform( const char* name, bool b0, bool b1, bool b2 );
238
277
Uniform( const char* name, bool b0, bool b1, bool b2, bool b3 );
278
// TODO must add new types
240
280
/** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */
241
281
virtual int compare(const Uniform& rhs) const;
378
418
const Callback* getEventCallback() const { return _eventCallback.get(); }
380
420
/** Increment the modified count on the Uniform so Programs watching it know it update themselves.
381
* NOTE: autotomatically called during osg::Uniform::set*();
421
* NOTE: automatically called during osg::Uniform::set*();
382
422
* you must call if modifying the internal data array directly. */
383
423
inline void dirty() { ++_modifiedCount; }