Added conditionals for GLES3, added correct gl headers for GLES3 on iOS and Android to GL.in

This commit is contained in:
Thomas Hogarth 2017-03-15 01:35:58 +00:00
parent 6670a6e070
commit 76fe572934
24 changed files with 80 additions and 65 deletions

6
.gitignore vendored
View File

@ -78,3 +78,9 @@ PlatformSpecifics/Windows/*.rc
# Visual Studio - Browsing Database File # Visual Studio - Browsing Database File
*.sdf *.sdf
*.opensdf *.opensdf
#osx xcode
DerivedData/
*.DS_Store
*.build
*.xcodeproj

View File

@ -568,11 +568,17 @@ ELSEIF(OSG_GLES2_AVAILABLE)
IF (APPLE AND NOT ANDROID) IF (APPLE AND NOT ANDROID)
SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header") SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "#include <OpenGLES/ES2/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required") SET(OPENGL_HEADER2 "#include <OpenGLES/ES2/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
# TODO: GLES3
ELSE() ELSE()
SET(OPENGL_HEADER1 "#include <GLES2/gl2.h>" CACHE STRING "#include<> line for OpenGL Header") SET(OPENGL_HEADER1 "#include <GLES2/gl2.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required") SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
# TODO: GLES3 ENDIF()
ELSEIF(OSG_GLES3_AVAILABLE)
IF (APPLE AND NOT ANDROID)
SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "#include <OpenGLES/ES3/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
ELSE()
SET(OPENGL_HEADER1 "#include <GLES3/gl3.h>" CACHE STRING "#include<> line for OpenGL Header")
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
ENDIF() ENDIF()
ELSE() ELSE()
IF (APPLE) IF (APPLE)

View File

@ -26,7 +26,7 @@
#include <OpenThreads/Mutex> #include <OpenThreads/Mutex>
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
#define GL_FRONT_LEFT 0x0400 #define GL_FRONT_LEFT 0x0400
#define GL_FRONT_RIGHT 0x0401 #define GL_FRONT_RIGHT 0x0401
#define GL_BACK_LEFT 0x0402 #define GL_BACK_LEFT 0x0402

View File

@ -61,10 +61,13 @@
#define GL_GREEN 0x1904 #define GL_GREEN 0x1904
#define GL_BLUE 0x1905 #define GL_BLUE 0x1905
#define GL_DEPTH_COMPONENT 0x1902 #define GL_DEPTH_COMPONENT 0x1902
#endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE)
#define GL_STENCIL_INDEX 0x1901 #define GL_STENCIL_INDEX 0x1901
#endif #endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
#define GL_BITMAP 0x1A00 #define GL_BITMAP 0x1A00
#define GL_COLOR_INDEX 0x1900 #define GL_COLOR_INDEX 0x1900
#define GL_INTENSITY12 0x804C #define GL_INTENSITY12 0x804C

View File

@ -17,7 +17,7 @@
#include <osg/StateAttribute> #include <osg/StateAttribute>
#include <osg/GL> #include <osg/GL>
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE)
#define GL_POINT 0x1B00 #define GL_POINT 0x1B00
#define GL_LINE 0x1B01 #define GL_LINE 0x1B01
#define GL_FILL 0x1B02 #define GL_FILL 0x1B02

View File

@ -17,7 +17,7 @@
#include <osg/Plane> #include <osg/Plane>
#include <osg/StateAttribute> #include <osg/StateAttribute>
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
#define GL_OBJECT_LINEAR 0x2401 #define GL_OBJECT_LINEAR 0x2401
#define GL_EYE_LINEAR 0x2400 #define GL_EYE_LINEAR 0x2400
#define GL_SPHERE_MAP 0x2402 #define GL_SPHERE_MAP 0x2402

View File

@ -30,7 +30,7 @@ void Depth::apply(State&) const
{ {
glDepthFunc((GLenum)_func); glDepthFunc((GLenum)_func);
glDepthMask((GLboolean)_depthWriteMask); glDepthMask((GLboolean)_depthWriteMask);
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE)
glDepthRangef(_zNear,_zFar); glDepthRangef(_zNear,_zFar);
#else #else
glDepthRange(_zNear,_zFar); glDepthRange(_zNear,_zFar);

View File

@ -172,13 +172,13 @@
#define GL_NONE 0x0 #define GL_NONE 0x0
#endif #endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE)
//GLES defines (OES) //GLES defines (OES)
#define GL_RGB8_OES 0x8051 #define GL_RGB8_OES 0x8051
#define GL_RGBA8_OES 0x8058 #define GL_RGBA8_OES 0x8058
#endif #endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GL3_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE) || defined(OSG_GL3_AVAILABLE)
#define GL_POLYGON 0x0009 #define GL_POLYGON 0x0009
#define GL_QUADS 0x0007 #define GL_QUADS 0x0007
#define GL_QUAD_STRIP 0x0008 #define GL_QUAD_STRIP 0x0008

View File

@ -1061,7 +1061,7 @@ void Image::readPixels(int x,int y,int width,int height,
void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type, unsigned int face) void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type, unsigned int face)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
// OSG_NOTICE<<"Image::readImageFromCurrentTexture()"<<std::endl; // OSG_NOTICE<<"Image::readImageFromCurrentTexture()"<<std::endl;
const osg::GLExtensions* extensions = osg::GLExtensions::Get(contextID,true); const osg::GLExtensions* extensions = osg::GLExtensions::Get(contextID,true);

View File

@ -68,7 +68,7 @@ PolygonMode::Mode PolygonMode::getMode(Face face) const
void PolygonMode::apply(State&) const void PolygonMode::apply(State&) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
if (_modeFront==_modeBack) if (_modeFront==_modeBack)
{ {
glPolygonMode(GL_FRONT_AND_BACK,(GLenum)_modeFront); glPolygonMode(GL_FRONT_AND_BACK,(GLenum)_modeFront);

View File

@ -2133,7 +2133,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
{ {
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE); glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f); glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f);
#endif #endif

View File

@ -129,7 +129,7 @@ void Texture1D::setImage(Image* image)
void Texture1D::apply(State& state) const void Texture1D::apply(State& state) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
// get the contextID (user defined ID of 0 upwards) for the // get the contextID (user defined ID of 0 upwards) for the
// current OpenGL context. // current OpenGL context.
const unsigned int contextID = state.getContextID(); const unsigned int contextID = state.getContextID();
@ -267,7 +267,7 @@ void Texture1D::computeInternalFormat() const
void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& numMipmapLevels) const void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& numMipmapLevels) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
// if we don't have a valid image we can't create a texture! // if we don't have a valid image we can't create a texture!
if (!image || !image->data()) if (!image || !image->data())
return; return;
@ -378,7 +378,7 @@ void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsiz
void Texture1D::copyTexImage1D(State& state, int x, int y, int width) void Texture1D::copyTexImage1D(State& state, int x, int y, int width)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
const unsigned int contextID = state.getContextID(); const unsigned int contextID = state.getContextID();
// get the texture object for the current contextID. // get the texture object for the current contextID.
@ -435,7 +435,7 @@ void Texture1D::copyTexImage1D(State& state, int x, int y, int width)
void Texture1D::copyTexSubImage1D(State& state, int xoffset, int x, int y, int width) void Texture1D::copyTexSubImage1D(State& state, int xoffset, int x, int y, int width)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
const unsigned int contextID = state.getContextID(); const unsigned int contextID = state.getContextID();
// get the texture object for the current contextID. // get the texture object for the current contextID.
@ -467,7 +467,7 @@ void Texture1D::copyTexSubImage1D(State& state, int xoffset, int x, int y, int w
void Texture1D::allocateMipmap(State& state) const void Texture1D::allocateMipmap(State& state) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
const unsigned int contextID = state.getContextID(); const unsigned int contextID = state.getContextID();
// get the texture object for the current contextID. // get the texture object for the current contextID.

View File

@ -321,7 +321,7 @@ void TextureRectangle::applyTexImage_load(GLenum target, Image* image, State& st
{ {
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE); glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE,GL_TRUE);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f); glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY,0.0f);
#endif #endif

View File

@ -267,7 +267,7 @@ void PixelStorageModes::retrieveStoreModes()
{ {
glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment); glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpack_row_length); glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpack_row_length);
glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpack_skip_rows); glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpack_skip_rows);
glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpack_skip_pixels); glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpack_skip_pixels);
@ -276,7 +276,7 @@ void PixelStorageModes::retrieveStoreModes()
#endif #endif
glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment); glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glGetIntegerv(GL_PACK_ROW_LENGTH, &pack_row_length); glGetIntegerv(GL_PACK_ROW_LENGTH, &pack_row_length);
glGetIntegerv(GL_PACK_SKIP_ROWS, &pack_skip_rows); glGetIntegerv(GL_PACK_SKIP_ROWS, &pack_skip_rows);
glGetIntegerv(GL_PACK_SKIP_PIXELS, &pack_skip_pixels); glGetIntegerv(GL_PACK_SKIP_PIXELS, &pack_skip_pixels);
@ -288,7 +288,7 @@ void PixelStorageModes::retrieveStoreModes()
void PixelStorageModes::retrieveStoreModes3D() void PixelStorageModes::retrieveStoreModes3D()
{ {
glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment); glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpack_row_length); glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpack_row_length);
glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpack_skip_rows); glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpack_skip_rows);
glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpack_skip_pixels); glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpack_skip_pixels);
@ -299,7 +299,7 @@ void PixelStorageModes::retrieveStoreModes3D()
#endif #endif
glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment); glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glGetIntegerv(GL_PACK_ROW_LENGTH, &pack_row_length); glGetIntegerv(GL_PACK_ROW_LENGTH, &pack_row_length);
glGetIntegerv(GL_PACK_SKIP_ROWS, &pack_skip_rows); glGetIntegerv(GL_PACK_SKIP_ROWS, &pack_skip_rows);
glGetIntegerv(GL_PACK_SKIP_PIXELS, &pack_skip_pixels); glGetIntegerv(GL_PACK_SKIP_PIXELS, &pack_skip_pixels);
@ -3437,7 +3437,7 @@ static void closestFit(GLenum target, GLint width, GLint height,
GLint internalFormat, GLenum format, GLenum type, GLint internalFormat, GLenum format, GLenum type,
GLint *newWidth, GLint *newHeight) GLint *newWidth, GLint *newHeight)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
/* Use proxy textures if OpenGL version is >= 1.1 */ /* Use proxy textures if OpenGL version is >= 1.1 */
if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1) if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1)
) { ) {
@ -3592,7 +3592,7 @@ int gluBuild1DMipmapLevelsCore(GLenum target, GLint internalFormat,
GLint userLevel, GLint baseLevel,GLint maxLevel, GLint userLevel, GLint baseLevel,GLint maxLevel,
const void *data) const void *data)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
GLint newwidth; GLint newwidth;
GLint level, levels; GLint level, levels;
GLushort *newImage; GLushort *newImage;
@ -3786,7 +3786,7 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat,
cmpts = elements_per_group(format,type); cmpts = elements_per_group(format,type);
glPixelStorei(GL_UNPACK_ALIGNMENT, 2); glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
@ -3808,7 +3808,7 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat,
otherImage = (GLushort *) malloc(memreq); otherImage = (GLushort *) malloc(memreq);
if (otherImage == NULL) { if (otherImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -3836,7 +3836,7 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat,
} }
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -3913,7 +3913,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
usersImage = (const GLubyte *) data + psm.unpack_skip_rows * rowsize + usersImage = (const GLubyte *) data + psm.unpack_skip_rows * rowsize +
psm.unpack_skip_pixels * group_size; psm.unpack_skip_pixels * group_size;
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
@ -3925,20 +3925,20 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
if (width == newwidth && height == newheight) { if (width == newwidth && height == newheight) {
/* Use usersImage for level userLevel */ /* Use usersImage for level userLevel */
if (baseLevel <= level && level <= maxLevel) { if (baseLevel <= level && level <= maxLevel) {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
#endif #endif
glTexImage2D(target, level, internalFormat, width, glTexImage2D(target, level, internalFormat, width,
height, 0, format, type, height, 0, format, type,
usersImage); usersImage);
} }
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
#endif #endif
if(levels == 0) { /* we're done. clean up and return */ if(levels == 0) { /* we're done. clean up and return */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4001,7 +4001,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4168,7 +4168,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4227,7 +4227,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4415,7 +4415,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4429,7 +4429,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
level = userLevel; level = userLevel;
} }
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
#endif #endif
@ -4579,7 +4579,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
if (newMipmapImage == NULL) { if (newMipmapImage == NULL) {
/* out of memory so return */ /* out of memory so return */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -4615,7 +4615,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
} /* for level */ } /* for level */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -7428,7 +7428,7 @@ static void closestFit3D(GLTexImage3DProc gluTexImage3D,
GLint internalFormat, GLenum format, GLenum type, GLint internalFormat, GLenum format, GLenum type,
GLint *newWidth, GLint *newHeight, GLint *newDepth) GLint *newWidth, GLint *newHeight, GLint *newDepth)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
GLint widthPowerOf2= nearestPower(width); GLint widthPowerOf2= nearestPower(width);
GLint heightPowerOf2= nearestPower(height); GLint heightPowerOf2= nearestPower(height);
GLint depthPowerOf2= nearestPower(depth); GLint depthPowerOf2= nearestPower(depth);
@ -7837,7 +7837,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
} }
if(levels == 0) { /* we're done. clean up and return */ if(levels == 0) { /* we're done. clean up and return */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -7903,7 +7903,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -8124,7 +8124,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -8185,7 +8185,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -8263,7 +8263,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
} }
if (dstImage == NULL) { if (dstImage == NULL) {
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
@ -8279,7 +8279,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
level = userLevel; level = userLevel;
} }
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
#endif #endif
@ -8466,7 +8466,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
} /* for level */ } /* for level */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);

View File

@ -53,7 +53,7 @@
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
#endif #endif
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE)
#define GL_POLYGON_SMOOTH_HINT 0x0C53 #define GL_POLYGON_SMOOTH_HINT 0x0C53
#define GL_LINE_SMOOTH_HINT 0x0C52 #define GL_LINE_SMOOTH_HINT 0x0C52
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B

View File

@ -96,7 +96,7 @@ bool StateSetManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa)
(_stateset->getTextureMode(0,GL_TEXTURE_RECTANGLE)&mode)!=0 || (_stateset->getTextureMode(0,GL_TEXTURE_RECTANGLE)&mode)!=0 ||
(_stateset->getTextureMode(0,GL_TEXTURE_CUBE_MAP)&mode)!=0; (_stateset->getTextureMode(0,GL_TEXTURE_CUBE_MAP)&mode)!=0;
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
_texture |= ((_stateset->getTextureMode(0,GL_TEXTURE_1D)&mode)!=0); _texture |= ((_stateset->getTextureMode(0,GL_TEXTURE_1D)&mode)!=0);
#endif #endif
} }
@ -181,7 +181,7 @@ void StateSetManipulator::setTextureEnabled(bool newtexture)
if ( _texture ) mode = osg::StateAttribute::INHERIT|osg::StateAttribute::ON; if ( _texture ) mode = osg::StateAttribute::INHERIT|osg::StateAttribute::ON;
for( unsigned int ii=0; ii<_maxNumOfTextureUnits; ii++ ) for( unsigned int ii=0; ii<_maxNumOfTextureUnits; ii++ )
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
_stateset->setTextureMode( ii, GL_TEXTURE_1D, mode ); _stateset->setTextureMode( ii, GL_TEXTURE_1D, mode );
#endif #endif
_stateset->setTextureMode( ii, GL_TEXTURE_2D, mode ); _stateset->setTextureMode( ii, GL_TEXTURE_2D, mode );

View File

@ -460,7 +460,7 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
} }
// set up depth mask for first rendering pass // set up depth mask for first rendering pass
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
glPushAttrib(GL_DEPTH_BUFFER_BIT); glPushAttrib(GL_DEPTH_BUFFER_BIT);
#endif #endif
@ -469,7 +469,7 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
ad.dispatchArrays(state); ad.dispatchArrays(state);
ad.dispatchPrimitives(); ad.dispatchPrimitives();
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
// restore depth mask settings // restore depth mask settings
glPopAttrib(); glPopAttrib();
#endif #endif
@ -478,14 +478,14 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
if (_doublepass) if (_doublepass)
{ {
// set up color mask for second rendering pass // set up color mask for second rendering pass
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
glPushAttrib(GL_COLOR_BUFFER_BIT); glPushAttrib(GL_COLOR_BUFFER_BIT);
#endif #endif
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
ad.dispatchPrimitives(); ad.dispatchPrimitives();
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
// restore color mask settings // restore color mask settings
glPopAttrib(); glPopAttrib();
#endif #endif

View File

@ -98,7 +98,7 @@ class Logos: public osg::Drawable
virtual void drawImplementation(osg::RenderInfo& renderInfo) const virtual void drawImplementation(osg::RenderInfo& renderInfo) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
if( renderInfo.getContextID() != _contextID ) if( renderInfo.getContextID() != _contextID )
return; return;

View File

@ -341,7 +341,7 @@ void ShadowMap::init()
_stateset->setTextureAttribute(_baseTextureUnit,fakeTex,osg::StateAttribute::ON); _stateset->setTextureAttribute(_baseTextureUnit,fakeTex,osg::StateAttribute::ON);
_stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_2D,osg::StateAttribute::ON); _stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_2D,osg::StateAttribute::ON);
_stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_3D,osg::StateAttribute::OFF); _stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_3D,osg::StateAttribute::OFF);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
_stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_1D,osg::StateAttribute::OFF); _stateset->setTextureMode(_baseTextureUnit,GL_TEXTURE_1D,osg::StateAttribute::OFF);
#endif #endif
} }

View File

@ -560,7 +560,7 @@ void StandardShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv
_stateset->setTextureAttribute(st->_baseTextureUnit,fakeTex,osg::StateAttribute::ON); _stateset->setTextureAttribute(st->_baseTextureUnit,fakeTex,osg::StateAttribute::ON);
_stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_2D,osg::StateAttribute::ON); _stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_2D,osg::StateAttribute::ON);
_stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_3D,osg::StateAttribute::OFF); _stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_3D,osg::StateAttribute::OFF);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
_stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_1D,osg::StateAttribute::OFF); _stateset->setTextureMode(st->_baseTextureUnit,GL_TEXTURE_1D,osg::StateAttribute::OFF);
#endif #endif
} }
@ -664,7 +664,7 @@ void StandardShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv
for( unsigned stage = 1; stage < 4; stage ++ ) for( unsigned stage = 1; stage < 4; stage ++ )
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
stateset->setTextureMode( stage, GL_TEXTURE_1D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF ); stateset->setTextureMode( stage, GL_TEXTURE_1D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF );
#endif #endif
stateset->setTextureMode( stage, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF ); stateset->setTextureMode( stage, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF );

View File

@ -85,7 +85,7 @@ void LightPointDrawable::reset()
void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
osg::State& state = *renderInfo.getState(); osg::State& state = *renderInfo.getState();
state.applyMode(GL_POINT_SMOOTH,true); state.applyMode(GL_POINT_SMOOTH,true);

View File

@ -30,7 +30,7 @@ LightPointSpriteDrawable::LightPointSpriteDrawable(const LightPointSpriteDrawabl
void LightPointSpriteDrawable::drawImplementation(osg::RenderInfo& renderInfo) const void LightPointSpriteDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
osg::State& state = *renderInfo.getState(); osg::State& state = *renderInfo.getState();
if (!state.getModeValidity(GL_POINT_SPRITE_ARB)) if (!state.getModeValidity(GL_POINT_SPRITE_ARB))

View File

@ -519,7 +519,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
{ {
setDrawBuffer( GL_NONE, true ); setDrawBuffer( GL_NONE, true );
setReadBuffer( GL_NONE, true ); setReadBuffer( GL_NONE, true );
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glDrawBuffer( GL_NONE ); glDrawBuffer( GL_NONE );
glReadBuffer( GL_NONE ); glReadBuffer( GL_NONE );
#endif #endif
@ -911,7 +911,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
if (!using_multiple_render_targets) if (!using_multiple_render_targets)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
if( getDrawBufferApplyMask() ) if( getDrawBufferApplyMask() )
glDrawBuffer(_drawBuffer); glDrawBuffer(_drawBuffer);
@ -997,7 +997,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
blitMask, GL_NEAREST); blitMask, GL_NEAREST);
} }
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
if (needToBlitColorBuffers) if (needToBlitColorBuffers)
{ {
for (FrameBufferObject::AttachmentMap::const_iterator for (FrameBufferObject::AttachmentMap::const_iterator
@ -1349,7 +1349,7 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
if (_clearMask & GL_DEPTH_BUFFER_BIT) if (_clearMask & GL_DEPTH_BUFFER_BIT)
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE)
glClearDepth( _clearDepth); glClearDepth( _clearDepth);
#else #else
glClearDepthf( _clearDepth); glClearDepthf( _clearDepth);
@ -1366,7 +1366,7 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
state.haveAppliedAttribute( osg::StateAttribute::STENCIL ); state.haveAppliedAttribute( osg::StateAttribute::STENCIL );
} }
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
if (_clearMask & GL_ACCUM_BUFFER_BIT) if (_clearMask & GL_ACCUM_BUFFER_BIT)
{ {
glClearAccum( _clearAccum[0], _clearAccum[1], _clearAccum[2], _clearAccum[3]); glClearAccum( _clearAccum[0], _clearAccum[1], _clearAccum[2], _clearAccum[3]);

View File

@ -1232,7 +1232,7 @@ void SceneView::draw()
case(osg::DisplaySettings::HORIZONTAL_INTERLACE): case(osg::DisplaySettings::HORIZONTAL_INTERLACE):
case(osg::DisplaySettings::CHECKERBOARD): case(osg::DisplaySettings::CHECKERBOARD):
{ {
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE) #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
if( 0 == ( _camera->getInheritanceMask() & DRAW_BUFFER) ) if( 0 == ( _camera->getInheritanceMask() & DRAW_BUFFER) )
{ {
_renderStageLeft->setDrawBuffer(_camera->getDrawBuffer()); _renderStageLeft->setDrawBuffer(_camera->getDrawBuffer());