Skip to content

wesleydarnell/GLExamples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

1. Grid Example

This very bare bones OpenGL project doubles as a demonstration of my general design approach for organizing gl initialization, shaders, user input, camera, and the game loop. It's 325 lines and all in main.cpp which is obviously not what you want to do and was done for readability.

Image

void main() {

	GL::Init(1920, 1080, "GridExample");
	Game::Init();
	Renderer::Init();

	while (GL::WindowIsOpen()) {
		Input::Update();
		Game::Update();
		Renderer::RenderFrame();
		GL::SwapBuffersPollEvents();
	}

	GL::Cleanup();
	return;
}

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 96.4%
  • GLSL 3.6%