Fixes for Win32 build
This commit is contained in:
@@ -163,7 +163,7 @@ class MySceneView : public osgUtil::SceneView {
|
||||
// override the basic SceneView::app traversal.
|
||||
virtual void app()
|
||||
{
|
||||
osgUtil::SceneView::app();
|
||||
SceneView::app();
|
||||
switch (_viewerMode)
|
||||
{
|
||||
case(MASTER):
|
||||
|
||||
@@ -108,7 +108,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(osg::NOTICE)<<"unable to load reflect map, model will not be mutlitextured"<<endl;
|
||||
osg::notify(osg::NOTICE)<<"unable to load reflect map, model will not be mutlitextured"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -392,3 +392,48 @@ Polytope State::getViewFrustum() const
|
||||
cv.transformProvidingInverse((*_modelView)*(*_projection));
|
||||
return cv;
|
||||
}
|
||||
|
||||
typedef void (APIENTRY * ActiveTextureProc) (GLenum texture);
|
||||
|
||||
bool State::setClientActiveTextureUnit( unsigned int unit )
|
||||
{
|
||||
if (unit!=_currentClientActiveTextureUnit)
|
||||
{
|
||||
static ActiveTextureProc s_glClientActiveTexture =
|
||||
(ActiveTextureProc) osg::getGLExtensionFuncPtr("glClientActiveTexture","glClientActiveTextureARB");
|
||||
|
||||
if (s_glClientActiveTexture)
|
||||
{
|
||||
s_glClientActiveTexture(GL_TEXTURE0+unit);
|
||||
_currentClientActiveTextureUnit = unit;
|
||||
}
|
||||
else
|
||||
{
|
||||
return unit==0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** set the current texture unit, return true if selected, false if selection failed such as when multitexturing is not supported.
|
||||
* note, only updates values that change.*/
|
||||
bool State::setActiveTextureUnit( unsigned int unit )
|
||||
{
|
||||
if (unit!=_currentActiveTextureUnit)
|
||||
{
|
||||
static ActiveTextureProc s_glActiveTexture =
|
||||
(ActiveTextureProc) osg::getGLExtensionFuncPtr("glActiveTexture","glActiveTextureARB");
|
||||
|
||||
if (s_glActiveTexture)
|
||||
{
|
||||
s_glActiveTexture(GL_TEXTURE0+unit);
|
||||
_currentActiveTextureUnit = unit;
|
||||
}
|
||||
else
|
||||
{
|
||||
return unit==0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user