// Author: Juan Carlos De Abreu (jcabreur@gmail.com)
//
// This file define a class that allow to the app do the render using the
// OpenGL API.

#ifndef RENDERER_OPENGL_RENDERER_H__
#define RENDERER_OPENGL_RENDERER_H__

#include "../global.h"
#include "renderer.h"

BEGIN_TEG_NAMESPACE();

class OpenGLRenderer : public IRenderer {
 public:
  // OpenGLRenderer constructor and destructor.
  OpenGLRenderer(HWND _hWnd, bool _bFullscreen = true);
  ~OpenGLRenderer();

  // Attributes
  bool bFullscreen;
  HDC hDC; // Private GDI Device Context
  HGLRC hRC; // Permanent Rendering Context
  HWND hWnd;

  // Methods to do the render and to resize the windows
  virtual void render();
  virtual void resize(int width, int height);

  // Method to set the projection.
  void setProjection();
  AUTO_SIZE();

 private:
  DISALLOW_COPY_AND_ASSIGN(OpenGLRenderer);
};

END_TEG_NAMESPACE();

#endif  // RENDERER_OPENGL_RENDERER_H__
