|
11 | 11 | /// \file GPUDisplay.cpp |
12 | 12 | /// \author David Rohr |
13 | 13 |
|
14 | | -//#ifdef GPUCA_O2_LIB |
15 | | -//#include "../src/GL/gl3w.h" |
16 | | -//#else |
17 | | -#include <GL/glew.h> |
18 | | -//#endif |
19 | | - |
20 | 14 | #include "GPUDisplay.h" |
21 | 15 | #include "GPUTPCDef.h" |
22 | 16 |
|
|
53 | 47 |
|
54 | 48 | using namespace GPUCA_NAMESPACE::gpu; |
55 | 49 |
|
56 | | -#if !defined(GL_VERSION_4_5) || GL_VERSION_4_5 != 1 |
57 | | -#error Unsupported OpenGL version < 4.5 |
58 | | -#endif |
59 | | - |
60 | 50 | //#define CHKERR(cmd) {cmd;} |
61 | 51 | #define CHKERR(cmd) \ |
62 | 52 | do { \ |
@@ -158,17 +148,17 @@ void GPUDisplay::calcXYZ() |
158 | 148 | createQuaternionFromMatrix(mQuat, mCurrentMatrix); |
159 | 149 |
|
160 | 150 | /*float mAngle[1] = -asinf(mCurrentMatrix[2]); //Calculate Y-axis angle - for rotX*rotY*rotZ |
161 | | - float C = cosf( angle_y ); |
162 | | - if (fabsf(C) > 0.005) //Gimball lock? |
163 | | - { |
164 | | - mAngle[0] = atan2f(-mCurrentMatrix[6] / C, mCurrentMatrix[10] / C); |
165 | | - mAngle[2] = atan2f(-mCurrentMatrix[1] / C, mCurrentMatrix[0] / C); |
166 | | - } |
167 | | - else |
168 | | - { |
169 | | - mAngle[0] = 0; //set x-angle |
170 | | - mAngle[2] = atan2f(mCurrentMatrix[4], mCurrentMatrix[5]); |
171 | | - }*/ |
| 151 | + float C = cosf( angle_y ); |
| 152 | + if (fabsf(C) > 0.005) //Gimball lock? |
| 153 | + { |
| 154 | + mAngle[0] = atan2f(-mCurrentMatrix[6] / C, mCurrentMatrix[10] / C); |
| 155 | + mAngle[2] = atan2f(-mCurrentMatrix[1] / C, mCurrentMatrix[0] / C); |
| 156 | + } |
| 157 | + else |
| 158 | + { |
| 159 | + mAngle[0] = 0; //set x-angle |
| 160 | + mAngle[2] = atan2f(mCurrentMatrix[4], mCurrentMatrix[5]); |
| 161 | + }*/ |
172 | 162 | } |
173 | 163 |
|
174 | 164 | void GPUDisplay::SetCollisionFirstCluster(unsigned int collision, int slice, int cluster) |
|
0 commit comments