Simple game engine with complete export to scripting language
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.

57 lines
1.1KB

  1. #ifndef BLUECORE_RENDERDEVICE_H
  2. #define BLUECORE_RENDERDEVICE_H
  3. #include "RenderWindow.h"
  4. #include "Camera.h"
  5. #include "Material.h"
  6. #include "Utilities/Buffer.h"
  7. #include "Utilities/Referenced.h"
  8. #include "Utilities/sigslot.h"
  9. namespace BlueCore
  10. {
  11. class RenderDevice : public Referenced, public sigslot::has_slots<>
  12. {
  13. private:
  14. int _ViewportWidth, _ViewportHeight;
  15. void WindowResizeSlot(int width, int height);
  16. void WindowCloseSlot();
  17. ref_ptr<RenderWindow> _RenderWindow;
  18. ref_ptr<Camera> _Camera;
  19. public:
  20. RenderDevice(RenderWindow* renderWindow);
  21. ~RenderDevice();
  22. int getViewportWidth();
  23. int getViewportHeight();
  24. void begin2D();
  25. void end2D();
  26. void clear();
  27. void swap();
  28. void setAmbientLight(float r, float g, float b);
  29. void setMaterial(Material *);
  30. void setTexture(unsigned int unit, unsigned int texture);
  31. void begin3D(Camera *);
  32. void setTransformation (const Vector3&, const Quaternion&);
  33. void setupProjectionMatrix();
  34. void setupViewMatrix();
  35. sigslot::signal0<> DeviceShutdownSignal;
  36. //Buffer<ShadowFace> &_ShadowFaces;
  37. };
  38. } // namespaced BlueCore
  39. #endif // BLUECORE_RENDERDEVICE_H