Introduced usage of OSG_GLES*_AVAILABLE macros to headers and .cpp's to enable building against OpenGL ES 1.x and 2.x headers
This commit is contained in:
@@ -51,6 +51,11 @@ LightModel::~LightModel()
|
||||
void LightModel::apply(State&) const
|
||||
{
|
||||
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
|
||||
|
||||
#ifdef OSG_GLES1_AVAILABLE
|
||||
#define glLightModeli glLightModelx
|
||||
#endif
|
||||
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,_ambient.ptr());
|
||||
|
||||
static bool s_separateSpecularSupported = strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0;
|
||||
@@ -66,7 +71,10 @@ void LightModel::apply(State&) const
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OSG_GLES1_AVAILABLE
|
||||
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,_localViewer);
|
||||
#endif
|
||||
|
||||
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,_twoSided);
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: LightModel::apply(State&) - not supported."<<std::endl;
|
||||
|
||||
Reference in New Issue
Block a user