Changeset 0b1b52d in opengl-game for opengl-game.hpp
- Timestamp:
- Oct 4, 2019, 8:27:07 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 771b33a
- Parents:
- 83b5b4b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
opengl-game.hpp
r83b5b4b r0b1b52d 9 9 #include "game-gui-glfw.hpp" 10 10 #include "graphics-pipeline_opengl.hpp" 11 12 // TODO: Figure out if these structs should be defined in the OpenGLGame class 13 14 enum ObjectType { 15 TYPE_SHIP, 16 TYPE_ASTEROID, 17 TYPE_LASER, 18 TYPE_EXPLOSION, 19 }; 20 21 struct SceneObject { 22 unsigned int id; 23 ObjectType type; 24 bool deleted; 25 26 // Currently, model_transform should only have translate, and rotation and scale need to be done in model_base since 27 // they need to be done when the object is at the origin. I should change this to have separate scale, rotate, and translate 28 // matrices for each object that can be updated independently and then applied to the object in that order. 29 // TODO: Actually, to make this as generic as possible, each object should have a matrix stack to support, 30 // for instance, applying a rotate, then a translate, then another rotate. Think about and implement the best approach. 31 glm::mat4 model_mat, model_base, model_transform; 32 glm::mat4 translate_mat; // beginning of doing what's mentioned above 33 unsigned int num_points; 34 GLuint vertex_vbo_offset; 35 GLuint ubo_offset; 36 vector<GLfloat> points; 37 vector<GLfloat> colors; 38 vector<GLfloat> texcoords; 39 vector<GLfloat> normals; 40 glm::vec3 bounding_center; 41 GLfloat bounding_radius; 42 }; 43 44 struct ParticleEffect : SceneObject { 45 vector<GLfloat> particleVelocities; 46 vector<GLfloat> particleTimes; 47 GLfloat startTime; 48 GLfloat duration; 49 }; 11 50 12 51 class OpenGLGame {
Note:
See TracChangeset
for help on using the changeset viewer.