Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
/*
   Copyright (c) 2014 DIVIDE-Studio
   Copyright (c) 2009 Ionut Cava

   This file is part of DIVIDE Framework.

   Permission is hereby granted, free of charge, to any person obtaining a copy of this software
   and associated documentation files (the "Software"), to deal in the Software without restriction,
   including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
   subject to the following conditions:

   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 */

#ifndef _QUATERNION_H_
#define _QUATERNION_H_

/*
http://gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation
Quaternion class based on code from " OpenGL:Tutorials:Using Quaternions to represent rotation "
*/
#include "core.h"

namespace Divide {

template<typename T>
class Quaternion
{
public:
    Quaternion() 
    {
        identity();
    }
    Quaternion(T x, T y, T z, T w) 
    {
        _elements.set(x,y,z,w);
    }
    Quaternion(const vec4<T>& values) 
    {
        _elements.set(values);
    }
    Quaternion(const mat3<T>& rotationMatrix) 
    {
        fromMatrix(rotationMatrix);
    }
    Quaternion(const vec3<T>& axis, T angle,bool inDegrees = true) 
    {
        fromAxisAngle(axis, angle,inDegrees);
    }
    Quaternion(T pitch, T yaw, T roll,bool inDegrees = true) 
    {
        fromEuler(pitch,yaw,roll,inDegrees);
    }
    Quaternion(const Quaternion& q)
    {
        set(q); 
    }

    inline T dot(const Quaternion& rq)  const { return _elements.dot(rq._elements);  }
    inline T magnitude()                const { return _elements.length(); }
    inline T magnituteSq()              const { return _elements.lengthSquared(); }

    inline bool compare(const Quaternion& rq, F32 tolerance = 1e-3f) const {
        T angleRad = RADIANS((T)std::acos((D32)dot(rq)));
        F32 toleranceRad = RADIANS(tolerance);

        return (std::abs(angleRad) <= toleranceRad) || FLOAT_COMPARE_TOLERANCE(angleRad, M_PI, toleranceRad);
    }

    inline void set(const vec4<T>& values) { _elements.set(values); }
    inline void set(T x, T y, T z, T w)    { _elements.set(x, y, z, w); }
    inline void set(const Quaternion& q)   { set(q._elements); } 

    //! normalizing a quaternion works similar to a vector. This method will not do anything
    //! if the quaternion is close enough to being unit-length.
    inline void normalize() { _elements.normalize(); }

    inline Quaternion inverse() const { return getConjugate() * (1.0f / magnitude()); }

    //! We need to get the inverse of a quaternion to properly apply a quaternion-rotation to a vector
    //! The conjugate of a quaternion is the same as the inverse, as long as the quaternion is unit-length
    inline Quaternion getConjugate() const { return Quaternion<T>(-X(), -Y(), -Z(), W());}

    //! Multiplying q1 with q2 applies the rotation q2 to q1
    //! the constructor takes its arguments as (x, y, z, w)
    inline Quaternion operator* (const Quaternion& rq) const {
        return Quaternion<T>(W() * rq.X() + X() * rq.W() + Y() * rq.Z() - Z() * rq.Y(),
                             W() * rq.Y() + Y() * rq.W() + Z() * rq.X() - X() * rq.Z(),
                             W() * rq.Z() + Z() * rq.W() + X() * rq.Y() - Y() * rq.X(),
                             W() * rq.W() - X() * rq.X() - Y() * rq.Y() - Z() * rq.Z());

    }

    //! Multiply so that rotations are applied in a left to right order.
    inline Quaternion& operator*=(const Quaternion& rq){
        (*this) = rq * (*this);
        return (*this);
    }

    //! Multiplying a quaternion q with a vector v applies the q-rotation to v
    vec3<T> operator* (const vec3<T>& vec) const {
        // nVidia SDK implementation
        vec3<T> uv(cross(_elements.xyz(),vec));
        return vec + (uv * (2.0f * W())) + (cross(_elements.xyz(),uv) * 2.0f);
    }

    bool operator==(const Quaternion& rq) const { return compare(rq); }
    bool operator!=(const Quaternion& rq) const { return !(*this == rq); }

    inline Quaternion& operator+=(const Quaternion& rq) {
        _elements += rq._elements;
        return *this;
    }

    inline Quaternion& operator-=(const Quaternion& rq) {
        _elements -= rq._elements;
        return *this;
    }

    inline Quaternion& operator*=(T scalar) {
        _elements *= scalar;
        return *this;
    }

    inline Quaternion& operator/=(T scalar) {
        _elements /= scalar;
        return *this;
    }

    inline Quaternion operator+(const Quaternion& rq) const {
        Quaternion tmp(*this);
        tmp += rq;
        return tmp;
    }

    inline Quaternion operator-(const Quaternion& rq) const {
        Quaternion tmp(*this);
        tmp -= rq;
        return tmp;
    }

    inline Quaternion operator*(T scalar) const {
        Quaternion tmp(*this);
        tmp *= scalar;
        return tmp;
    }

    inline Quaternion operator/(T scalar) const {
        Quaternion tmp(*this);
        tmp /= scalar;
        return tmp;
    }

    inline void slerp(const Quaternion& q, F32 t) {	slerp(*this, q, t); }

    void slerp(const Quaternion& q0,const Quaternion& q1,F32 t) {
        F32 k0,k1;
        T cosomega = q0.dot(q1);
        Quaternion q;
        if(cosomega < 0.0) {
            cosomega = -cosomega;
            q._elements.set(-q1._elements);
        } else {
            q._elements.set(q1._elements);
        }
        if(1.0 - cosomega > 1e-6) {
            F32 omega = (F32)std::acos(cosomega);
            F32 sinomega = (F32)std::sin(omega);
            k0 = (F32)std::sin((1.0f - t) * omega) / sinomega;
            k1 = (F32)std::sin(t * omega) / sinomega;
        } else {
            k0 = 1.0f - t;
            k1 = t;
        }
        _elements.set(q0._elements * k0 + q._elements * k1);
    }

    //! Convert from Axis Angle
    void fromAxisAngle(const vec3<T>& v, T angle, bool inDegrees = true){
        if(inDegrees)
            angle = RADIANS(angle);

        angle *= 0.5f;
        vec3<T> vn(v);
        vn.normalize();

        _elements.set(vn * std::sin(angle), std::cos(angle));
     }

    inline void fromEuler(const vec3<T>& v, bool inDegrees = true) {
        fromEuler(v.pitch,v.yaw,v.roll,inDegrees);
    }

    //! Convert from Euler Angles
    void  fromEuler(T pitch, T yaw, T roll, bool inDegrees = true) {

        T attitude = inDegrees ? RADIANS(pitch) : pitch;
        T heading  = inDegrees ? RADIANS(yaw)   : yaw;
        T bank     = inDegrees ? RADIANS(roll)  : roll;

        D32 c1 = std::cos(heading  * 0.5);
        D32 s1 = std::sin(heading  * 0.5);
        D32 c2 = std::cos(attitude * 0.5);
        D32 s2 = std::sin(attitude * 0.5);
        D32 c3 = std::cos(bank * 0.5);
        D32 s3 = std::sin(bank * 0.5);

        D32 c1c2 = c1*c2;
        D32 s1s2 = s1*s2;

        W((T)(c1c2 * c3 - s1s2 * s3));
        X((T)(c1c2 * s3 + s1s2 * c3));
        Y((T)(s1 * c2 * c3 + c1 * s2 * s3));
        Z((T)(c1 * s2 * c3 - s1 * c2 * s3));

        //normalize(); this method does produce a normalized quaternion
    }

    //a la Ogre3D
    void fromMatrix(const mat3<T>& rotationMatrix) {
        // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
        // article "Quaternion Calculus and Fast Animation".

        T fTrace = rotationMatrix.m[0][0]+rotationMatrix.m[1][1]+rotationMatrix.m[2][2];
        T fRoot;

        if ( fTrace > 0.0 ){
            // |w| > 1/2, may as well choose w > 1/2
            fRoot = (T)std::sqrtf((F32)fTrace + 1.0f);  // 2w
            W(0.5f*fRoot);
            fRoot = 0.5f/fRoot;  // 1/(4w)
            X((rotationMatrix.m[2][1]-rotationMatrix.m[1][2]) * fRoot);
            Y((rotationMatrix.m[0][2]-rotationMatrix.m[2][0]) * fRoot);
            Z((rotationMatrix.m[1][0]-rotationMatrix.m[0][1]) * fRoot);
        }else{
            // |w| <= 1/2
            static size_t s_iNext[3] = { 1, 2, 0 };
            size_t i = 0;
            if ( rotationMatrix.m[1][1] > rotationMatrix.m[0][0] )
                i = 1;
            if ( rotationMatrix.m[2][2] > rotationMatrix.m[i][i] )
                i = 2;
            size_t j = s_iNext[i];
            size_t k = s_iNext[j];

            fRoot = (T)std::sqrtf((F32)(rotationMatrix.m[i][i] - 
                                        rotationMatrix.m[j][j] - 
                                        rotationMatrix.m[k][k] + 
                                        1.0f));
            T* apkQuat[3] = { &_elements.x, &_elements.y, &_elements.z };
            *apkQuat[i] = 0.5f*fRoot;
            fRoot = 0.5f/fRoot;
            W((rotationMatrix.m[k][j]-rotationMatrix.m[j][k]) * fRoot);
            *apkQuat[j] = (rotationMatrix.m[j][i]+rotationMatrix.m[i][j]) * fRoot;
            *apkQuat[k] = (rotationMatrix.m[k][i]+rotationMatrix.m[i][k]) * fRoot;
        }
    }

    //! Convert to Matrix
    void getMatrix(mat4<F32>& outMatrix) const {
        const T& x = X();
        const T& y = Y();
        const T& z = Z();
        const T& w = W();

        T xx  = x * x;
        T xy  = x * y;
        T xz  = x * z;
        T xw  = x * w;
        T yy  = y * y;
        T yz  = y * z;
        T yw  = y * w;
        T zz  = z * z;
        T zw  = z * w;
        outMatrix.mat[0]  = 1 - 2 * ( yy + zz );
        outMatrix.mat[1]  =     2 * ( xy - zw );
        outMatrix.mat[2]  =     2 * ( xz + yw );
        outMatrix.mat[4]  =     2 * ( xy + zw );
        outMatrix.mat[5]  = 1 - 2 * ( xx + zz );
        outMatrix.mat[6]  =     2 * ( yz - xw );
        outMatrix.mat[8]  =     2 * ( xz - yw );
        outMatrix.mat[9]  =     2 * ( yz + xw );
        outMatrix.mat[10] = 1 - 2 * ( xx + yy );
    }

    //! Convert to Axis/Angles
    void getAxisAngle(vec3<T> *axis, T *angle,bool inDegrees) const {
        axis->set(_elements / _elements.xyz().length());
        *angle = inDegrees ? DEGREES(std::acos(W()) * 2.0f) : std::acos(W()) * 2.0f;
    }

    void getEuler(vec3<T> *euler, bool toDegrees = false) const {
        T heading = 0, attitude = 0, bank = 0;
        const T& x = X();
        const T& y = Y();
        const T& z = Z();
        const T& w = W();
        T sqx = x * x;
        T sqy = y * y;
        T sqz = z * z;
        T sqw = w * w;
        T test = x * y + z * w;
        T unit = sqx + sqy + sqz + sqw; // if normalized is one, otherwise is correction factor

        if(test > (0.5f - EPSILON_F32) * unit) { // singularity at north pole
            heading  = 2 * std::atan2(x , w);
            attitude = M_PIDIV2;
            bank     = 0;
        }else if (test < -(0.5f - EPSILON_F32) * unit) { // singularity at south pole
            heading  = -2 * std::atan2(x , w);
            attitude = -M_PIDIV2;
            bank     = 0;
        }else{
            T x2   = 2 * x;
            T y2   = 2 * y;

            heading  = std::atan2(y2 * w - x2 * z , sqx - sqy - sqz + sqw);
            attitude = std::asin(2 * test / unit);
            bank     = std::atan2(x2 * w - y2 * z ,-sqx + sqy - sqz + sqw);
        }
        //Convert back from Z = pitch to Z = roll
        if(toDegrees){
            euler->yaw   = DEGREES(heading);
            euler->pitch = DEGREES(bank);
            euler->roll  = DEGREES(attitude);
        }else{
            euler->yaw   = heading;
            euler->pitch = bank;
            euler->roll  = attitude;
        }
    }

    inline const F32& X() const { return _elements.x; }
    inline const F32& Y() const { return _elements.y; }
    inline const F32& Z() const { return _elements.z; }
    inline const F32& W() const { return _elements.w; }
    
    inline void  X(F32 x)       { _elements.x = x; }
    inline void  Y(F32 y)       { _elements.y = y; }
    inline void  Z(F32 z)       { _elements.z = z; }
    inline void  W(F32 w)       { _elements.w = w; }

    inline void  identity()     { _elements.set(0,0,0,1); }

    inline const vec4<T>& asVec4()  const {return _elements;}

private:
    vec4<T> _elements;
};

/// get the shortest arc quaternion to rotate vector 'v' to the target vector 'u'(from Ogre3D!)
template<typename T>
inline Quaternion<T> rotationFromVToU(const vec3<T>& v, 
                                      const vec3<T>& u, 
                                      const vec3<T> fallbackAxis = VECTOR3_ZERO) {
  // Based on Stan Melax's article in Game Programming Gems
    Quaternion<T> q;
    // Copy, since cannot modify local
    vec3<T> v0 = v;
    vec3<T> v1 = u;
    v0.normalize();
    v1.normalize();
 
    T d = v0.dot(v1);
    // If dot == 1, vectors are the same
    if (d >= 1.0f) {
         return q;
    } else if (d < (1e-6f - 1.0f)) {
        if(!fallbackAxis.compare(VECTOR3_ZERO)) {
            // rotate 180 degrees about the fallback axis
            q.fromAxisAngle(fallbackAxis,RADIANS(M_PI));
        } else {
            // Generate an axis
            vec3<T> axis;
            axis.cross(WORLD_X_AXIS, v);

            if (axis.isZeroLength()) // pick another if collinear
                axis.cross(WORLD_Y_AXIS, v);

            axis.normalize();
            q.fromAxisAngle(axis,RADIANS(M_PI));
        }
    } else {
        F32 s = std::sqrtf( (1+d)*2 );
        F32 invs = 1 / s;
 
        vec3<T> c(cross(v0, v1) * invs);
        q.set(c.x, c.y, c.z, s * 0.5f);
        q.normalize();
    }

    return q;
}

template<typename T>
inline Quaternion<T> slerp(const Quaternion<T>& q0, const Quaternion<T>& q1, F32 t){
    Quaternion<T> temp; temp.slerp(q0, q1, t);
    return temp;
}

template<typename T>
inline mat4<T> getMatrix(const Quaternion<T>& q) {
    mat4<T> temp; q.getMatrix(temp);
    return temp;
}

template<typename T>
inline vec3<T> getEuler(const Quaternion<T>& q, const bool toDegrees = false) {
    vec3<T> euler; q.getEuler(&euler, toDegrees);
    return euler;
}
}; //namespace Divide

#endif

Commits for Divide-Framework/trunk/Source Code/Core/Math/Headers/Quaternion.h

Diff revisions: vs.
Revision Author Commited Message
331 Diff Diff IonutCava picture IonutCava Sat 06 Dec, 2014 20:53:45 +0000

[Ionut]
- Limited line length to 132 characters to improve readability and diff-comparisons
- Refactored memory allocation/deallocation functions
- Fixed a few compatibility issues with HashMap.h
- Fixed a bug in GPU Skinning shaders (cast a float to int)

329 Diff Diff IonutCava picture IonutCava Tue 07 Oct, 2014 12:51:37 +0000

[Ionut]
- Modified material class and shaders to support multiple BRDFs (currently, only Flat, Phong and Blinn-Phong supported with Cook-Torrance and Oren-Nayar in future commits)
- Optimized transform updates and queries
- Fixed an indirect draw command (no buffer was bound to GL_DRAW_INDIRECT_BUFFER, violating a core requirement)

318 Diff Diff IonutCava picture IonutCava Sat 30 Aug, 2014 17:35:53 +0000

[Ionut]
- Wrapped the entire code in a “Divide” namespace
- VertexBuffers now call “shrink_to_fit” on all internal data storage
- Improved some vector performance by preferring “emplace_back” instead of “push_back” + proepr usage of reserve / resize
- Wrapped OIS specific types and classes in Divide::Input namespace
- Added the messageBox.layout file (forgot it in the previous few commits)

302 Diff Diff IonutCava picture IonutCava Wed 06 Aug, 2014 22:09:55 +0000

[Ionut]
- GenericVertexData buffer size (for read/write buffering) is now configurable instead of a fixed 3x and also applies to non-persistently mapped buffers
- Moved OpenGL enum tables to Divide::GLUtil::GL_ENUM_TABLE
- More code cleanups (glResources, glError, glVertexArray, glGenericVertexData, glIMPrimitive)

293 Diff Diff k1ngp1n picture k1ngp1n Tue 29 Jul, 2014 20:01:28 +0000

[Ionut]
- Code cleanup and comments in GLFWWrapper (for starters. more to follow)
- Reworked main loop logic (no more delegates and rendering api querying)
- Replaced all GLvoid with regular void
- replaced all boost::this_thread::sleep (deprecated calls) with boost::this_thread::sleep_for

289 Diff Diff IonutCava picture IonutCava Fri 25 Jul, 2014 17:46:28 +0000

[Ionut]
- Added transform interpolation support to avoid object stuttering when frame rate varies (see Transform.cpp)
- Updated the quaternion class to be a wrapper around a regular vec4 to take advantage of it’s built in functions (length, dot, cross, etc)

273 Diff Diff IonutCava picture IonutCava Wed 11 Jun, 2014 20:34:00 +0000

[Ionut] [[BR]]
- Improved batching part2: [[BR]]
— Moved all bone transformation matrices upload from uniform functions in SceneNode to Shader Storage Buffers in AnimationController class with updates controlled by SceneGraphNode’s AnimationComponent [[BR]]
-— No double-buffering or efficient mapping of data yet. Just raw buffer updates [[BR]]
— Replaced all RenderStateBlock* pointers with I64 hash values [[BR]]
-— Will be used later in draw commands as per-shader state hash [[BR]]
— Moved getShaderProgram from Material to Material::ShaderInfo [[BR]]
-— Improved redundant uniform checks [[BR]]
— Improved texture unit changing in case of redundant texture bind case (i.e. skip changing the texture unit) [[BR]]
[[BR]]
- Improved float and double comparison functions using algorithms described in http://randomascii.wordpress.com/2012/02/13/dont-store-that-in-a-float/ [[BR]]
- Added a new utility function, DIVIDE_ASSERT, to more easily bind an assert check with a specific message [[BR]]
- Added missing files from Forward+ renderer’s initial code [[BR]]

264 Diff Diff k1ngp1n picture k1ngp1n Tue 27 May, 2014 13:04:38 +0000

[Ionut] [[BR]]
- New camera system: [[BR]]
— Stack based (push/pop active camera) [[BR]]
— Per camera frustum [[BR]]
— Per camera projection [[BR]]
— Shadow mapping now uses the new camera system (each light has a shadow camera) [[BR]]
[[BR]]
- New terrain, water and vegetation system: [[BR]]
— Direct import of terrain from L3DT both as 8-bit grayscale and 16-bit raw formats [[BR]]
— Multiple alpha maps for texture splatting support [[BR]]
— Per texture detail map support [[BR]]
— Transform feedback based visibility culling for vegetation [[BR]]
— Alpha-map based vegetation placing on terrain [[BR]]
— Water now uses a refraction map instead of alpha blending for better refraction effects [[BR]]
[[BR]]
- SceneGraph improvements: [[BR]]
— Better bounding box updates from child to parent [[BR]]
— Better onDraw / postDraw implementation [[BR]]
[[BR]]
- Performance improvements: [[BR]]
— Batch 2D rendering tasks together as much as possible[[BR]]
— Improve renderStateBlock hash generation for better sorting [[BR]]
— Move most state related gfx changes from API implementation to the GFXDevice class [[BR]]
— Move viewport stack to the GFXDevice class [[BR]]
— Added various performance counters (frame duration with round-robin query system, draw call count, etc) [[BR]]
— Fixed and improved clip plane management [[BR]]
— Delete client-side texture data after GPU upload [[BR]]
[[BR]]
- New features: [[BR]]
— Added callback support to the Task class so that a specific task may call a function in the main thread upon completion [[BR]]
— Added mouse-wheel zoom support to Orbit/ThirdPerson cameras [[BR]]
— Added 2D Texture Array support (e.g. used for terrain textures) [[BR]]

259 Diff Diff k1ngp1n picture k1ngp1n Sun 27 Apr, 2014 18:24:52 +0000

[Ionut][[BR]]
- Implemented Exponential Stable Cascaded Shadow Maps for directional lights (still buggy, but basically working) [[BR]]
— CSM settings (resolution, number of splits, etc) are part of the scene render state [[BR]]
- SGN can skip rendering for the current frame if they are not ready (e.g. OnDraw can now return false or materials can fail to bind) [[BR]]
- Frustum class is now using the Plane class [[BR]]
- Removed Math SIMD implementation as the compiler generated code will always be faster and safer [[BR]]
- Added a “STUBBED” macro for outputing to the error stream of important messages (instead of using #pragma message) [[BR]]
- Added “freeze time” logic to pause/resume updates with or without freezing the GUI too [[BR]]
- Added “processGUI” method the every Scene class to separate time-sensitive GUI updates from game logic loop [[BR]]
- GLSL <-> Vertex Buffer bind locations are automatically set for every vertex shader [[BR]]
- Added basic support for compute shaders [[BR]]
- Removed most OS define checks to make porting to a new platform easier [[BR]]
- Texture transparency check per-pixel is now using OpenMP [[BR]]
- Texture samplers can now set a border color for CLAMP_TO_BORDER wrap mode [[BR]]
- Removed “Object” suffix from GFX Classes (pixel buffer, vertex buffer, frame buffer, etc) [[BR]]
- Stop processing scene input when application looses focus [[BR]]
- SceneGraphNode class is now responsible for updating SGNComponents on draw and calling its _node’s OnDraw method [[BR]]
- UBOs can now list all of the active uniforms inside a block with info such as type and offset [[BR]]
- Removed deprecated ‘GLCheck’ macro [[BR]]
- A lot of bug fixes and performance improvements in various places [[BR]]

242 k1ngp1n picture k1ngp1n Mon 03 Feb, 2014 21:05:28 +0000

[Ionut] [[BR]]
- Smoother third person camera [[BR]]
- Smoother Character movement [[BR]]
- Limit third person camera rotations (-179 ... + 179 yaw, -31.5 ... +60 pitch) [[BR]]
- Character and third person camera performance optimizations [[BR]]