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

@@ -657,8 +657,8 @@ class OSG_EXPORT Drawable : public Object
void glDeleteQueries(GLsizei n, const GLuint *ids) const;
void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params) const;
void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) const;
void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params) const;
void glGetInteger64v(GLenum pname, GLint64EXT *params) const;
void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params) const;
void glGetInteger64v(GLenum pname, GLint64 *params) const;
protected:
@@ -701,7 +701,7 @@ class OSG_EXPORT Drawable : public Object
typedef void (GL_APIENTRY * EndOcclusionQueryProc) ();
typedef void (GL_APIENTRY * GetOcclusionQueryivProc) ( GLuint id, GLenum pname, GLint *params );
typedef void (GL_APIENTRY * GetOcclusionQueryuivProc) ( GLuint id, GLenum pname, GLuint *params );
typedef void (GL_APIENTRY * GetOcclusionQueryui64vProc) ( GLuint id, GLenum pname, GLuint64EXT *params );
typedef void (GL_APIENTRY * GetOcclusionQueryui64vProc) ( GLuint id, GLenum pname, GLuint64 *params );
typedef void (GL_APIENTRY *GenQueriesProc) (GLsizei n, GLuint *ids);
typedef void (GL_APIENTRY *DeleteQueriesProc) (GLsizei n, const GLuint *ids);
@@ -712,8 +712,8 @@ class OSG_EXPORT Drawable : public Object
typedef void (GL_APIENTRY *GetQueryivProc) (GLenum target, GLenum pname, GLint *params);
typedef void (GL_APIENTRY *GetQueryObjectivProc) (GLuint id, GLenum pname, GLint *params);
typedef void (GL_APIENTRY *GetQueryObjectuivProc) (GLuint id, GLenum pname, GLuint *params);
typedef void (GL_APIENTRY *GetQueryObjectui64vProc) (GLuint id, GLenum pname, GLuint64EXT *params);
typedef void (GL_APIENTRY *GetInteger64vProc) (GLenum pname, GLint64EXT *params);
typedef void (GL_APIENTRY *GetQueryObjectui64vProc) (GLuint id, GLenum pname, GLuint64 *params);
typedef void (GL_APIENTRY *GetInteger64vProc) (GLenum pname, GLint64 *params);
~Extensions() {}

View File

@@ -14,9 +14,17 @@
#ifndef OSG_GL
#define OSG_GL 1
#if 1
#include <osg/OpenGL>
#else
#include <osg/Config>
#include <osg/Export>
#if defined(OSG_GLES1_AVAILABLE)
#ifdef __APPLE__
@@ -244,4 +252,6 @@
#endif
#endif
#endif // __osgGL_h

View File

@@ -1495,9 +1495,9 @@ class OSG_EXPORT State : public Referenced, public Observer
{
return osg::Timer::instance()->delta_s(_startTick, _gpuTick);
}
GLuint64EXT getGpuTimestamp() const { return _gpuTimestamp; }
GLuint64 getGpuTimestamp() const { return _gpuTimestamp; }
void setGpuTimestamp(Timer_t tick, GLuint64EXT timestamp)
void setGpuTimestamp(Timer_t tick, GLuint64 timestamp)
{
_gpuTick = tick;
_gpuTimestamp = timestamp;
@@ -1930,8 +1930,8 @@ class OSG_EXPORT State : public Referenced, public Observer
Timer_t _startTick;
Timer_t _gpuTick;
GLuint64EXT _gpuTimestamp;
int _timestampBits;
GLuint64 _gpuTimestamp;
int _timestampBits;
};
inline void State::pushModeList(ModeMap& modeMap,const StateSet::ModeList& modeList)

View File

@@ -14,6 +14,8 @@
#ifndef OSGVIEWER_GRAPHICSWINDOWQT
#define OSGVIEWER_GRAPHICSWINDOWQT
#include <QGLWidget>
#include <osgViewer/GraphicsWindow>
#include <osgQt/Export>
@@ -21,7 +23,6 @@
#include <QEvent>
#include <QQueue>
#include <QSet>
#include <QGLWidget>
class QInputEvent;

View File

@@ -14,6 +14,8 @@
#ifndef QGRAPHICSVIEWADAPTER
#define QGRAPHICSVIEWADAPTER
#include <QGLWidget>
#include <osg/Image>
#include <osg/observer_ptr>
#include <osgQt/Export>

View File

@@ -14,8 +14,8 @@
#ifndef QWIDGETIMAGE
#define QWIDGETIMAGE
#include <osg/Image>
#include <osgQt/QGraphicsViewAdapter>
#include <osg/Image>
namespace osgQt
{