~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/include/osg/Uniform

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
3
4
 *
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
11
12
*/
12
13
 
13
14
/* file:   include/osg/Uniform
14
 
 * author: Mike Weiblen 2006-05-15
 
15
 * author: Mike Weiblen 2008-01-02
15
16
*/
16
17
 
17
18
#ifndef OSG_UNIFORM
35
36
class NodeVisitor;
36
37
 
37
38
///////////////////////////////////////////////////////////////////////////
38
 
// C++ classes to represent the GLSL-specific "mat2" & "mat3" types.
 
39
// C++ classes to represent the GLSL-specific types.
39
40
 
40
41
class OSG_EXPORT Matrix2
41
42
{
137
138
        float _mat[3][3];
138
139
};
139
140
 
 
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
 
148
 
 
149
 
140
150
///////////////////////////////////////////////////////////////////////////
141
151
 
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,
173
 
            
 
183
 
 
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,
 
212
 
174
213
            UNDEFINED = 0x0
175
214
        };
176
215
 
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
239
279
 
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(); }
379
419
 
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; }
384
424
 
433
473
}
434
474
 
435
475
#endif
436
 
 
437
 
/*EOF*/