Main
Modern but no further
- OpenGL 3.3
- C++11
- CMake 3.14
robcr829
Implement a simple flight simulator with a focus on exploring different techniques and libraries to make future extensions as simple as possible.
Modern but no further
As boring as possible
You are in a maze of twisty little passages, all alike
glewinfo
, glewcompat
glbinding-tools
, glqueries
Smoke ’em if you got ’em
-pedantic -Werror -Wall -Wextra -W...
-fsanitize=address,leak,undefined
Productivity
I will, in fact, claim that the difference between a bad programmer and a good one is whether they consider their code or their data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
gltest
#include <glproject.hpp>
#include <gltest.hpp>
GLTEST(2, 0, 640, 480, glproject)
{
gltest_root("tests");
GLTEST_EXPECT_VALUE(
glIsEnabled(GL_DEPTH_TEST),
GL_FALSE
)
GLTEST_EXPECT_EXCEPTION(
true,
file_open("nonexistent"),
"Could not open file 'nonexistent':\n"
// "No such file or directory"
)
GLTEST_EXPECT_FRAME("frame.data")
}
>>> Expression:
glIsEnabled(GL_DEPTH_TEST)
>>> Expected value:
GL_FALSE = 0
>>> Got:
1
>>> Expression:
file_open("nonexistent")
>>> Expected exception:
Could not open file 'nonexistent':
>>> Got: none
Frame did not match expected frame 'frame.data'.
glbackend
{glfw}
glshader
glUniform{,Matrix}{1,2,3,4}{f,i,ui}{,v}
glUniform1f
glUniform1fv
glUniform1i
glUniform1iv
glUniform1ui
glUniform1uiv
glUniform2f
glUniform2fv
glUniform2i
glUniform2iv
glUniform2ui
glUniform2uiv
glUniform3f
glUniform3fv
glUniform3i
glUniform3iv
glUniform3ui
glUniform3uiv
glUniform4f
glUniform4fv
glUniform4i
glUniform4iv
glUniform4ui
glUniform4uiv
glUniformMatrix1f
glUniformMatrix1fv
glUniformMatrix1i
glUniformMatrix1iv
glUniformMatrix1ui
glUniformMatrix1uiv
glUniformMatrix2f
glUniformMatrix2fv
glUniformMatrix2i
glUniformMatrix2iv
glUniformMatrix2ui
glUniformMatrix2uiv
glUniformMatrix3f
glUniformMatrix3fv
glUniformMatrix3i
glUniformMatrix3iv
glUniformMatrix3ui
glUniformMatrix3uiv
glUniformMatrix4f
glUniformMatrix4fv
glUniformMatrix4i
glUniformMatrix4iv
glUniformMatrix4ui
glUniformMatrix4uiv
glCompileShader GL_COMPILE_STATUS glGetShaderiv glGetShaderInfoLog
glLinkProgram GL_LINK_STATUS glGetProgramiv glGetProgramInfoLog
glValidateProgram GL_VALIDATE_STATUS glGetProgramiv glGetProgramInfoLog
glmodel
{obj,terrain,water}
Vertex attributes
Shader uniforms
glrenderer
gl{,Multi}Draw{Arrays,{,Range}Elements,TransformFeedback{,Stream}}{,Instanced{,BaseVertex}{,BaseInstance},Indirect}
glDrawArrays
glDrawArraysInstanced
glDrawArraysInstancedBaseInstance
glDrawArraysInstancedBaseVertex
glDrawArraysInstancedBaseVertexBaseInstance
glDrawArraysIndirect
glDrawElements
glDrawElementsInstanced
glDrawElementsInstancedBaseInstance
glDrawElementsInstancedBaseVertex
glDrawElementsInstancedBaseVertexBaseInstance
glDrawElementsIndirect
glDrawRangeElements
glDrawRangeElementsInstanced
glDrawRangeElementsInstancedBaseInstance
glDrawRangeElementsInstancedBaseVertex
glDrawRangeElementsInstancedBaseVertexBaseInstance
glDrawRangeElementsIndirect
glDrawTransformFeedback
glDrawTransformFeedbackInstanced
glDrawTransformFeedbackInstancedBaseInstance
glDrawTransformFeedbackInstancedBaseVertex
glDrawTransformFeedbackInstancedBaseVertexBaseInstance
glDrawTransformFeedbackIndirect
glDrawTransformFeedbackStream
glDrawTransformFeedbackStreamInstanced
glDrawTransformFeedbackStreamInstancedBaseInstance
glDrawTransformFeedbackStreamInstancedBaseVertex
glDrawTransformFeedbackStreamInstancedBaseVertexBaseInstance
glDrawTransformFeedbackStreamIndirect
glMultiDrawArrays
glMultiDrawArraysInstanced
glMultiDrawArraysInstancedBaseInstance
glMultiDrawArraysInstancedBaseVertex
glMultiDrawArraysInstancedBaseVertexBaseInstance
glMultiDrawArraysIndirect
glMultiDrawElements
glMultiDrawElementsInstanced
glMultiDrawElementsInstancedBaseInstance
glMultiDrawElementsInstancedBaseVertex
glMultiDrawElementsInstancedBaseVertexBaseInstance
glMultiDrawElementsIndirect
glMultiDrawRangeElements
glMultiDrawRangeElementsInstanced
glMultiDrawRangeElementsInstancedBaseInstance
glMultiDrawRangeElementsInstancedBaseVertex
glMultiDrawRangeElementsInstancedBaseVertexBaseInstance
glMultiDrawRangeElementsIndirect
glMultiDrawTransformFeedback
glMultiDrawTransformFeedbackInstanced
glMultiDrawTransformFeedbackInstancedBaseInstance
glMultiDrawTransformFeedbackInstancedBaseVertex
glMultiDrawTransformFeedbackInstancedBaseVertexBaseInstance
glMultiDrawTransformFeedbackIndirect
glMultiDrawTransformFeedbackStream
glMultiDrawTransformFeedbackStreamInstanced
glMultiDrawTransformFeedbackStreamInstancedBaseInstance
glMultiDrawTransformFeedbackStreamInstancedBaseVertex
glMultiDrawTransformFeedbackStreamInstancedBaseVertexBaseInstance
glMultiDrawTransformFeedbackStreamIndirect
glDrawElementsInstancedBaseVertex
glframebuffer
{,2d,3d}
glcamera
Use glm::vec3 position, look_at
-> glm::mat4 view
glgame