mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Feat] (MG_Impl/RenderState): Implement some RenderState GL functions.
This commit is contained in:
@@ -225,11 +225,11 @@ namespace MobileGL {
|
||||
m_renderState.GetBlendFunc(srcRGB, dstRGB, srcAlpha, dstAlpha);
|
||||
}
|
||||
|
||||
void GLContext::SetDepthFunc(DepthFunc func) {
|
||||
void GLContext::SetDepthFunc(DepthTestFunc func) {
|
||||
m_renderState.SetDepthFunc(func);
|
||||
}
|
||||
|
||||
DepthFunc GLContext::GetDepthFunc() const {
|
||||
DepthTestFunc GLContext::GetDepthFunc() const {
|
||||
return m_renderState.GetDepthFunc();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ namespace MobileGL {
|
||||
void SetBlendFunc(BlendFactor srcRGB, BlendFactor dstRGB, BlendFactor srcAlpha, BlendFactor dstAlpha);
|
||||
void GetBlendFunc(BlendFactor& srcRGB, BlendFactor& dstRGB, BlendFactor& srcAlpha,
|
||||
BlendFactor& dstAlpha) const;
|
||||
void SetDepthFunc(DepthFunc func);
|
||||
DepthFunc GetDepthFunc() const;
|
||||
void SetDepthFunc(DepthTestFunc func);
|
||||
DepthTestFunc GetDepthFunc() const;
|
||||
void SetDepthMask(Bool flag);
|
||||
Bool GetDepthMask() const;
|
||||
void SetColorMask(BoolVec4 mask);
|
||||
|
||||
@@ -75,11 +75,11 @@ namespace MobileGL {
|
||||
}
|
||||
|
||||
// -------------------- Depth --------------------
|
||||
void RenderState::SetDepthFunc(DepthFunc func) {
|
||||
void RenderState::SetDepthFunc(DepthTestFunc func) {
|
||||
m_depthFunc = func;
|
||||
}
|
||||
|
||||
DepthFunc RenderState::GetDepthFunc() const {
|
||||
DepthTestFunc RenderState::GetDepthFunc() const {
|
||||
return m_depthFunc;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace MobileGL {
|
||||
Unknown = -1
|
||||
};
|
||||
|
||||
enum class DepthFunc {
|
||||
enum class DepthTestFunc {
|
||||
Never,
|
||||
Less,
|
||||
Equal,
|
||||
@@ -31,7 +31,7 @@ namespace MobileGL {
|
||||
NotEqual,
|
||||
GreaterEqual,
|
||||
Always,
|
||||
DepthFuncCount,
|
||||
DepthTestFuncCount,
|
||||
Unknown = -1
|
||||
};
|
||||
|
||||
@@ -128,8 +128,8 @@ namespace MobileGL {
|
||||
BlendFactor& dstAlpha) const;
|
||||
|
||||
// Depth
|
||||
void SetDepthFunc(DepthFunc func);
|
||||
DepthFunc GetDepthFunc() const;
|
||||
void SetDepthFunc(DepthTestFunc func);
|
||||
DepthTestFunc GetDepthFunc() const;
|
||||
void SetDepthMask(Bool flag);
|
||||
Bool GetDepthMask() const;
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace MobileGL {
|
||||
|
||||
// Depth
|
||||
Bool m_depthTestEnabled = false;
|
||||
DepthFunc m_depthFunc = DepthFunc::Less;
|
||||
DepthTestFunc m_depthFunc = DepthTestFunc::Less;
|
||||
Bool m_depthMask = true;
|
||||
|
||||
// Color Mask
|
||||
|
||||
Reference in New Issue
Block a user