Changeset 10710
- Timestamp:
- 11/03/09 17:34:54 (4 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 22 modified
-
applications/present3D/present3D.cpp (modified) (1 diff)
-
include/osg/ClampColor (modified) (1 diff)
-
include/osg/GL (modified) (2 diffs)
-
include/osg/TexGen (modified) (1 diff)
-
src/osg/Image.cpp (modified) (2 diffs)
-
src/osg/Texture.cpp (modified) (1 diff)
-
src/osg/TextureRectangle.cpp (modified) (1 diff)
-
src/osgDB/DatabasePager.cpp (modified) (2 diffs)
-
src/osgFX/AnisotropicLighting.cpp (modified) (1 diff)
-
src/osgParticle/ParticleSystem.cpp (modified) (5 diffs)
-
src/osgPlugins/OpenFlight/PaletteRecords.cpp (modified) (1 diff)
-
src/osgPlugins/dds/ReaderWriterDDS.cpp (modified) (1 diff)
-
src/osgPlugins/logo/ReaderWriterLOGO.cpp (modified) (1 diff)
-
src/osgPlugins/osg/StateSet.cpp (modified) (1 diff)
-
src/osgPlugins/rgb/ReaderWriterRGB.cpp (modified) (1 diff)
-
src/osgSim/LightPointDrawable.cpp (modified) (1 diff)
-
src/osgSim/LightPointSpriteDrawable.cpp (modified) (1 diff)
-
src/osgText/Text.cpp (modified) (5 diffs)
-
src/osgText/Text3D.cpp (modified) (2 diffs)
-
src/osgUtil/RenderStage.cpp (modified) (1 diff)
-
src/osgUtil/SceneView.cpp (modified) (4 diffs)
-
src/osgViewer/GraphicsWindowWin32.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/applications/present3D/present3D.cpp
r10699 r10710 724 724 725 725 726 #if !defined(OSG_GLES2_AVAILABLE) 726 #if !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 727 727 728 728 // add back in enabling of the GL_ALPHA_TEST to get around the core OSG no longer setting it by default for opaque bins. -
OpenSceneGraph/trunk/include/osg/ClampColor
r7648 r10710 30 30 #define GL_CLAMP_READ_COLOR GL_CLAMP_READ_COLOR_ARB 31 31 #define GL_CLAMP_FRAGMENT_COLOR GL_CLAMP_FRAGMENT_COLOR_ARB 32 #endif 33 34 #if defined(OSG_GL3_AVAILABLE) 35 #define GL_CLAMP_VERTEX_COLOR 0x891A 36 #define GL_CLAMP_FRAGMENT_COLOR 0x891B 32 37 #endif 33 38 -
OpenSceneGraph/trunk/include/osg/GL
r10694 r10710 88 88 #include <GLES2/gl2.h> 89 89 90 #elif defined(OSG_GL3_AVAILABLE) 91 92 #define GL3_PROTOTYPES 1 93 #include <GL3/gl3.h> 94 90 95 #else 91 96 … … 146 151 #endif 147 152 148 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 153 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) 149 154 #define GL_POLYGON 0x0009 150 155 #define GL_QUADS 0x0007 151 156 #define GL_QUAD_STRIP 0x0008 157 #endif 158 159 #if defined(OSG_GL3_AVAILABLE) 160 #define GL_LUMINANCE 0x1909 161 #define GL_LUMINANCE_ALPHA 0x190A 152 162 #endif 153 163 -
OpenSceneGraph/trunk/include/osg/TexGen
r10691 r10710 18 18 #include <osg/StateAttribute> 19 19 20 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 20 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) 21 21 #define GL_OBJECT_LINEAR 0x2401 22 22 #define GL_EYE_LINEAR 0x2400 -
OpenSceneGraph/trunk/src/osg/Image.cpp
r10706 r10710 33 33 34 34 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 35 #define GL_BITMAP 0x1A0036 35 #define GL_RED 0x1903 37 36 #define GL_GREEN 0x1904 38 37 #define GL_BLUE 0x1905 38 #define GL_DEPTH_COMPONENT 0x1902 39 #define GL_STENCIL_INDEX 0x1901 40 #endif 41 42 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) 43 #define GL_BITMAP 0x1A00 39 44 #define GL_COLOR_INDEX 0x1900 40 #define GL_DEPTH_COMPONENT 0x190241 45 #define GL_INTENSITY12 0x804C 42 46 #define GL_INTENSITY16 0x804D … … 53 57 #define GL_LUMINANCE8 0x8040 54 58 #define GL_LUMINANCE8_ALPHA8 0x8045 55 #define GL_STENCIL_INDEX 0x190156 59 #define GL_RGBA8 0x8058 57 60 #define GL_PACK_ROW_LENGTH 0x0D02 -
OpenSceneGraph/trunk/src/osg/Texture.cpp
r10699 r10710 1748 1748 glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE); 1749 1749 1750 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1750 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1751 1751 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f); 1752 1752 #endif -
OpenSceneGraph/trunk/src/osg/TextureRectangle.cpp
r10691 r10710 298 298 glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE); 299 299 300 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 300 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 301 301 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f); 302 302 #endif -
OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp
r10695 r10710 2008 2008 { 2009 2009 2010 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 2010 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 2011 2011 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 1.0); 2012 2012 #endif … … 2032 2032 (*itr)->compileGLObjects(state); 2033 2033 2034 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 2034 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 2035 2035 GLint p; 2036 2036 glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &p); -
OpenSceneGraph/trunk/src/osgFX/AnisotropicLighting.cpp
r10699 r10710 217 217 ss->setTextureAttributeAndModes(0, texenv.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); 218 218 219 #if !defined(OSG_GLES2_AVAILABLE) 219 #if !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 220 220 ss->setMode( GL_ALPHA_TEST, osg::StateAttribute::OFF ); 221 221 #else -
OpenSceneGraph/trunk/src/osgParticle/ParticleSystem.cpp
r10699 r10710 107 107 108 108 // set up depth mask for first rendering pass 109 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 109 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 110 110 glPushAttrib(GL_DEPTH_BUFFER_BIT); 111 111 #endif … … 116 116 single_pass_render(state, modelview); 117 117 118 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 118 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 119 119 // restore depth mask settings 120 120 glPopAttrib(); … … 124 124 if (_doublepass) { 125 125 // set up color mask for second rendering pass 126 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 126 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 127 127 glPushAttrib(GL_COLOR_BUFFER_BIT); 128 128 #endif … … 132 132 single_pass_render(state, modelview); 133 133 134 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 134 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 135 135 // restore color mask settings 136 136 glPopAttrib(); … … 138 138 } 139 139 140 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 140 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 141 141 osg::notify(osg::NOTICE)<<"Warning: ParticleSystem::drawImplementation(..) not fully implemented."<<std::endl; 142 142 #endif -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PaletteRecords.cpp
r10699 r10710 37 37 #define GL_RGBA12 0x805A 38 38 #define GL_RGB12 0x8053 39 #define GL_LUMINANCE12_ALPHA4 0x8046 40 #define GL_LUMINANCE12_ALPHA12 0x8047 41 #define GL_INTENSITY16 0x804D 42 #endif 43 44 #if defined(OSG_GL3_AVAILABLE) 39 45 #define GL_LUMINANCE12_ALPHA4 0x8046 40 46 #define GL_LUMINANCE12_ALPHA12 0x8047 -
OpenSceneGraph/trunk/src/osgPlugins/dds/ReaderWriterDDS.cpp
r10699 r10710 38 38 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 39 39 #define GL_RED 0x1903 40 #define GL_LUMINANCE4_ALPHA4 0x8043 41 #endif 42 43 #if defined(OSG_GL3_AVAILABLE) 40 44 #define GL_LUMINANCE4_ALPHA4 0x8043 41 45 #endif -
OpenSceneGraph/trunk/src/osgPlugins/logo/ReaderWriterLOGO.cpp
r10699 r10710 96 96 virtual void drawImplementation(osg::RenderInfo& renderInfo) const 97 97 { 98 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 98 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 99 99 100 100 if( renderInfo.getContextID() != _contextID ) -
OpenSceneGraph/trunk/src/osgPlugins/osg/StateSet.cpp
r10703 r10710 131 131 ADD_NAME("GL_LIGHT6",GL_LIGHT6); 132 132 ADD_NAME("GL_LIGHT7",GL_LIGHT7); 133 133 134 #if defined(OSG_GL3_AVAILABLE) 135 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 136 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 137 #endif 134 138 ADD_NAME("GL_VERTEX_PROGRAM_POINT_SIZE", GL_VERTEX_PROGRAM_POINT_SIZE) 135 139 ADD_NAME("GL_VERTEX_PROGRAM_TWO_SIDE", GL_VERTEX_PROGRAM_TWO_SIDE) -
OpenSceneGraph/trunk/src/osgPlugins/rgb/ReaderWriterRGB.cpp
r10699 r10710 28 28 #define GL_GREEN 0x1904 29 29 #define GL_BLUE 0x1905 30 #define GL_COLOR_INDEX 0x1900 31 #endif 32 33 #if defined(OSG_GL3_AVAILABLE) 34 #define GL_BITMAP 0x1A00 30 35 #define GL_COLOR_INDEX 0x1900 31 36 #endif -
OpenSceneGraph/trunk/src/osgSim/LightPointDrawable.cpp
r10699 r10710 85 85 void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const 86 86 { 87 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 87 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 88 88 osg::State& state = *renderInfo.getState(); 89 89 -
OpenSceneGraph/trunk/src/osgSim/LightPointSpriteDrawable.cpp
r10699 r10710 31 31 void LightPointSpriteDrawable::drawImplementation(osg::RenderInfo& renderInfo) const 32 32 { 33 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 33 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 34 34 osg::State& state = *renderInfo.getState(); 35 35 -
OpenSceneGraph/trunk/src/osgText/Text.cpp
r10699 r10710 1354 1354 if (_textBB.valid()) 1355 1355 { 1356 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1356 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1357 1357 state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); 1358 1358 … … 1849 1849 void Text::renderWithPolygonOffset(osg::State& state, const osg::Vec4& colorMultiplier) const 1850 1850 { 1851 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1851 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1852 1852 unsigned int contextID = state.getContextID(); 1853 1853 … … 1914 1914 void Text::renderWithNoDepthBuffer(osg::State& state, const osg::Vec4& colorMultiplier) const 1915 1915 { 1916 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1916 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1917 1917 unsigned int contextID = state.getContextID(); 1918 1918 … … 1968 1968 void Text::renderWithDepthRange(osg::State& state, const osg::Vec4& colorMultiplier) const 1969 1969 { 1970 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1970 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1971 1971 unsigned int contextID = state.getContextID(); 1972 1972 … … 2028 2028 void Text::renderWithStencilBuffer(osg::State& state, const osg::Vec4& colorMultiplier) const 2029 2029 { 2030 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 2030 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 2031 2031 /* Here are the steps: 2032 2032 * 1) Disable drawing color -
OpenSceneGraph/trunk/src/osgText/Text3D.cpp
r10699 r10710 528 528 renderInfo.getState()->disableAllVertexArrays(); 529 529 530 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 530 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 531 531 glPushAttrib(GL_TRANSFORM_BIT); 532 532 glEnable(GL_RESCALE_NORMAL); … … 540 540 } 541 541 542 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 542 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 543 543 glPopAttrib(); 544 544 #endif -
OpenSceneGraph/trunk/src/osgUtil/RenderStage.cpp
r10699 r10710 1287 1287 } 1288 1288 1289 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1289 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1290 1290 if (_clearMask & GL_ACCUM_BUFFER_BIT) 1291 1291 { -
OpenSceneGraph/trunk/src/osgUtil/SceneView.cpp
r10708 r10710 31 31 using namespace osgUtil; 32 32 33 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) 33 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 34 34 // define under GLES to keep the main SceneView.cpp clean. 35 35 #define GL_BACK_LEFT 0x0402 … … 1290 1290 case(osg::DisplaySettings::VERTICAL_INTERLACE): 1291 1291 { 1292 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1292 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1293 1293 if( 0 == ( _camera->getInheritanceMask() & DRAW_BUFFER) ) 1294 1294 { … … 1373 1373 case(osg::DisplaySettings::HORIZONTAL_INTERLACE): 1374 1374 { 1375 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1375 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1376 1376 if( 0 == ( _camera->getInheritanceMask() & DRAW_BUFFER) ) 1377 1377 { … … 1455 1455 case(osg::DisplaySettings::CHECKERBOARD): 1456 1456 { 1457 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 1457 #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) 1458 1458 if( 0 == ( _camera->getInheritanceMask() & DRAW_BUFFER) ) 1459 1459 { -
OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowWin32.cpp
r10460 r10710 92 92 #define WGL_SAMPLE_BUFFERS_ARB 0x2041 93 93 #define WGL_SAMPLES_ARB 0x2042 94 95 #ifndef WGL_ARB_create_context 96 #define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 97 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 98 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 99 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 100 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 101 #define WGL_CONTEXT_FLAGS_ARB 0x2094 102 #define ERROR_INVALID_VERSION_ARB 0x2095 103 #endif 104 105 #ifndef WGL_ARB_create_context 106 #define WGL_ARB_create_context 1 107 #ifdef WGL_WGLEXT_PROTOTYPES 108 extern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *); 109 #endif /* WGL_WGLEXT_PROTOTYPES */ 110 typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); 111 #endif 94 112 95 113 //
