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
}

View File

@@ -758,10 +758,10 @@ void State::setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* p
{
disableAllVertexArrays();
#ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
#if defined(OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE)
glInterleavedArrays( format, stride, pointer);
#else
osg::notify(osg::NOTICE)<<"Warning: State::setInterleavedArrays(..) not implemented."<<std::endl;
#endif
// the crude way, assume that all arrays have been effected so dirty them and