Skip to content

Commit

Permalink
change unique_ptr back to shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzzhHe authored and heinezen committed Jan 2, 2025
1 parent fb00aa5 commit 1bd9f28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GlRenderer::GlRenderer(const std::shared_ptr<GlContext> &ctx,
display{std::make_shared<GlRenderTarget>(ctx,
viewport_size[0],
viewport_size[1])},
shared_quad_vao{std::make_unique<GlVertexArray>(ctx)} {
shared_quad_vao{std::make_shared<GlVertexArray>(ctx)} {
// color used to clear the color buffers
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GlRenderer final : public Renderer {
/// that bufferless quad geometry can be drawn without errors. Drawing a
/// bufferless quad requires any VAO to be bound
/// see https://www.khronos.org/opengl/wiki/Vertex_Rendering#Causes_of_rendering_failure
std::unique_ptr<GlVertexArray> shared_quad_vao;
std::shared_ptr<GlVertexArray> shared_quad_vao;
};

} // namespace opengl
Expand Down

0 comments on commit 1bd9f28

Please sign in to comment.