Show
Ignore:
Timestamp:
04/23/14 11:08:26 (3 hours ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgscalarbar/osgscalarbar.cpp

    r14047 r14059  
    9999    if ( !vertical ) 
    100100    { 
    101         sb->setPosition( osg::Vec3(0.5f,-0.5f,0)); 
     101        sb->setPosition( osg::Vec3(0.5f,0.5f,0)); 
    102102    } 
    103103 
     
    146146 
    147147    osg::Group* group = new osg::Group; 
    148     group->addChild(createScalarBar(true)); 
    149     group->addChild(createScalarBar(false)); 
     148 
    150149    group->addChild(createScalarBar_HUD()); 
     150 
     151    // rotate the scalar from XY plane to XZ so we see them viewing it with the default camera manipulators that look along the Y axis, with Z up. 
     152    osg::MatrixTransform* transform = new osg::MatrixTransform; 
     153    group->addChild(transform); 
     154    transform->setMatrix(osg::Matrix::rotate(osg::inDegrees(90.0),1.0,0.0,0.0)); 
     155    transform->addChild(createScalarBar(true)); 
     156    transform->addChild(createScalarBar(false)); 
    151157 
    152158    // add model to viewer.