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.

61 lines
1.2 KiB

13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
  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. unsigned int _ActiveTextures;
  20. public:
  21. RenderDevice(RenderWindow* renderWindow);
  22. ~RenderDevice();
  23. int getViewportWidth();
  24. int getViewportHeight();
  25. void begin2D();
  26. void end2D();
  27. void begin3D(Camera *);
  28. void end3D();
  29. void clear();
  30. void swap();
  31. void setAmbientLight(float r, float g, float b);
  32. void setMaterial(Material *);
  33. void setTexture(unsigned int unit, Texture* texture, bool last = false);
  34. void pushTransformation (const Vector3&, const Quaternion&);
  35. void popTransformation ();
  36. void setupProjectionMatrix();
  37. void setupViewMatrix();
  38. sigslot::signal0<> DeviceShutdownSignal;
  39. //Buffer<ShadowFace> &_ShadowFaces;
  40. };
  41. } // namespaced BlueCore
  42. #endif // BLUECORE_RENDERDEVICE_H