Renamed FaceCulling enum to FaceSide
Former-commit-id: 7847dcd64e0b23d261a9ec07f3bc1a3c162985e5
This commit is contained in:
parent
52b0ed7e72
commit
e92f388c65
|
|
@ -64,7 +64,7 @@ class NAZARA_API NzMaterial : public NzResource
|
||||||
const NzTextureSampler& GetDiffuseSampler() const;
|
const NzTextureSampler& GetDiffuseSampler() const;
|
||||||
nzBlendFunc GetDstBlend() const;
|
nzBlendFunc GetDstBlend() const;
|
||||||
NzTexture* GetEmissiveMap() const;
|
NzTexture* GetEmissiveMap() const;
|
||||||
nzFaceCulling GetFaceCulling() const;
|
nzFaceSide GetFaceCulling() const;
|
||||||
nzFaceFilling GetFaceFilling() const;
|
nzFaceFilling GetFaceFilling() const;
|
||||||
NzTexture* GetHeightMap() const;
|
NzTexture* GetHeightMap() const;
|
||||||
NzTexture* GetNormalMap() const;
|
NzTexture* GetNormalMap() const;
|
||||||
|
|
@ -107,7 +107,7 @@ class NAZARA_API NzMaterial : public NzResource
|
||||||
void SetDstBlend(nzBlendFunc func);
|
void SetDstBlend(nzBlendFunc func);
|
||||||
bool SetEmissiveMap(const NzString& texturePath);
|
bool SetEmissiveMap(const NzString& texturePath);
|
||||||
void SetEmissiveMap(NzTexture* map);
|
void SetEmissiveMap(NzTexture* map);
|
||||||
void SetFaceCulling(nzFaceCulling culling);
|
void SetFaceCulling(nzFaceSide faceSide);
|
||||||
void SetFaceFilling(nzFaceFilling filling);
|
void SetFaceFilling(nzFaceFilling filling);
|
||||||
bool SetHeightMap(const NzString& texturePath);
|
bool SetHeightMap(const NzString& texturePath);
|
||||||
void SetHeightMap(NzTexture* map);
|
void SetHeightMap(NzTexture* map);
|
||||||
|
|
|
||||||
|
|
@ -133,8 +133,8 @@ class NAZARA_API NzOpenGL
|
||||||
static GLenum BufferTargetBinding[nzBufferType_Max+1];
|
static GLenum BufferTargetBinding[nzBufferType_Max+1];
|
||||||
static GLenum BufferUsage[nzBufferUsage_Max+1];
|
static GLenum BufferUsage[nzBufferUsage_Max+1];
|
||||||
static GLenum CubemapFace[6]; // Un cube possède six faces et ça n'est pas prêt de changer
|
static GLenum CubemapFace[6]; // Un cube possède six faces et ça n'est pas prêt de changer
|
||||||
static GLenum FaceCulling[nzFaceCulling_Max+1];
|
|
||||||
static GLenum FaceFilling[nzFaceFilling_Max+1];
|
static GLenum FaceFilling[nzFaceFilling_Max+1];
|
||||||
|
static GLenum FaceSide[nzFaceSide_Max+1];
|
||||||
static GLenum PrimitiveMode[nzPrimitiveMode_Max+1];
|
static GLenum PrimitiveMode[nzPrimitiveMode_Max+1];
|
||||||
static GLenum QueryCondition[nzGpuQueryCondition_Max+1];
|
static GLenum QueryCondition[nzGpuQueryCondition_Max+1];
|
||||||
static GLenum QueryMode[nzGpuQueryMode_Max+1];
|
static GLenum QueryMode[nzGpuQueryMode_Max+1];
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ struct NzRenderStates
|
||||||
|
|
||||||
nzBlendFunc dstBlend;
|
nzBlendFunc dstBlend;
|
||||||
nzBlendFunc srcBlend;
|
nzBlendFunc srcBlend;
|
||||||
nzFaceCulling faceCulling;
|
|
||||||
nzFaceFilling faceFilling;
|
nzFaceFilling faceFilling;
|
||||||
|
nzFaceSide faceCulling;
|
||||||
nzRendererComparison depthFunc;
|
nzRendererComparison depthFunc;
|
||||||
nzRendererComparison stencilCompare;
|
nzRendererComparison stencilCompare;
|
||||||
nzStencilOperation stencilFail;
|
nzStencilOperation stencilFail;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
inline NzRenderStates::NzRenderStates() :
|
inline NzRenderStates::NzRenderStates() :
|
||||||
dstBlend(nzBlendFunc_Zero),
|
dstBlend(nzBlendFunc_Zero),
|
||||||
srcBlend(nzBlendFunc_One),
|
srcBlend(nzBlendFunc_One),
|
||||||
faceCulling(nzFaceCulling_Back),
|
|
||||||
faceFilling(nzFaceFilling_Fill),
|
faceFilling(nzFaceFilling_Fill),
|
||||||
|
faceCulling(nzFaceSide_Back),
|
||||||
depthFunc(nzRendererComparison_Less),
|
depthFunc(nzRendererComparison_Less),
|
||||||
stencilCompare(nzRendererComparison_Always),
|
stencilCompare(nzRendererComparison_Always),
|
||||||
stencilFail(nzStencilOperation_Keep),
|
stencilFail(nzStencilOperation_Keep),
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ NzTexture* NzMaterial::GetEmissiveMap() const
|
||||||
return m_emissiveMap;
|
return m_emissiveMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
nzFaceCulling NzMaterial::GetFaceCulling() const
|
nzFaceSide NzMaterial::GetFaceCulling() const
|
||||||
{
|
{
|
||||||
return m_states.faceCulling;
|
return m_states.faceCulling;
|
||||||
}
|
}
|
||||||
|
|
@ -370,6 +370,8 @@ bool NzMaterial::LoadFromStream(NzInputStream& stream, const NzMaterialParams& p
|
||||||
|
|
||||||
void NzMaterial::Reset()
|
void NzMaterial::Reset()
|
||||||
{
|
{
|
||||||
|
NotifyDestroy();
|
||||||
|
|
||||||
m_alphaMap.Reset();
|
m_alphaMap.Reset();
|
||||||
m_diffuseMap.Reset();
|
m_diffuseMap.Reset();
|
||||||
m_emissiveMap.Reset();
|
m_emissiveMap.Reset();
|
||||||
|
|
@ -506,9 +508,9 @@ void NzMaterial::SetEmissiveMap(NzTexture* map)
|
||||||
InvalidatePrograms(nzShaderTarget_Model);
|
InvalidatePrograms(nzShaderTarget_Model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzMaterial::SetFaceCulling(nzFaceCulling culling)
|
void NzMaterial::SetFaceCulling(nzFaceSide faceSide)
|
||||||
{
|
{
|
||||||
m_states.faceCulling = culling;
|
m_states.faceCulling = faceSide;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzMaterial::SetFaceFilling(nzFaceFilling filling)
|
void NzMaterial::SetFaceFilling(nzFaceFilling filling)
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ void NzOpenGL::ApplyStates(const NzRenderStates& states)
|
||||||
{
|
{
|
||||||
if (currentRenderStates.faceCulling != states.faceCulling)
|
if (currentRenderStates.faceCulling != states.faceCulling)
|
||||||
{
|
{
|
||||||
glCullFace(FaceCulling[states.faceCulling]);
|
glCullFace(FaceSide[states.faceCulling]);
|
||||||
currentRenderStates.faceCulling = states.faceCulling;
|
currentRenderStates.faceCulling = states.faceCulling;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1856,15 +1856,6 @@ GLenum NzOpenGL::CubemapFace[6] =
|
||||||
|
|
||||||
static_assert(sizeof(NzOpenGL::CubemapFace)/sizeof(GLenum) == 6, "Cubemap face array is incomplete");
|
static_assert(sizeof(NzOpenGL::CubemapFace)/sizeof(GLenum) == 6, "Cubemap face array is incomplete");
|
||||||
|
|
||||||
GLenum NzOpenGL::FaceCulling[nzFaceCulling_Max+1] =
|
|
||||||
{
|
|
||||||
GL_BACK, // nzFaceCulling_Back
|
|
||||||
GL_FRONT, // nzFaceCulling_Front
|
|
||||||
GL_FRONT_AND_BACK // nzFaceCulling_FrontAndBack
|
|
||||||
};
|
|
||||||
|
|
||||||
static_assert(sizeof(NzOpenGL::FaceCulling)/sizeof(GLenum) == nzFaceCulling_Max+1, "Face culling array is incomplete");
|
|
||||||
|
|
||||||
GLenum NzOpenGL::FaceFilling[nzFaceFilling_Max+1] =
|
GLenum NzOpenGL::FaceFilling[nzFaceFilling_Max+1] =
|
||||||
{
|
{
|
||||||
GL_POINT, // nzFaceFilling_Point
|
GL_POINT, // nzFaceFilling_Point
|
||||||
|
|
@ -1874,6 +1865,15 @@ GLenum NzOpenGL::FaceFilling[nzFaceFilling_Max+1] =
|
||||||
|
|
||||||
static_assert(sizeof(NzOpenGL::FaceFilling)/sizeof(GLenum) == nzFaceFilling_Max+1, "Face filling array is incomplete");
|
static_assert(sizeof(NzOpenGL::FaceFilling)/sizeof(GLenum) == nzFaceFilling_Max+1, "Face filling array is incomplete");
|
||||||
|
|
||||||
|
GLenum NzOpenGL::FaceSide[nzFaceSide_Max+1] =
|
||||||
|
{
|
||||||
|
GL_BACK, // nzFaceSide_Back
|
||||||
|
GL_FRONT, // nzFaceSide_Front
|
||||||
|
GL_FRONT_AND_BACK // nzFaceSide_FrontAndBack
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(NzOpenGL::FaceSide)/sizeof(GLenum) == nzFaceSide_Max+1, "Face side array is incomplete");
|
||||||
|
|
||||||
GLenum NzOpenGL::PrimitiveMode[nzPrimitiveMode_Max+1] =
|
GLenum NzOpenGL::PrimitiveMode[nzPrimitiveMode_Max+1] =
|
||||||
{
|
{
|
||||||
GL_LINES, // nzPrimitiveMode_LineList
|
GL_LINES, // nzPrimitiveMode_LineList
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue