You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

testscene.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * =====================================================================================
  3. *
  4. * Filename: testscene.h
  5. *
  6. * Description: Scene for testing. It's full of funky bullshit, and should not be
  7. used for real things.
  8. *
  9. * Version: 1.0
  10. * Created: 03/24/2014 11:02:55 PM
  11. * Revision: none
  12. * Compiler: gcc
  13. *
  14. * Author: YOUR NAME (),
  15. * Organization:
  16. *
  17. * =====================================================================================
  18. */
  19. #pragma once
  20. #include "scene.h"
  21. #include "graphics/camera.h"
  22. #include "inputhandler.h"
  23. #include "world.h"
  24. #include "graphics/skybox.h"
  25. #include "graphics/shader.h"
  26. #include <SDL2/SDL.h>
  27. namespace vtk {
  28. class Game;
  29. class TestScene : public Scene {
  30. public:
  31. void init(); // Called first time the scene is set
  32. void reInit(); // Called when switching from another scene
  33. void update(const float& dTime); //Logic
  34. void draw(); //Graphics
  35. //Game functions
  36. void look(); //look with camera
  37. protected:
  38. unsigned vertVBO;
  39. unsigned texVBO;
  40. unsigned vao;
  41. unsigned shaders;
  42. unsigned cursorShaders;
  43. Shader mCursorShader;
  44. float dTime;
  45. Camera camera;
  46. SDL_Event event;
  47. World world;
  48. Skybox mSkybox;
  49. RenderTask* mSkyboxTask;
  50. //stuff
  51. float sensitivity;
  52. glm::vec3 camMovement;
  53. bool placeVoxel;
  54. unsigned voxelType;
  55. //controls
  56. InputHandler handler;
  57. //shader uniforms
  58. int viewMatUni;
  59. int projMatUni;
  60. int modelMatUni;
  61. };
  62. }