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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 "nanovg.h"
  27. #include <SDL2/SDL.h>
  28. namespace vtk {
  29. class Game;
  30. class TestScene : public Scene {
  31. public:
  32. void init(); // Called first time the scene is set
  33. void reInit(); // Called when switching from another scene
  34. void update(const float& dTime); //Logic
  35. void draw(); //Graphics
  36. //Game functions
  37. void look(); //look with camera
  38. protected:
  39. unsigned vao;
  40. unsigned shaders;
  41. float dTime;
  42. float mFPS;
  43. Camera camera;
  44. SDL_Event event;
  45. World world;
  46. Skybox mSkybox;
  47. RenderTask* mSkyboxTask;
  48. NVGcontext* vg; //nanovg context
  49. //stuff
  50. float sensitivity;
  51. glm::vec3 camMovement;
  52. glm::vec3 mCamLastLoadPosition;
  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. }