mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 07:40:26 +02:00
Remove more dead code
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user