Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.

To select standard OpenGL 1/2 build with full backwards and forwards comtability use:

  ./configure
  make

OR

  ./configure -DOPENGL_PROFILE=GL2

To select OpenGL 3 core profile build using GL3/gl3.h header:

  ./configure -DOPENGL_PROFILE=GL3

To select OpenGL Arb core profile build using GL/glcorearb.h header:

  ./configure -DOPENGL_PROFILE=GLCORE

To select OpenGL ES 1.1 profile use:

  ./configure -DOPENGL_PROFILE=GLES1

To select OpenGL ES 2 profile use:

  ./configure -DOPENGL_PROFILE=GLES2


Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.
This commit is contained in:
Robert Osfield
2014-04-23 09:08:26 +00:00
parent 560587c88f
commit 5597248895
13 changed files with 175 additions and 48 deletions

View File

@@ -32,16 +32,4 @@
#cmakedefine OSG_USE_UTF8_FILENAME
#cmakedefine OSG_DISABLE_MSVC_WARNINGS
#cmakedefine OSG_GL1_AVAILABLE
#cmakedefine OSG_GL2_AVAILABLE
#cmakedefine OSG_GL3_AVAILABLE
#cmakedefine OSG_GLES1_AVAILABLE
#cmakedefine OSG_GLES2_AVAILABLE
#cmakedefine OSG_GL_LIBRARY_STATIC
#cmakedefine OSG_GL_DISPLAYLISTS_AVAILABLE
#cmakedefine OSG_GL_MATRICES_AVAILABLE
#cmakedefine OSG_GL_VERTEX_FUNCS_AVAILABLE
#cmakedefine OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
#cmakedefine OSG_GL_FIXED_FUNCTION_AVAILABLE
#endif

View File

@@ -1516,7 +1516,7 @@ void Drawable::Extensions::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *
OSG_WARN << "Error: glGetQueryObjectuiv not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params) const
void Drawable::Extensions::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params) const
{
if (_gl_get_query_objectui64v)
_gl_get_query_objectui64v(id, pname, params);
@@ -1524,7 +1524,7 @@ void Drawable::Extensions::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint
OSG_WARN << "Error: glGetQueryObjectui64v not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGetInteger64v(GLenum pname, GLint64EXT *params)
void Drawable::Extensions::glGetInteger64v(GLenum pname, GLint64 *params)
const
{
if (_glGetInteger64v)

View File

@@ -1785,7 +1785,7 @@ void State::frameCompleted()
osg::Drawable::Extensions* extensions = osg::Drawable::getExtensions(getContextID(), true);
if (extensions && getTimestampBits())
{
GLint64EXT timestamp;
GLint64 timestamp;
extensions->glGetInteger64v(GL_TIMESTAMP, &timestamp);
setGpuTimestamp(osg::Timer::instance()->tick(), timestamp);
//OSG_NOTICE<<"State::frameCompleted() setting time stamp. timestamp="<<timestamp<<std::endl;

View File

@@ -11,8 +11,9 @@
* OpenSceneGraph Public License for more details.
*/
#include <osg/DeleteHandler>
#include <osgQt/GraphicsWindowQt>
#include <osg/DeleteHandler>
#include <osgViewer/ViewerBase>
#include <QInputEvent>