bluecore/engine/RenderDevice.h

57 lines
1.1 KiB
C
Raw Normal View History

2008-01-16 12:45:17 +01:00
#ifndef BLUECORE_RENDERDEVICE_H
#define BLUECORE_RENDERDEVICE_H
#include "RenderWindow.h"
2008-01-17 17:42:24 +01:00
#include "Camera.h"
#include "Material.h"
2008-01-16 12:45:17 +01:00
#include "Utilities/Buffer.h"
#include "Utilities/Referenced.h"
#include "Utilities/sigslot.h"
namespace BlueCore
{
class RenderDevice : public Referenced, public sigslot::has_slots<>
{
2008-01-17 17:42:24 +01:00
private:
int _ViewportWidth, _ViewportHeight;
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
void WindowResizeSlot(int width, int height);
void WindowCloseSlot();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
ref_ptr<RenderWindow> _RenderWindow;
ref_ptr<Camera> _Camera;
public:
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
RenderDevice(RenderWindow* renderWindow);
~RenderDevice();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
int getViewportWidth();
int getViewportHeight();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
void begin2D();
void end2D();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
void clear();
void swap();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
void setAmbientLight(float r, float g, float b);
void setMaterial(Material *);
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
void setTexture(unsigned int unit, unsigned int texture);
void begin3D(Camera *);
void setTransformation (const Vector3&, const Quaternion&);
void setupProjectionMatrix();
void setupViewMatrix();
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
sigslot::signal0<> DeviceShutdownSignal;
2008-01-16 12:45:17 +01:00
2008-01-17 17:42:24 +01:00
//Buffer<ShadowFace> &_ShadowFaces;
2008-01-16 12:45:17 +01:00
};
} // namespaced BlueCore
#endif // BLUECORE_RENDERDEVICE_H