#pragma once

#include "openGLControl.h"

class COpenGLWinApp
{
private:
	HINSTANCE hInstance;
	string sAppName;
	HANDLE hMutex;
	bool bAppActive;
	clock_t tLastFrame;
	float fFrameInterval;

public:
	HWND hWnd;
	COpenGLControl oglControl;

	void resetTimer();
	void updateTimer();
	float sof(float fVal);
	bool initializeApp(string a_sAppName);
	void registerAppClass(HINSTANCE hAppInstance);
	bool createWindow(string sTitle);
	void appBody();
	void shutdown();
	HINSTANCE getInstance();
	LRESULT CALLBACK msgHandlerMain(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
};

namespace Keys
{
	int key(int iKey);
	int onekey(int iKey);
	extern char kp[256];
}

extern COpenGLWinApp appMain;

void initScene(LPVOID), renderScene(LPVOID), releaseScene(LPVOID);
