diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-02-10 18:11:31 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-03-06 19:27:19 -0800 |
| commit | 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 (patch) | |
| tree | 48fae2cac1ed47ec5912dca4bf00716509192225 /Source/Core/VideoBackends/OGL/OGLRender.cpp | |
| parent | db8ced7e4e4724c38f148ee449c346e447dd3942 (diff) | |
Convert BPMemory to BitField and enum class
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLRender.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLRender.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLRender.cpp b/Source/Core/VideoBackends/OGL/OGLRender.cpp index 6b99327fee..3bcf38c2ae 100644 --- a/Source/Core/VideoBackends/OGL/OGLRender.cpp +++ b/Source/Core/VideoBackends/OGL/OGLRender.cpp @@ -1140,11 +1140,11 @@ void Renderer::ApplyRasterizationState(const RasterizationState state) return; // none, ccw, cw, ccw - if (state.cullmode != GenMode::CULL_NONE) + if (state.cullmode != CullMode::None) { // TODO: GX_CULL_ALL not supported, yet! glEnable(GL_CULL_FACE); - glFrontFace(state.cullmode == GenMode::CULL_FRONT ? GL_CCW : GL_CW); + glFrontFace(state.cullmode == CullMode::Front ? GL_CCW : GL_CW); } else { @@ -1166,7 +1166,7 @@ void Renderer::ApplyDepthState(const DepthState state) { glEnable(GL_DEPTH_TEST); glDepthMask(state.updateenable ? GL_TRUE : GL_FALSE); - glDepthFunc(glCmpFuncs[state.func]); + glDepthFunc(glCmpFuncs[u32(state.func.Value())]); } else { @@ -1229,8 +1229,10 @@ void Renderer::ApplyBlendingState(const BlendingState state) GLenum equation = state.subtract ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD; GLenum equationAlpha = state.subtractAlpha ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD; glBlendEquationSeparate(equation, equationAlpha); - glBlendFuncSeparate(src_factors[state.srcfactor], dst_factors[state.dstfactor], - src_factors[state.srcfactoralpha], dst_factors[state.dstfactoralpha]); + glBlendFuncSeparate(src_factors[u32(state.srcfactor.Value())], + dst_factors[u32(state.dstfactor.Value())], + src_factors[u32(state.srcfactoralpha.Value())], + dst_factors[u32(state.dstfactoralpha.Value())]); } const GLenum logic_op_codes[16] = { @@ -1244,7 +1246,7 @@ void Renderer::ApplyBlendingState(const BlendingState state) if (state.logicopenable) { glEnable(GL_COLOR_LOGIC_OP); - glLogicOp(logic_op_codes[state.logicmode]); + glLogicOp(logic_op_codes[u32(state.logicmode.Value())]); } else { |
