Ported osgUtil, osgDB, osgGA, NodeKits and plugins to compile against OpenGL ES 1.1 and OpenGL ES 2.0.
This commit is contained in:
@@ -106,27 +106,41 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
|
||||
osg::Matrix modelview = state.getModelViewMatrix();
|
||||
|
||||
// set up depth mask for first rendering pass
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
glPushAttrib(GL_DEPTH_BUFFER_BIT);
|
||||
#endif
|
||||
|
||||
glDepthMask(GL_FALSE);
|
||||
|
||||
// render, first pass
|
||||
single_pass_render(state, modelview);
|
||||
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
// restore depth mask settings
|
||||
glPopAttrib();
|
||||
#endif
|
||||
|
||||
// render, second pass
|
||||
if (_doublepass) {
|
||||
// set up color mask for second rendering pass
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
glPushAttrib(GL_COLOR_BUFFER_BIT);
|
||||
#endif
|
||||
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
|
||||
|
||||
// render the particles onto the depth buffer
|
||||
single_pass_render(state, modelview);
|
||||
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
// restore color mask settings
|
||||
glPopAttrib();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleSystem::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void osgParticle::ParticleSystem::setDefaultAttributes(const std::string& texturefile, bool emissive_particles, bool lighting, int texture_unit)
|
||||
|
||||
@@ -729,7 +729,12 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles)
|
||||
osg::PointSprite *sprite = new osg::PointSprite();
|
||||
_pointStateSet->setTextureAttributeAndModes(0, sprite, osg::StateAttribute::ON);
|
||||
|
||||
_pointStateSet->setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::StateAttribute::ON);
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
_pointStateSet->setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::StateAttribute::ON);
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleEffect::setUpGeometries(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
|
||||
_pointStateSet->setRenderBinDetails(pointRenderBin,"DepthSortedBin");
|
||||
}
|
||||
|
||||
@@ -898,7 +903,10 @@ PrecipitationEffect::PrecipitationDrawable::PrecipitationDrawable(const Precipit
|
||||
|
||||
void PrecipitationEffect::PrecipitationDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
{
|
||||
if (!_geometry) return;
|
||||
#if defined(OSG_GL_MATRICES_AVAILABLE)
|
||||
|
||||
if (!_geometry) return;
|
||||
|
||||
|
||||
const osg::Geometry::Extensions* extensions = osg::Geometry::getExtensions(renderInfo.getContextID(),true);
|
||||
|
||||
@@ -970,6 +978,7 @@ void PrecipitationEffect::PrecipitationDrawable::drawImplementation(osg::RenderI
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleEffect::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user