bluecore/engine/RenderDevice.h

62 lines
1.2 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;
2008-01-18 14:00:18 +01:00
unsigned int _ActiveTextures;
2008-01-17 17:42:24 +01:00
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-18 14:00:18 +01:00
void begin3D(Camera *);
void end3D();
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-18 14:00:18 +01:00
void setTexture(unsigned int unit, Texture* texture, bool last = false);
void pushTransformation (const Vector3&, const Quaternion&);
void popTransformation ();
2008-01-17 17:42:24 +01:00
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