// RC.h: interface for the CRC class.
// this class is especially for opengl in MFC

//////////////////////////////////////////////////////////////////////
//this Class is provided by Zhangli
#ifndef RC_H
#define RC_H

#include <gl/gl.h>
#include <gl/glu.h>

const GLfloat CLEAR_COLOR[4] = { 0.0, 0.0, 0.0, 0.0 };

class CRC
{
protected:
	int				m_iPixelFormat;
	CDC				*m_pDC;
	HGLRC			m_hRC;

    const GLubyte	*m_pVender, *m_pRenderer, *m_pVersion;
	GLubyte			*m_ExtensionPtr;	// ptr to memory we allocated
    CStringArray	m_ExtensionArray;	// array of all extensions, neatly parsed
	enum			DriverTypes { eGeneric, eMiniClient, eInstallableClient };
	DriverTypes		m_eCurrentDriver;	// This guy can tell you the fastest pixel format 

	void FetchExtendedInformation( void );

public:
	CRC();
	virtual ~CRC();

	virtual bool SetupPixelFormat( void );
	bool Create( CWnd * );	
	virtual void Initialize( void );
	void Destroy( void );

	void FinishAndSwap( void );
};

#endif
