Renamed FaceCulling enum to FaceSide
Former-commit-id: 7847dcd64e0b23d261a9ec07f3bc1a3c162985e5
This commit is contained in:
@@ -231,7 +231,7 @@ NzTexture* NzMaterial::GetEmissiveMap() const
|
||||
return m_emissiveMap;
|
||||
}
|
||||
|
||||
nzFaceCulling NzMaterial::GetFaceCulling() const
|
||||
nzFaceSide NzMaterial::GetFaceCulling() const
|
||||
{
|
||||
return m_states.faceCulling;
|
||||
}
|
||||
@@ -370,6 +370,8 @@ bool NzMaterial::LoadFromStream(NzInputStream& stream, const NzMaterialParams& p
|
||||
|
||||
void NzMaterial::Reset()
|
||||
{
|
||||
NotifyDestroy();
|
||||
|
||||
m_alphaMap.Reset();
|
||||
m_diffuseMap.Reset();
|
||||
m_emissiveMap.Reset();
|
||||
@@ -506,9 +508,9 @@ void NzMaterial::SetEmissiveMap(NzTexture* map)
|
||||
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)
|
||||
|
||||
@@ -177,7 +177,7 @@ void NzOpenGL::ApplyStates(const NzRenderStates& states)
|
||||
{
|
||||
if (currentRenderStates.faceCulling != states.faceCulling)
|
||||
{
|
||||
glCullFace(FaceCulling[states.faceCulling]);
|
||||
glCullFace(FaceSide[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");
|
||||
|
||||
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] =
|
||||
{
|
||||
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");
|
||||
|
||||
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] =
|
||||
{
|
||||
GL_LINES, // nzPrimitiveMode_LineList
|
||||
|
||||
Reference in New Issue
Block a user