Merge branch 'master' into shader_pipeline

This commit is contained in:
Robert Osfield 2018-02-28 09:11:29 +00:00
commit 1ae954f5c3
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2017 Robert Osfield
* Copyright (C) 2003-2005 3Dlabs Inc. Ltd.
* Copyright (C) 2004-2005 Nathan Cournia
* Copyright (C) 2007 Art Tevs
@ -631,14 +631,13 @@ typedef char GLchar;
#endif
#ifndef GL_TEXTURE_2D_ARRAY
#define GL_TEXTURE_2D_ARRAY 0x8C1A
#define GL_TEXTURE_2D_ARRAY 0x8C1A
#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
#define GL_COMPARE_REF_DEPTH_TO_TEXTURE 0x884E
#define GL_SAMPLER_2D_ARRAY 0x8DC1
#define GL_SAMPLER_2D_ARRAY_SHADO 0x8DC4
#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
#endif

View File

@ -345,6 +345,7 @@ void Texture2DArray::apply(State& state) const
// bind texture
textureObject->bind(state);
applyTexParameters(GL_TEXTURE_2D_ARRAY, state);
// First we need to allocate the texture memory
@ -434,6 +435,7 @@ void Texture2DArray::apply(State& state) const
contextID, GL_TEXTURE_2D_ARRAY,_numMipmapLevels,_internalFormat, _textureWidth, _textureHeight, _textureDepth,0);
textureObject->bind(state);
applyTexParameters(GL_TEXTURE_2D_ARRAY,state);
extensions->glTexImage3D( GL_TEXTURE_2D_ARRAY, 0, _internalFormat,