#pragma once

#include "openGLControl.h"

class COpenGLWinApp
{
public:
	char *Title;
	HWND hWnd;
	COpenGLControl oglControl;

private:
	DWORD LastFrameTime, LastFPSTime, FPS;
	float FrameTime;

public:
	bool createWindow(HINSTANCE hInstance, char *Title, int Width, int Height);
	void appBody();
	void shutdown();
	void resetTimer();
	void updateTimer();
	float sof(float fVal);
};

extern COpenGLWinApp appMain;

LRESULT CALLBACK WndProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR sCmdLine, int iShow);

bool initScene();
void renderScene();
void resizeScene(int Width, int Height);
void releaseScene();
