Fixed build on OpenGLES-1.1 and OpenGLES-2.0 targets

This commit is contained in:
Robert Osfield
2009-10-27 18:07:12 +00:00
parent 8454d414a8
commit e720a7a956
3 changed files with 17 additions and 15 deletions

View File

@@ -29,7 +29,11 @@ Depth::~Depth()
void Depth::apply(State&) const
{
glDepthFunc((GLenum)_func);
glDepthRange(_zNear,_zFar);
glDepthMask((GLboolean)_depthWriteMask);
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
glDepthRangef(_zNear,_zFar);
#else
glDepthRange(_zNear,_zFar);
#endif
}