Skip to content

Commit 8187c7a

Browse files
committed
fix: syntax errors
1 parent 5995909 commit 8187c7a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

content/archive/opengl_renderer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ just an extra large buffer on the GPU we can use. A uniform buffer object is
101101
similar, but faster, it is however, much smaller too.
102102
```cpp
103103
std::vector<Material> mesh_materials = ...;
104-
glNamedBufferData(material_buffer, mesh_materials.size() * sizeof(material), mesh_materials.data(), flags)
104+
glNamedBufferData(material_buffer, mesh_materials.size() * sizeof(material), mesh_materials.data(), flags);
105105
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, binding, material_buffer);
106106
```
107107
Inefficiency aside, let's assume the `mesh_materials` contains the material
@@ -176,13 +176,13 @@ It just read my mind. With OpenGL Multi Draw Indirect (MDI), commands can be
176176
stored and then sent all at once.
177177
```cpp
178178
struct DrawCommand {
179-
std::uint32_t count; // how many indices
180-
std::uint32_t instance_count; // how many instances to draw
181-
std::uint32_t first_index; // offset to the first indice
182-
std::uint32_t base_vertex; // offset to the first vertex
183-
std::uint32_t base_instance; // offset for when drawing multiple instances
179+
std::uint32_t count; // how many indices
180+
std::uint32_t instance_count; // how many instances to draw
181+
std::uint32_t first_index; // offset to the first indice
182+
std::uint32_t base_vertex; // offset to the first vertex
183+
std::uint32_t base_instance; // offset for when drawing multiple instances
184184
};
185-
std::vector<DrawCommand> commands
185+
std::vector<DrawCommand> commands;
186186

187187
glNamedBufferStorage(command_buffer, sizeof(DrawCommand) * commands.size(), commands.data(), GL_DYNAMIC_STORAGE_BIT);
188188
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, command_buffer);

0 commit comments

Comments
 (0)