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