- Merged revision 5192 from trunk.
Following features are still unavailable in ogl-es branch since rev 5181: * OpenGL ES1 * Support for iOS * Support for OSX (If you need one of those features please use rev 5180) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5193 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
0cc2e6dc45
commit
4d03349573
|
@ -137,7 +137,7 @@ namespace video
|
|||
EVDF_TEXTURE_COMPRESSED_ETC2,
|
||||
|
||||
//! Support for cube map textures.
|
||||
EVDF_TEXTURE_CUBE_MAP,
|
||||
EVDF_TEXTURE_CUBEMAP,
|
||||
|
||||
//! Only used for counting the elements of this enum
|
||||
EVDF_COUNT
|
||||
|
|
|
@ -311,6 +311,20 @@ public:
|
|||
return 24;
|
||||
case ECF_ETC2_ARGB:
|
||||
return 32;
|
||||
case ECF_D16:
|
||||
return 16;
|
||||
case ECF_D32:
|
||||
return 32;
|
||||
case ECF_D24S8:
|
||||
return 32;
|
||||
case ECF_R8:
|
||||
return 8;
|
||||
case ECF_R8G8:
|
||||
return 16;
|
||||
case ECF_R16:
|
||||
return 16;
|
||||
case ECF_R16G16:
|
||||
return 32;
|
||||
case ECF_R16F:
|
||||
return 16;
|
||||
case ECF_G16R16F:
|
||||
|
@ -323,20 +337,6 @@ public:
|
|||
return 64;
|
||||
case ECF_A32B32G32R32F:
|
||||
return 128;
|
||||
case ECF_R8:
|
||||
return 8;
|
||||
case ECF_R8G8:
|
||||
return 16;
|
||||
case ECF_R16:
|
||||
return 16;
|
||||
case ECF_R16G16:
|
||||
return 32;
|
||||
case ECF_D16:
|
||||
return 16;
|
||||
case ECF_D32:
|
||||
return 32;
|
||||
case ECF_D24S8:
|
||||
return 32;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -445,6 +445,15 @@ public:
|
|||
case ECF_DXT3:
|
||||
case ECF_DXT4:
|
||||
case ECF_DXT5:
|
||||
case ECF_PVRTC_RGB2:
|
||||
case ECF_PVRTC_ARGB2:
|
||||
case ECF_PVRTC2_ARGB2:
|
||||
case ECF_PVRTC_RGB4:
|
||||
case ECF_PVRTC_ARGB4:
|
||||
case ECF_PVRTC2_ARGB4:
|
||||
case ECF_ETC1:
|
||||
case ECF_ETC2_RGB:
|
||||
case ECF_ETC2_ARGB:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
|
|
|
@ -600,6 +600,11 @@ B3D, MS3D or X meshes */
|
|||
#ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_PSD_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_PVR_LOADER_ if you want to load .pvr files
|
||||
#define _IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#ifdef NO_IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load compressed .dds files
|
||||
// Patent problem isn't related to this loader.
|
||||
#define _IRR_COMPILE_WITH_DDS_LOADER_
|
||||
|
@ -620,11 +625,6 @@ B3D, MS3D or X meshes */
|
|||
#ifdef _IRR_COMPILE_WITH_DDS_DECODER_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_DDS_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_PVR_LOADER_ if you want to load .pvr files
|
||||
#define _IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#ifdef NO_IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_PVR_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files
|
||||
#define _IRR_COMPILE_WITH_TGA_LOADER_
|
||||
#ifdef NO_IRR_COMPILE_WITH_TGA_LOADER_
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace video
|
|||
|
||||
//! PVRTC2 ARGB 4bpp.
|
||||
ECF_PVRTC2_ARGB4,
|
||||
|
||||
|
||||
//! ETC1 RGB.
|
||||
ECF_ETC1,
|
||||
|
||||
|
|
|
@ -652,10 +652,7 @@ bool CD3D9Driver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
|
|||
return true;
|
||||
case EVDF_TEXTURE_COMPRESSED_DXT:
|
||||
return true;
|
||||
case EVDF_TEXTURE_COMPRESSED_PVRTC:
|
||||
case EVDF_TEXTURE_COMPRESSED_PVRTC2:
|
||||
case EVDF_TEXTURE_COMPRESSED_ETC1:
|
||||
case EVDF_TEXTURE_COMPRESSED_ETC2:
|
||||
case EVDF_TEXTURE_CUBEMAP:
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -852,7 +852,7 @@ IImage* CImageLoaderDDS::loadImage(io::IReadFile* file) const
|
|||
if (tmpHeight > 1)
|
||||
tmpHeight >>= 1;
|
||||
|
||||
mipMapsDataSize = IImage::getDataSizeFromFormat(format, tmpWidth, tmpHeight);
|
||||
mipMapsDataSize += IImage::getDataSizeFromFormat(format, tmpWidth, tmpHeight);
|
||||
}
|
||||
while (tmpWidth != 1 || tmpHeight != 1);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2013 Patryk Nadrowski
|
||||
// Copyright (C) 2013-2015 Patryk Nadrowski
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
@ -150,7 +150,7 @@ IImage* CImageLoaderPVR::loadImage(io::IReadFile* file) const
|
|||
|
||||
image = new CImage(format, core::dimension2d<u32>(header.Width, header.Height), data, true, true);
|
||||
|
||||
if (header.MipMapCount > 0)
|
||||
if (header.MipMapCount > 1)
|
||||
{
|
||||
u32 tmpWidth = header.Width;
|
||||
u32 tmpHeight = header.Height;
|
||||
|
@ -163,7 +163,7 @@ IImage* CImageLoaderPVR::loadImage(io::IReadFile* file) const
|
|||
if (tmpHeight > 1)
|
||||
tmpHeight >>= 1;
|
||||
|
||||
mipMapsDataSize = IImage::getDataSizeFromFormat(format, tmpWidth, tmpHeight);
|
||||
mipMapsDataSize += IImage::getDataSizeFromFormat(format, tmpWidth, tmpHeight);
|
||||
}
|
||||
while (tmpWidth != 1 || tmpHeight != 1);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2013 Patryk Nadrowski
|
||||
// Copyright (C) 2013-2015 Patryk Nadrowski
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@ IImageLoader* createImageLoaderTGA();
|
|||
//! creates a loader which is able to load psd images
|
||||
IImageLoader* createImageLoaderPSD();
|
||||
|
||||
//! creates a loader which is able to load psd images
|
||||
IImageLoader* createImageLoaderPVR();
|
||||
|
||||
//! creates a loader which is able to load dds images
|
||||
IImageLoader* createImageLoaderDDS();
|
||||
|
||||
//! creates a loader which is able to load pvr images
|
||||
IImageLoader* createImageLoaderPVR();
|
||||
|
||||
//! creates a loader which is able to load pcx images
|
||||
IImageLoader* createImageLoaderPCX();
|
||||
|
||||
|
@ -141,12 +141,12 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre
|
|||
#ifdef _IRR_COMPILE_WITH_PSD_LOADER_
|
||||
SurfaceLoader.push_back(video::createImageLoaderPSD());
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_DECODER_LOADER_)
|
||||
SurfaceLoader.push_back(video::createImageLoaderDDS());
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_PVR_LOADER_
|
||||
SurfaceLoader.push_back(video::createImageLoaderPVR());
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_DECODER_LOADER_)
|
||||
SurfaceLoader.push_back(video::createImageLoaderDDS());
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_PCX_LOADER_
|
||||
SurfaceLoader.push_back(video::createImageLoaderPCX());
|
||||
#endif
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace video
|
|||
case EVDF_BLEND_OPERATIONS:
|
||||
case EVDF_BLEND_SEPARATE:
|
||||
case EVDF_TEXTURE_MATRIX:
|
||||
case EVDF_TEXTURE_CUBE_MAP:
|
||||
case EVDF_TEXTURE_CUBEMAP:
|
||||
return true;
|
||||
case EVDF_ARB_VERTEX_PROGRAM_1:
|
||||
case EVDF_ARB_FRAGMENT_PROGRAM_1:
|
||||
|
|
|
@ -141,6 +141,36 @@ typedef char GLchar;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(GL_VERSION_1_3)
|
||||
#ifdef GL_ARB_texture_cube_map
|
||||
#define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
|
||||
#elif defined(GL_EXT_texture_cube_map)
|
||||
#define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT
|
||||
#else
|
||||
#define GL_TEXTURE_CUBE_MAP 0
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Irrlicht's OpenGL version.
|
||||
|
||||
#define IRR_OPENGL_VERSION 14
|
||||
|
|
|
@ -823,6 +823,8 @@ bool COpenGLExtensionHandler::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const
|
|||
return true;
|
||||
case EVDF_TEXTURE_COMPRESSED_DXT:
|
||||
return FeatureAvailable[IRR_EXT_texture_compression_s3tc];
|
||||
case EVDF_TEXTURE_CUBEMAP:
|
||||
return (Version >= 130) || FeatureAvailable[IRR_ARB_texture_cube_map] || FeatureAvailable[IRR_EXT_texture_cube_map];
|
||||
default:
|
||||
return false;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue