text: // COMP710 GP 2D Framework 2017
  #ifndef __BACKBUFFER_H__
  #define __BACKBUFFER_H__
  
  // Forward Declarations:
  class TextureManager;
  class Sprite;
  class AnimatedSprite;
  
  struct SDL_Window;
  struct SDL_Renderer;
  
  class BackBuffer
  {
  	//Member Methods:
  public:
  	BackBuffer();
  	~BackBuffer();
  
  	bool Initialise(int width, int height);
  
  	void Clear();
  	void Present();
  
  	void SetClearColour(unsigned char r, unsigned char g, unsigned char b);
  
  	void SetDrawColour(unsigned char r, unsigned char g, unsigned char b);
  	void SetDrawColour(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
  
  	void DrawSprite(Sprite& sprite);
  	void DrawAnimatedSprite(AnimatedSprite& animatedSprite);
  	void DrawScrollingBackground(Sprite& sprite, int scrollingOffset);
  	void DrawRectangle(int x1, int y1, int x2, int y2);
  	void DrawLine(int x1, int y1, int x2, int y2);
  
  	Sprite* CreateSprite(const char* pcFilename);
  	AnimatedSprite* CreateAnimatedSprite(const char* pcFileName, int frames);
  
  	void UpdateCamera(float x, float y);
  
  	SDL_Renderer* GetRenderer();
  
  protected:
  	void LogSDLError();
  
  private:
  	BackBuffer(const BackBuffer& backBuffer);
  	BackBuffer& operator=(const BackBuffer& backBuffer);
  
  	//Member Data:
  public:
  
  protected:
  	TextureManager* m_pTextureManager;
  
  	SDL_Window* m_pWindow;
  	SDL_Renderer* m_pRenderer;
  
  	int m_width;
  	int m_height;
  
  	unsigned char m_clearRed;
  	unsigned char m_clearGreen;
  	unsigned char m_clearBlue;
  
  	float cameraX;
  	float cameraY;
  
  private:
  
  };
  
  #endif // __BACKBUFFER_H__
  