mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-17 21:23:48 +01:00
Remove more dead code
This commit is contained in:
parent
70b0b46d50
commit
d26c0aeaaf
@ -29,21 +29,6 @@ enum E_FILE_ARCHIVE_TYPE
|
||||
//! A gzip archive
|
||||
EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'),
|
||||
|
||||
//! A virtual directory
|
||||
EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'),
|
||||
|
||||
//! An ID Software PAK archive
|
||||
EFAT_PAK = MAKE_IRR_ID('P','A','K', 0),
|
||||
|
||||
//! A Nebula Device archive
|
||||
EFAT_NPK = MAKE_IRR_ID('N','P','K', 0),
|
||||
|
||||
//! A Tape ARchive
|
||||
EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
|
||||
|
||||
//! A wad Archive, Quake2, Halflife
|
||||
EFAT_WAD = MAKE_IRR_ID('W','A','D', 0),
|
||||
|
||||
//! An Android asset file archive
|
||||
EFAT_ANDROID_ASSET = MAKE_IRR_ID('A','S','S','E'),
|
||||
|
||||
|
@ -27,9 +27,6 @@ public:
|
||||
//! constructor
|
||||
IImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size, bool deleteMemory) :
|
||||
Format(format), Size(size), Data(0), MipMapsData(0), BytesPerPixel(0), Pitch(0), DeleteMemory(deleteMemory), DeleteMipMapsMemory(false)
|
||||
#if defined(IRRLICHT_sRGB)
|
||||
,Format_sRGB(1)
|
||||
#endif
|
||||
{
|
||||
BytesPerPixel = getBitsPerPixelFromFormat(Format) / 8;
|
||||
Pitch = BytesPerPixel * Size.Width;
|
||||
@ -51,18 +48,6 @@ public:
|
||||
return Format;
|
||||
}
|
||||
|
||||
#if defined(IRRLICHT_sRGB)
|
||||
//! Texture is linear/sRGB (should be part of ColorFormat: default yes)
|
||||
int get_sRGB() const
|
||||
{
|
||||
return Format_sRGB;
|
||||
}
|
||||
void set_sRGB(int val)
|
||||
{
|
||||
Format_sRGB = val;
|
||||
}
|
||||
#endif
|
||||
|
||||
//! Returns width and height of image data.
|
||||
const core::dimension2d<u32>& getDimension() const
|
||||
{
|
||||
@ -455,10 +440,6 @@ protected:
|
||||
|
||||
bool DeleteMemory;
|
||||
bool DeleteMipMapsMemory;
|
||||
|
||||
#if defined(IRRLICHT_sRGB)
|
||||
int Format_sRGB;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -602,11 +602,6 @@ namespace scene
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
|
||||
|
||||
//! Get a mesh writer implementation if available
|
||||
/** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
|
||||
for details. */
|
||||
virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0;
|
||||
|
||||
//! Get a skinned mesh, which is not available as header-only code
|
||||
/** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
|
||||
for details. */
|
||||
|
@ -34,10 +34,8 @@ namespace irr
|
||||
Stencilbuffer(true),
|
||||
Vsync(false),
|
||||
AntiAlias(0),
|
||||
HandleSRGB(false),
|
||||
WithAlphaChannel(false),
|
||||
Doublebuffer(true),
|
||||
IgnoreInput(false),
|
||||
Stereobuffer(false),
|
||||
EventReceiver(0),
|
||||
WindowId(0),
|
||||
@ -74,10 +72,8 @@ namespace irr
|
||||
Stencilbuffer = other.Stencilbuffer;
|
||||
Vsync = other.Vsync;
|
||||
AntiAlias = other.AntiAlias;
|
||||
HandleSRGB = other.HandleSRGB;
|
||||
WithAlphaChannel = other.WithAlphaChannel;
|
||||
Doublebuffer = other.Doublebuffer;
|
||||
IgnoreInput = other.IgnoreInput;
|
||||
Stereobuffer = other.Stereobuffer;
|
||||
EventReceiver = other.EventReceiver;
|
||||
WindowId = other.WindowId;
|
||||
@ -158,21 +154,6 @@ namespace irr
|
||||
Default value: 0 - disabled */
|
||||
u8 AntiAlias;
|
||||
|
||||
//! Flag to enable proper sRGB and linear color handling
|
||||
/** In most situations, it is desirable to have the color handling in
|
||||
non-linear sRGB color space, and only do the intermediate color
|
||||
calculations in linear RGB space. If this flag is enabled, the device and
|
||||
driver try to assure that all color input and output are color corrected
|
||||
and only the internal color representation is linear. This means, that
|
||||
the color output is properly gamma-adjusted to provide the brighter
|
||||
colors for monitor display. And that blending and lighting give a more
|
||||
natural look, due to proper conversion from non-linear colors into linear
|
||||
color space for blend operations. If this flag is enabled, all texture colors
|
||||
(which are usually in sRGB space) are correctly displayed. However vertex colors
|
||||
and other explicitly set values have to be manually encoded in linear color space.
|
||||
Default value: false. */
|
||||
bool HandleSRGB;
|
||||
|
||||
//! Whether the main framebuffer uses an alpha channel.
|
||||
/** In some situations it might be desirable to get a color
|
||||
buffer with an alpha channel, e.g. when rendering into a
|
||||
@ -192,13 +173,6 @@ namespace irr
|
||||
single buffers. Default value: true */
|
||||
bool Doublebuffer;
|
||||
|
||||
//! Specifies if the device should ignore input events
|
||||
/** This is only relevant when using external I/O handlers.
|
||||
External windows need to take care of this themselves.
|
||||
Currently only supported by X11.
|
||||
Default value: false */
|
||||
bool IgnoreInput;
|
||||
|
||||
//! Specifies if the device should use stereo buffers
|
||||
/** Some high-end gfx cards support two framebuffers for direct
|
||||
support of stereoscopic output devices. If this flag is set the
|
||||
@ -278,7 +252,7 @@ namespace irr
|
||||
|
||||
//! Define some private data storage.
|
||||
/** Used when platform devices need access to OS specific data structures etc.
|
||||
This is only used for Android at th emoment in order to access the native
|
||||
This is only used for Android at the moment in order to access the native
|
||||
Java RE. */
|
||||
void *PrivateData;
|
||||
|
||||
|
@ -87,23 +87,6 @@ namespace irr
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
|
||||
#endif
|
||||
|
||||
//! Defines a deprecated macro which generates a warning at compile time
|
||||
/** The usage is simple
|
||||
For typedef: typedef _IRR_DEPRECATED_ int test1;
|
||||
For classes/structs: class _IRR_DEPRECATED_ test2 { ... };
|
||||
For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} };
|
||||
For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {}
|
||||
**/
|
||||
#if defined(IGNORE_DEPRECATED_WARNING)
|
||||
#define _IRR_DEPRECATED_
|
||||
#elif defined(_MSC_VER)
|
||||
#define _IRR_DEPRECATED_ __declspec(deprecated)
|
||||
#elif defined(__GNUC__)
|
||||
#define _IRR_DEPRECATED_ __attribute__ ((deprecated))
|
||||
#else
|
||||
#define _IRR_DEPRECATED_
|
||||
#endif
|
||||
|
||||
//! deprecated macro for virtual function override
|
||||
/** prefer to use the override keyword for new code */
|
||||
#define _IRR_OVERRIDE_ override
|
||||
|
@ -18,22 +18,6 @@
|
||||
// otherwise identity check will always compare the elements
|
||||
//#define USE_MATRIX_TEST
|
||||
|
||||
// this is only for debugging purposes
|
||||
//#define USE_MATRIX_TEST_DEBUG
|
||||
|
||||
#if defined( USE_MATRIX_TEST_DEBUG )
|
||||
|
||||
struct MatrixTest
|
||||
{
|
||||
MatrixTest () : ID(0), Calls(0) {}
|
||||
char buf[256];
|
||||
int Calls;
|
||||
int ID;
|
||||
};
|
||||
static MatrixTest MTest;
|
||||
|
||||
#endif
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace core
|
||||
@ -466,10 +450,6 @@ namespace core
|
||||
//! Flag is this matrix is identity matrix
|
||||
mutable u32 definitelyIdentityMatrix;
|
||||
#endif
|
||||
#if defined ( USE_MATRIX_TEST_DEBUG )
|
||||
u32 id;
|
||||
mutable u32 calls;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@ -478,9 +458,6 @@ namespace core
|
||||
inline CMatrix4<T>::CMatrix4( eConstructor constructor )
|
||||
#if defined ( USE_MATRIX_TEST )
|
||||
: definitelyIdentityMatrix(BIT_UNTESTED)
|
||||
#endif
|
||||
#if defined ( USE_MATRIX_TEST_DEBUG )
|
||||
,id ( MTest.ID++), calls ( 0 )
|
||||
#endif
|
||||
{
|
||||
switch ( constructor )
|
||||
@ -501,9 +478,6 @@ namespace core
|
||||
inline CMatrix4<T>::CMatrix4( const CMatrix4<T>& other, eConstructor constructor)
|
||||
#if defined ( USE_MATRIX_TEST )
|
||||
: definitelyIdentityMatrix(BIT_UNTESTED)
|
||||
#endif
|
||||
#if defined ( USE_MATRIX_TEST_DEBUG )
|
||||
,id ( MTest.ID++), calls ( 0 )
|
||||
#endif
|
||||
{
|
||||
switch ( constructor )
|
||||
|
@ -199,7 +199,7 @@ bool CFileSystem::addFileArchive(const io::path& filename, bool ignoreCase,
|
||||
s32 i;
|
||||
|
||||
// do we know what type it should be?
|
||||
if (archiveType == EFAT_UNKNOWN || archiveType == EFAT_FOLDER)
|
||||
if (archiveType == EFAT_UNKNOWN)
|
||||
{
|
||||
// try to load archive based on file name
|
||||
for (i = ArchiveLoader.size()-1; i >=0 ; --i)
|
||||
@ -295,7 +295,7 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase,
|
||||
bool ignorePaths, E_FILE_ARCHIVE_TYPE archiveType,
|
||||
const core::stringc& password, IFileArchive** retArchive)
|
||||
{
|
||||
if (!file || archiveType == EFAT_FOLDER)
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
if (file)
|
||||
|
@ -63,11 +63,6 @@ os::Printer::log("GLX >= 1.3", ELL_DEBUG);
|
||||
GLX_SAMPLE_BUFFERS_SGIS, 1,
|
||||
GLX_SAMPLES_SGIS, Params.AntiAlias, // 18,19
|
||||
#endif
|
||||
//#ifdef GL_ARB_framebuffer_sRGB
|
||||
// GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, Params.HandleSRGB,
|
||||
//#elif defined(GL_EXT_framebuffer_sRGB)
|
||||
// GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, Params.HandleSRGB,
|
||||
//#endif
|
||||
GLX_STEREO, Params.Stereobuffer?True:False,
|
||||
None
|
||||
};
|
||||
@ -209,11 +204,6 @@ os::Printer::log("GLX >= 1.3", ELL_DEBUG);
|
||||
// GLX_USE_GL, which is silently ignored by glXChooseVisual
|
||||
Params.Doublebuffer?GLX_DOUBLEBUFFER:GLX_USE_GL, // 14
|
||||
Params.Stereobuffer?GLX_STEREO:GLX_USE_GL, // 15
|
||||
//#ifdef GL_ARB_framebuffer_sRGB
|
||||
// Params.HandleSRGB?GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB:GLX_USE_GL,
|
||||
//#elif defined(GL_EXT_framebuffer_sRGB)
|
||||
// Params.HandleSRGB?GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT:GLX_USE_GL,
|
||||
//#endif
|
||||
None
|
||||
};
|
||||
|
||||
|
@ -467,10 +467,9 @@ bool CIrrDeviceLinux::createWindow()
|
||||
WndAttributes.colormap = colormap;
|
||||
WndAttributes.border_pixel = 0;
|
||||
WndAttributes.event_mask = StructureNotifyMask | FocusChangeMask | ExposureMask;
|
||||
if (!CreationParams.IgnoreInput)
|
||||
WndAttributes.event_mask |= PointerMotionMask |
|
||||
ButtonPressMask | KeyPressMask |
|
||||
ButtonReleaseMask | KeyReleaseMask;
|
||||
WndAttributes.event_mask |= PointerMotionMask |
|
||||
ButtonPressMask | KeyPressMask |
|
||||
ButtonReleaseMask | KeyReleaseMask;
|
||||
|
||||
if (!CreationParams.WindowId)
|
||||
{
|
||||
@ -513,14 +512,10 @@ bool CIrrDeviceLinux::createWindow()
|
||||
{
|
||||
// attach external window
|
||||
XWindow = (Window)CreationParams.WindowId;
|
||||
if (!CreationParams.IgnoreInput)
|
||||
{
|
||||
// Note: This might be further improved by using a InputOnly window instead of InputOutput.
|
||||
// I think then it should be possible to render into the given parent window instead of
|
||||
// creating a child-window.
|
||||
// That could also be a third option for IgnoreInput in the CreationParams.
|
||||
// But we need another window variable then and have to split input/output in
|
||||
// the rest of the device code.
|
||||
// Also... this does possibly leak.
|
||||
Window child_window = XCreateWindow(XDisplay,
|
||||
XWindow,
|
||||
|
@ -153,16 +153,6 @@ bool COpenGLDriver::genericDriverInit()
|
||||
#endif
|
||||
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);
|
||||
|
||||
Params.HandleSRGB &= ((FeatureAvailable[IRR_ARB_framebuffer_sRGB] || FeatureAvailable[IRR_EXT_framebuffer_sRGB]) &&
|
||||
FeatureAvailable[IRR_EXT_texture_sRGB]);
|
||||
#if defined(GL_ARB_framebuffer_sRGB)
|
||||
if (Params.HandleSRGB)
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
#elif defined(GL_EXT_framebuffer_sRGB)
|
||||
if (Params.HandleSRGB)
|
||||
glEnable(GL_FRAMEBUFFER_SRGB_EXT);
|
||||
#endif
|
||||
|
||||
// This is a fast replacement for NORMALIZE_NORMALS
|
||||
// if ((Version>101) || FeatureAvailable[IRR_EXT_rescale_normal])
|
||||
// glEnable(GL_RESCALE_NORMAL_EXT);
|
||||
@ -3688,16 +3678,6 @@ bool COpenGLDriver::getColorFormatParameters(ECOLOR_FORMAT format, GLint& intern
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(GL_ARB_framebuffer_sRGB) || defined(GL_EXT_framebuffer_sRGB)
|
||||
if (Params.HandleSRGB)
|
||||
{
|
||||
if (internalFormat == GL_RGBA)
|
||||
internalFormat = GL_SRGB_ALPHA_EXT;
|
||||
else if (internalFormat == GL_RGB)
|
||||
internalFormat = GL_SRGB_EXT;
|
||||
}
|
||||
#endif
|
||||
|
||||
return supported;
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "CWGLManager.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WGL_MANAGER_
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WGL_MANAGER_
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
@ -240,22 +240,10 @@ bool CWGLManager::initialize(const SIrrlichtCreationParameters& params, const SE
|
||||
WGL_SAMPLES_3DFX,AntiAlias, // 20,21
|
||||
WGL_SAMPLE_BUFFERS_3DFX, (Params.AntiAlias>0) ? 1 : 0,
|
||||
#endif
|
||||
#ifdef WGL_ARB_framebuffer_sRGB
|
||||
WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, Params.HandleSRGB ? 1:0,
|
||||
#elif defined(WGL_EXT_framebuffer_sRGB)
|
||||
WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT, Params.HandleSRGB ? 1:0,
|
||||
#endif
|
||||
// WGL_DEPTH_FLOAT_EXT, 1,
|
||||
0,0,0,0
|
||||
};
|
||||
int iAttrSize = sizeof(iAttributes)/sizeof(int);
|
||||
const bool framebuffer_srgb_supported = ((wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1) ||
|
||||
(wglExtensions.find("WGL_EXT_framebuffer_sRGB") != -1));
|
||||
if (!framebuffer_srgb_supported)
|
||||
{
|
||||
memmove(&iAttributes[24],&iAttributes[26],sizeof(int)*(iAttrSize-26));
|
||||
iAttrSize -= 2;
|
||||
}
|
||||
if (!multi_sample_supported)
|
||||
{
|
||||
memmove(&iAttributes[20],&iAttributes[24],sizeof(int)*(iAttrSize-24));
|
||||
@ -507,5 +495,5 @@ bool CWGLManager::swapBuffers()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user