Added more plugins to iOS example, Textures now working on GLES3 (missed so if defineds)

This commit is contained in:
Thomas Hogarth 2017-05-04 18:17:30 +01:00
parent fe0b53d7f5
commit 2ce5238cf7
3 changed files with 27 additions and 9 deletions

View File

@ -7,7 +7,7 @@ SET(TARGET_SRC
osgIPhoneViewer-Info.plist
)
SET(TARGET_ADDED_LIBRARIES osgdb_osg osgdb_imageio osgdb_avfoundation)
SET(TARGET_ADDED_LIBRARIES osgdb_osg osgdb_rgb osgdb_imageio osgdb_avfoundation)
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES}
osgdb_deprecated_osg osgdb_deprecated_osgparticle osgdb_deprecated_osganimation

View File

@ -9,17 +9,35 @@ USE_GRAPICSWINDOW_IMPLEMENTATION(IOS)
//plugins
//USE_OSGPLUGIN(obj)
//USE_OSGPLUGIN(ive)
USE_OSGPLUGIN(osg)
USE_DOTOSGWRAPPER_LIBRARY(osg)
USE_DOTOSGWRAPPER_LIBRARY(osgFX)
USE_DOTOSGWRAPPER_LIBRARY(osgParticle)
USE_DOTOSGWRAPPER_LIBRARY(osgShadow)
USE_DOTOSGWRAPPER_LIBRARY(osgSim)
USE_DOTOSGWRAPPER_LIBRARY(osgTerrain)
USE_DOTOSGWRAPPER_LIBRARY(osgText)
USE_DOTOSGWRAPPER_LIBRARY(osgViewer)
USE_DOTOSGWRAPPER_LIBRARY(osgVolume)
USE_OSGPLUGIN(osg2)
USE_SERIALIZER_WRAPPER_LIBRARY(osg)
USE_SERIALIZER_WRAPPER_LIBRARY(osgAnimation)
USE_SERIALIZER_WRAPPER_LIBRARY(osgFX)
USE_SERIALIZER_WRAPPER_LIBRARY(osgManipulator)
USE_SERIALIZER_WRAPPER_LIBRARY(osgParticle)
USE_SERIALIZER_WRAPPER_LIBRARY(osgShadow)
USE_SERIALIZER_WRAPPER_LIBRARY(osgSim)
USE_SERIALIZER_WRAPPER_LIBRARY(osgTerrain)
USE_SERIALIZER_WRAPPER_LIBRARY(osgText)
USE_SERIALIZER_WRAPPER_LIBRARY(osgVolume)
//USE_OSGPLUGIN(obj)
//USE_OSGPLUGIN(ive)
USE_OSGPLUGIN(imageio)
USE_OSGPLUGIN(rgb)
//USE_OSGPLUGIN(pvr)
//USE_OSGPLUGIN(avfoundation)
//USE_OSGPLUGIN(freetype)

View File

@ -1616,7 +1616,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
}
}
#if defined (OSG_GLES1_AVAILABLE) || defined (OSG_GLES2_AVAILABLE)
#if defined (OSG_GLES1_AVAILABLE) || defined (OSG_GLES2_AVAILABLE) || defined (OSG_GLES3_AVAILABLE)
// GLES doesn't cope with internal formats of 1,2,3 and 4 and glTexImage doesn't
// handle the _OES pixel formats so map them to the appropriate equivilants.
switch(internalFormat)
@ -1905,7 +1905,7 @@ void Texture::applyTexParameters(GLenum target, State& state) const
wr = CLAMP;
}
#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 (ws == CLAMP) ws = CLAMP_TO_EDGE;
if (wt == CLAMP) wt = CLAMP_TO_EDGE;
if (wr == CLAMP) wr = CLAMP_TO_EDGE;
@ -2206,7 +2206,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
{
pbo = 0;
}
#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,rowLength);
#endif
if( !mipmappingRequired || useHardwareMipMapGeneration)
@ -2552,7 +2552,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
{
pbo = 0;
}
#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,rowLength);
#endif
if( !mipmappingRequired || useHardwareMipMapGeneration)
@ -2689,7 +2689,7 @@ Texture::GenerateMipmapMode Texture::mipmapBeforeTexImage(const State& state, bo
{
if (hardwareMipmapOn)
{
#if defined( OSG_GLES2_AVAILABLE ) || defined( OSG_GL3_AVAILABLE )
#if defined( OSG_GLES2_AVAILABLE ) || defined( OSG_GLES3_AVAILABLE ) || defined( OSG_GL3_AVAILABLE )
return GENERATE_MIPMAP;
#else