/*
	ZOpenGLWindowRenderTarget.hpp
	Author: James Russell <jcrussell@762studios.com>
	Created: 04/01/2011

	Purpose: 
	
	Initializes and manages an OpenGL window.

	License:

	TODO
*/

#pragma once

#ifndef _ZOPENGLWINDOWRENDERTARGET_HPP
#define _ZOPENGLWINDOWRENDERTARGET_HPP

#include <ZRenderer/ZWindowRenderTargetBase.hpp>

//Forward Declarations
class ZOpenGLRenderer;

/*
Screen Render Target for the OpenGL library.
*/
class ZOpenGLWindowRenderTarget : public ZWindowRenderTargetBase
{
private:
	DISABLE_COPY_AND_ASSIGN(ZOpenGLWindowRenderTarget);

protected:
	//Renderer Instance
	ZOpenGLRenderer *Renderer;

public:
	//OpenGL Context
	SST_OpenGLContext GLContext;

	/*
	Parameterized Constructor.

	@param _renderer - the renderer instance
	@param _glContext - the OpenGL context to bind to this window
	@param _window - the window instance (created with libsst-wm)
	@param _screen - the screen index chosen
	*/
	ZOpenGLWindowRenderTarget(ZOpenGLRenderer* _renderer, SST_OpenGLContext _glContext, SST_Window _window, size_t _screenIndex);

	/*
	Destructor.
	*/
	~ZOpenGLWindowRenderTarget();

	//Subclass Override
	virtual bool SwapBuffers();
};

#endif
