Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rtoumazet committed Oct 22, 2024
1 parent e36a215 commit f31248e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions saturnin/src/video/opengl/opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ constexpr auto vertexes_per_line = u32{2};
constexpr auto fbo_texture_array_depth = u16{14};
constexpr auto max_fbo_texture = u8{20};

enum class RenderType { RenderType_drawElements, RenderType_drawTest };
constexpr auto render_type = RenderType::RenderType_drawElements;

enum class TextureArrayType : u8 { saturn_part, framebuffer };
enum class FboTextureType : u8 { front_buffer, back_buffer, vdp1_debug_overlay, vdp2_debug_layer, priority };
enum class GuiTextureType : u8 { render_buffer, vdp1_debug_buffer, vdp2_debug_buffer, layer_buffer };
Expand Down Expand Up @@ -140,7 +137,6 @@ struct DrawRange {
gl::GLenum primitive; ///< The primitive used to draw the indices in the range.
};

using LayerToTextures = std::unordered_map<VdpLayer, std::vector<OpenglTexture>>;
using LayerToTextureArrayIndexes = std::unordered_map<VdpLayer, std::vector<u8>>;
using LayerToCacheReloadState = std::unordered_map<VdpLayer, bool>;

Expand Down
3 changes: 3 additions & 0 deletions saturnin/src/video/opengl/opengl_render.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

namespace saturnin::video {

enum class RenderType { RenderType_drawElements, RenderType_drawTest };
constexpr auto render_type = RenderType::RenderType_drawElements;

using MapOfPartsList = std::map<FboKey, PartsList>; // Parts list by priority + layer

class OpenglRender {
Expand Down
1 change: 1 addition & 0 deletions saturnin/src/video/opengl/opengl_textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void Opengl::generateTextures() {
auto local_textures_link = TexturesLink();
local_textures_link = textures_link_;

using LayerToTextures = std::unordered_map<VdpLayer, std::vector<OpenglTexture>>;
auto layer_to_textures = LayerToTextures{};

for (const auto& [key, ogl_tex] : local_textures_link) {
Expand Down

0 comments on commit f31248e

Please sign in to comment.