GLContext::GLContext(HWND hwnd) 
{
	this->hwnd = hwnd;
	create30Context(); // Create a context given a HWND
	
	ShowWindow(this->hwnd, SW_SHOW);
    UpdateWindow(this->hwnd);
}
GLContext::GLContext()
{
	LPCWSTR title = L"Virtual Sculpting";

	WNDCLASSW windowClass;
	HWND hWnd;
	DWORD dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;

	hInstance = GetModuleHandle(NULL);

	windowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
	windowClass.lpfnWndProc = (WNDPROC) WndProc;
	windowClass.cbClsExtra = 0;
	windowClass.cbWndExtra = 0;
	windowClass.hInstance = hInstance;
	windowClass.hIcon = LoadIcon(NULL, IDI_WINLOGO);
	windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
	windowClass.hbrBackground = NULL;
	windowClass.lpszMenuName = NULL;
	windowClass.lpszClassName = title;

	if (!RegisterClassW(&windowClass)) {
		return;
	}

	// define the screen resolution
	#define SCREEN_WIDTH  1920
	#define SCREEN_HEIGHT 1080

	hWnd = CreateWindowExW(dwExStyle, title, title, NULL | WS_MAXIMIZE,
				     0, 0, 1920, 1080, NULL, NULL, hInstance, NULL);

	this->hwnd = hWnd;

	create30Context(); // Create a context given a HWND
	
	ShowWindow(this->hwnd, SW_SHOW);
    UpdateWindow(this->hwnd);
}
/*
Constructor for the OpenGlContext class which will create a context given a windows HWND
*/
OpenGLContext::OpenGLContext(HWND hwnd) {
	create30Context(hwnd); // Create a context given a HWND
}