Changeset a23fc08 in opengl-game for new-game.cpp
- Timestamp:
- May 24, 2019, 8:52:32 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 6abfd07
- Parents:
- 98f06d9
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (05/24/19 20:22:31)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (05/24/19 20:52:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
r98f06d9 ra23fc08 198 198 unsigned char* loadImage(string file_name, int* x, int* y); 199 199 200 void printVec3(string label, const vec3& v);201 void printVec4(string label, const vec4& v);202 void printMat4(string label, const mat4& m);203 204 200 void initObject(SceneObject* obj); 205 201 void addObjectToScene(SceneObject* obj, … … 255 251 void initGuiValueLists(map<string, vector<UIValue>> valueLists); 256 252 void renderGuiValueList(vector<UIValue>& values); 257 258 float getRandomNum(float low, float high);259 253 260 254 #define NUM_KEYS (512) … … 1348 1342 } 1349 1343 1350 void printVec3(string label, const vec3& v) {1351 cout << label << " -> (" << v.x << "," << v.y << "," << v.z << ")" << endl;1352 }1353 1354 void printVec4(string label, const vec4& v) {1355 cout << label << " -> (" << v.x << "," << v.y << "," << v.z << "," << v.w << ")" << endl;1356 }1357 1358 void printMat4(string label, const mat4& m) {1359 cout << label << ": " << endl;1360 cout << "[ " << m[0][0] << " " << m[1][0] << " " << m[2][0] << " " << m[3][0] << " ]" << endl;1361 cout << "[ " << m[0][1] << " " << m[1][1] << " " << m[2][1] << " " << m[3][1] << " ]" << endl;1362 cout << "[ " << m[0][2] << " " << m[1][2] << " " << m[2][2] << " " << m[3][2] << " ]" << endl;1363 cout << "[ " << m[0][3] << " " << m[1][3] << " " << m[2][3] << " " << m[3][3] << " ]" << endl;1364 }1365 1366 1344 // TODO: Pass a reference, not a pointer 1367 1345 void initObject(SceneObject* obj) { … … 2736 2714 return obj; 2737 2715 } 2738 2739 float getRandomNum(float low, float high) {2740 return low + ((float)rand() / RAND_MAX) * (high-low);2741 }
Note:
See TracChangeset
for help on using the changeset viewer.