[Improvement] (MG_State/RenderState): Remove redundant cullFaceEnabled setter/getter.

This commit is contained in:
BZLZHH
2025-10-03 12:25:36 +08:00
parent 1e2922faa5
commit 30d4964a5e
4 changed files with 2 additions and 20 deletions
-8
View File
@@ -281,14 +281,6 @@ namespace MobileGL {
return m_renderState.GetCullFaceMode(); return m_renderState.GetCullFaceMode();
} }
void GLContext::SetCullFaceEnabled(Bool enabled) {
m_renderState.SetCullFaceEnabled(enabled);
}
Bool GLContext::IsCullFaceEnabled() const {
return m_renderState.IsCullFaceEnabled();
}
// Framebuffer // Framebuffer
Vector<Uint> GLContext::GenFramebufferNames(Uint number) { Vector<Uint> GLContext::GenFramebufferNames(Uint number) {
return m_framebufferState.GenerateNames(number); return m_framebufferState.GenerateNames(number);
-2
View File
@@ -90,8 +90,6 @@ namespace MobileGL {
Int GetPixelStoreParam(PixelStoreParam param) const; Int GetPixelStoreParam(PixelStoreParam param) const;
void SetCullFaceMode(CullFaceMode mode); void SetCullFaceMode(CullFaceMode mode);
CullFaceMode GetCullFaceMode() const; CullFaceMode GetCullFaceMode() const;
void SetCullFaceEnabled(Bool enabled);
Bool IsCullFaceEnabled() const;
// Framebuffer // Framebuffer
Vector<Uint> GenFramebufferNames(Uint number); Vector<Uint> GenFramebufferNames(Uint number);
@@ -50,6 +50,8 @@ namespace MobileGL {
return m_blendEnabled; return m_blendEnabled;
case CapabilityInput::DepthTest: case CapabilityInput::DepthTest:
return m_depthTestEnabled; return m_depthTestEnabled;
case CapabilityInput::CullFace:
return m_cullFaceEnabled;
default: default:
return false; return false;
} }
@@ -132,14 +134,6 @@ namespace MobileGL {
CullFaceMode RenderState::GetCullFaceMode() const { CullFaceMode RenderState::GetCullFaceMode() const {
return m_cullFaceMode; return m_cullFaceMode;
} }
void RenderState::SetCullFaceEnabled(Bool enabled) {
m_cullFaceEnabled = enabled;
}
Bool RenderState::IsCullFaceEnabled() const {
return m_cullFaceEnabled;
}
} // namespace GLState } // namespace GLState
} // namespace MG_State } // namespace MG_State
} // namespace MobileGL } // namespace MobileGL
@@ -150,8 +150,6 @@ namespace MobileGL {
// Cull Face // Cull Face
void SetCullFaceMode(CullFaceMode mode); void SetCullFaceMode(CullFaceMode mode);
CullFaceMode GetCullFaceMode() const; CullFaceMode GetCullFaceMode() const;
void SetCullFaceEnabled(Bool enabled);
Bool IsCullFaceEnabled() const;
private: private:
// Rasterization // Rasterization