-
Notifications
You must be signed in to change notification settings - Fork 6
Renderer
Alegruz edited this page Apr 16, 2021
·
7 revisions
- Set error callback (UNIX GLFW)
- Initialize Dependencies (UNIX GLFW)
- Initialize Window
- Initialize Device
- Register Class (WIN32
WNDCLASSEX
) - Create Window
- Show Window (WIN32
ShowWindow
) - Set Callbacks (UNIX GLFW)
- Window Size
- Key
- Char
- Make Context Current (UNIX)
- Initialize Dependencies (UNIX GL3W)
- Set up Vertices and Indices
- Create Buffer (for vertices and indices.
glCreateBuffer
) - Bind Buffers (
GL_ARRAY_BUFFER
for vertices andGL_ELEMENT_ARRAY_BUFFER
for indices.glBindBuffer
) - Store Buffers (
glNamedBufferStorage
) - Compile Shaders
- Load Textures (lodepng)
- Create Textures (
glCreateTextures
) - Bind Texture (
glBindTextureUnit
) - Get uniform location for Texture (
glGetUniformLocation
) - Set Texture Parameters (
glTextureParameter*
) - Store Texture (
glTextureStorage2D
) - Create Image (1glTextureSubImage2D`)
- Generate Mipmap (
glGenerateTextureMipmap
) - Get uniform location for Texture and set (
glUniform*
) - Create Vertex Arrays (
glCreateVertexArrays
) - Send vertex data to vertex shader (
glVertexAttribPointer
)- position
- texture coordinate
- Clear buffer (
glClearBuffer*
) - Bind Texture Unit (
glBindTextureUnit
) - Bind Vertex Array (
glBindVertexArray
) - Bind Buffers (
glBindBuffer
. bind element array buffer) - Draw (
glDrawArrays
,glDrawElements
) - Swap buffers (
glfwSwapBuffers
)