Merged updates from 1.8.1 release to trunk, revisions 4579-4615.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4616 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
754e6fcc04
commit
e0c819b1c1
14
changes.txt
14
changes.txt
|
@ -29,13 +29,23 @@ Changes in 1.9 (not yet released)
|
|||
- Add getters IGUIButton::isDrawBorderEnabled and IGUIButton::isDrawBackgroundEnabled
|
||||
|
||||
--------------------------
|
||||
Changes in 1.8.1 (not yet released)
|
||||
Changes in 1.8.1 (17.11.2013)
|
||||
|
||||
- Improved OpenGL performance under OSX (Thanks devonsoft for reporting).
|
||||
- Fixed OSX compilation issues.
|
||||
- [KNOWN BUG] Software driver doesn't work properly under OSX 10.9.
|
||||
- For speed improvement the following attributes accessible by ISceneManager::getParameters() are no longer updated in release:
|
||||
"culled", "calls", "drawn_solid", "drawn_transparent", "drawn_transparent_effect".
|
||||
They can be enabled by compiling Irrlicht with the define _IRR_SCENEMANAGER_DEBUG.
|
||||
Thanks @hendu for reporting, see http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion.
|
||||
- Fix compile problem with CIrrDeviceSDL on VS2008 (and maybe other systems). Thanks @HellFlip for reporting.
|
||||
- Fix quaternion::rotationFromTo() (Thanks @takamoto for reporting)
|
||||
- Fix iszero for s64 (Thanks @chronologicaldot for reporting)
|
||||
- Fix crash in SoftwareDriver2 when Material was EMT_DETAIL_MAP but texture[1] was not set (Thanks for fix by chronologicaldot)
|
||||
- Fix buffer overrun in x-loader (Thanks for fix by Otaka)
|
||||
- Fix cursor visibility update problem under Windows 8 (Thanks @luthyr for reporting)
|
||||
- Fix irredit links in loadScene/saveScene docs.
|
||||
- Fix issue in CAnimatedMeshSceneNode::clone which cause crash. (reported and fixed by luthyr)
|
||||
- Fix issue in CAnimatedMeshSceneNode::clone which caused a crash. (reported and fixed by luthyr)
|
||||
- Fix compiling errors for c++ builder (thx @Greatwolf for many patches and @cfanderek for reminding)
|
||||
- Initialized IColladaMeshWriter::GeometryWriting which was uninitialized.
|
||||
- Fix linker trouble with irr::core::equalsByUl when compiling Irrlicht as managed code (thx @ Memorial76 for a report + testcase)
|
||||
|
|
|
@ -360,6 +360,7 @@ int IRRCALLCONV main(int argc, char* argv[])
|
|||
str += driver->getName();
|
||||
str += "] FPS:";
|
||||
str += fps;
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
str += " Cull:";
|
||||
str += attr->getAttributeAsInt("calls");
|
||||
str += "/";
|
||||
|
@ -370,7 +371,7 @@ int IRRCALLCONV main(int argc, char* argv[])
|
|||
str += attr->getAttributeAsInt("drawn_transparent");
|
||||
str += "/";
|
||||
str += attr->getAttributeAsInt("drawn_transparent_effect");
|
||||
|
||||
#endif
|
||||
device->setWindowCaption(str.c_str());
|
||||
lastFPS = fps;
|
||||
}
|
||||
|
|
|
@ -2028,6 +2028,7 @@ void CQuake3EventHandler::Animate()
|
|||
IVideoDriver * driver = Game->Device->getVideoDriver();
|
||||
|
||||
IAttributes * attr = smgr->getParameters();
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
swprintf ( msg, 128,
|
||||
L"Q3 %s [%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)",
|
||||
Game->CurrentMapName.c_str(),
|
||||
|
@ -2040,6 +2041,15 @@ void CQuake3EventHandler::Animate()
|
|||
attr->getAttributeAsInt ( "drawn_transparent" ),
|
||||
attr->getAttributeAsInt ( "drawn_transparent_effect" )
|
||||
);
|
||||
#else
|
||||
swprintf ( msg, 128,
|
||||
L"Q3 %s [%ls], FPS:%03d Tri:%.03fm",
|
||||
Game->CurrentMapName.c_str(),
|
||||
driver->getName(),
|
||||
driver->getFPS (),
|
||||
(f32) driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f )
|
||||
);
|
||||
#endif
|
||||
Game->Device->setWindowCaption( msg );
|
||||
|
||||
swprintf ( msg, 128,
|
||||
|
|
|
@ -847,5 +847,19 @@ precision will be lower but speed higher. currently X86 only
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
//! A few attributes are written in CSceneManager when _IRR_SCENEMANAGER_DEBUG is enabled
|
||||
// NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1
|
||||
// which is only enabled in debug because it had a large (sometimes >5%) impact on speed.
|
||||
// A better solution in the long run is to break the interface and remove _all_ attribute
|
||||
// access in functions like CSceneManager::drawAll and instead put that information in some
|
||||
// own struct/class or in CSceneManager.
|
||||
// See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion.
|
||||
#define _IRR_SCENEMANAGER_DEBUG
|
||||
#ifdef NO_IRR_SCENEMANAGER_DEBUG
|
||||
#undef _IRR_SCENEMANAGER_DEBUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ namespace core
|
|||
//! returns if a equals zero, taking rounding errors into account
|
||||
inline bool iszero(const s64 a, const s64 tolerance = 0)
|
||||
{
|
||||
return abs_(a) > tolerance;
|
||||
return abs_(a) <= tolerance;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -676,7 +676,7 @@ inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const
|
|||
if (axis.getLength()==0)
|
||||
{
|
||||
axis.set(0.f,1.f,0.f);
|
||||
axis.crossProduct(v0);
|
||||
axis = axis.crossProduct(v0);
|
||||
}
|
||||
// same as fromAngleAxis(core::PI, axis).normalize();
|
||||
return set(axis.X, axis.Y, axis.Z, 0).normalize();
|
||||
|
|
|
@ -54,11 +54,10 @@ The Irrlicht Engine SDK version 1.9
|
|||
easily comprehensible.
|
||||
|
||||
The Irrlicht Engine is a static lib under linux. A precompiled version can be
|
||||
generated from the sources using the Makefile in source/Irrlicht. Unzip the
|
||||
file source.zip in the /source directory. Run 'make' in the newly created
|
||||
subfolder source/Irrlicht. After this you should be able to 'make' all
|
||||
example applications in /examples. You can run the examples directly from the
|
||||
directory they are created in.
|
||||
generated from the sources using the Makefile in source/Irrlicht. Run 'make' in
|
||||
that subfolder. After this you should be able to 'make' all
|
||||
example applications in /examples by calling the buildAllExamples script. You
|
||||
can run the examples then from the bin folder.
|
||||
|
||||
It is also possible to use Irrlicht as shared object
|
||||
(libIrrlicht.so.versionNumber). Use the proper makefile target for this by
|
||||
|
|
|
@ -478,7 +478,7 @@ bool CIrrDeviceSDL::run()
|
|||
joyevent.JoystickEvent.ButtonStates |= (SDL_JoystickGetButton(joystick, j)<<j);
|
||||
|
||||
// query all axes, already in correct range
|
||||
const int numAxes = core::min_(SDL_JoystickNumAxes(joystick), SEvent::SJoystickEvent::NUMBER_OF_AXES);
|
||||
const int numAxes = core::min_(SDL_JoystickNumAxes(joystick), (int)SEvent::SJoystickEvent::NUMBER_OF_AXES);
|
||||
joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_X]=0;
|
||||
joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Y]=0;
|
||||
joyevent.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_Z]=0;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#include "COpenGLParallaxMapRenderer.h"
|
||||
#include "os.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
#include "MacOSX/CIrrDeviceMacOSX.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
|
||||
#include <SDL/SDL.h>
|
||||
#endif
|
||||
|
|
|
@ -1225,7 +1225,7 @@ class COpenGLExtensionHandler
|
|||
void extGlDisableIndexed(GLenum target, GLuint index);
|
||||
void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst);
|
||||
void extGlBlendEquationIndexed(GLuint buf, GLenum mode);
|
||||
void extGlProgramParameteri(GLhandleARB program, GLenum pname, GLint value);
|
||||
void extGlProgramParameteri(GLuint program, GLenum pname, GLint value);
|
||||
|
||||
// occlusion query
|
||||
void extGlGenQueries(GLsizei n, GLuint *ids);
|
||||
|
@ -2525,7 +2525,7 @@ inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenu
|
|||
#endif
|
||||
}
|
||||
|
||||
inline void COpenGLExtensionHandler::extGlProgramParameteri(GLhandleARB program, GLenum pname, GLint value)
|
||||
inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLenum pname, GLint value)
|
||||
{
|
||||
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||
if (queryFeature(EVDF_GEOMETRY_SHADER))
|
||||
|
@ -2538,7 +2538,7 @@ inline void COpenGLExtensionHandler::extGlProgramParameteri(GLhandleARB program,
|
|||
#elif defined(GL_ARB_geometry_shader4)
|
||||
glProgramParameteriARB(program, pname, value);
|
||||
#elif defined(GL_EXT_geometry_shader4)
|
||||
glProgramParameteriEXT((long unsigned int)program, pname, value);
|
||||
glProgramParameteriEXT(program, pname, value);
|
||||
#elif defined(GL_NV_geometry_program4) || defined(GL_NV_geometry_shader4)
|
||||
glProgramParameteriNV(program, pname, value);
|
||||
#else
|
||||
|
|
|
@ -163,23 +163,14 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr,
|
|||
if (!createShader(GL_GEOMETRY_SHADER_EXT, geometryShaderProgram))
|
||||
return;
|
||||
#if defined(GL_ARB_geometry_shader4) || defined(GL_EXT_geometry_shader4) || defined(GL_NV_geometry_shader4)
|
||||
if (Program2)
|
||||
if (Program2) // Geometry shaders are supported only in OGL2.x+ drivers.
|
||||
{
|
||||
Driver->extGlProgramParameteri((GLhandleARB)Program2, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
|
||||
Driver->extGlProgramParameteri((GLhandleARB)Program2, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
|
||||
Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
|
||||
Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
|
||||
if (verticesOut==0)
|
||||
Driver->extGlProgramParameteri((GLhandleARB)Program2, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
|
||||
Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
|
||||
else
|
||||
Driver->extGlProgramParameteri((GLhandleARB)Program2, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
|
||||
}
|
||||
else
|
||||
{
|
||||
Driver->extGlProgramParameteri(Program, GL_GEOMETRY_INPUT_TYPE_EXT, Driver->primitiveTypeToGL(inType));
|
||||
Driver->extGlProgramParameteri(Program, GL_GEOMETRY_OUTPUT_TYPE_EXT, Driver->primitiveTypeToGL(outType));
|
||||
if (verticesOut==0)
|
||||
Driver->extGlProgramParameteri(Program, GL_GEOMETRY_VERTICES_OUT_EXT, Driver->MaxGeometryVerticesOut);
|
||||
else
|
||||
Driver->extGlProgramParameteri(Program, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
|
||||
Driver->extGlProgramParameteri(Program2, GL_GEOMETRY_VERTICES_OUT_EXT, core::min_(verticesOut, Driver->MaxGeometryVerticesOut));
|
||||
}
|
||||
#elif defined(GL_NV_geometry_program4)
|
||||
if (verticesOut==0)
|
||||
|
|
|
@ -173,9 +173,6 @@
|
|||
|
||||
#include "CGeometryCreator.h"
|
||||
|
||||
//! Enable debug features
|
||||
#define SCENEMANAGER_DEBUG
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
|
@ -1329,7 +1326,7 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDE
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef SCENEMANAGER_DEBUG
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
s32 index = Parameters->findAttribute("calls");
|
||||
Parameters->setAttribute(index, Parameters->getAttributeAsInt(index)+1);
|
||||
|
||||
|
@ -1351,12 +1348,14 @@ void CSceneManager::drawAll()
|
|||
if (!Driver)
|
||||
return;
|
||||
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
// reset attributes
|
||||
Parameters->setAttribute("culled", 0);
|
||||
Parameters->setAttribute("calls", 0);
|
||||
Parameters->setAttribute("drawn_solid", 0);
|
||||
Parameters->setAttribute("drawn_transparent", 0);
|
||||
Parameters->setAttribute("drawn_transparent_effect", 0);
|
||||
#endif
|
||||
|
||||
u32 i; // new ISO for scoping problem in some compilers
|
||||
|
||||
|
@ -1367,6 +1366,7 @@ void CSceneManager::drawAll()
|
|||
Driver->setTransform ( video::ETS_WORLD, core::IdentityMatrix );
|
||||
for (i=video::ETS_COUNT-1; i>=video::ETS_TEXTURE_0; --i)
|
||||
Driver->setTransform ( (video::E_TRANSFORMATION_STATE)i, core::IdentityMatrix );
|
||||
// TODO: This should not use an attribute here but a real parameter when necessary (too slow!)
|
||||
Driver->setAllowZWriteOnTransparent(Parameters->getAttributeAsBool(ALLOW_ZWRITE_ON_TRANSPARENT));
|
||||
|
||||
// do animations and other stuff.
|
||||
|
@ -1503,7 +1503,9 @@ void CSceneManager::drawAll()
|
|||
SolidNodeList[i].Node->render();
|
||||
}
|
||||
|
||||
Parameters->setAttribute("drawn_solid", (s32) SolidNodeList.size());
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
Parameters.setAttribute("drawn_solid", (s32) SolidNodeList.size() );
|
||||
#endif
|
||||
SolidNodeList.set_used(0);
|
||||
|
||||
if (LightManager)
|
||||
|
@ -1566,7 +1568,9 @@ void CSceneManager::drawAll()
|
|||
TransparentNodeList[i].Node->render();
|
||||
}
|
||||
|
||||
Parameters->setAttribute("drawn_transparent", (s32) TransparentNodeList.size());
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
Parameters.setAttribute ( "drawn_transparent", (s32) TransparentNodeList.size() );
|
||||
#endif
|
||||
TransparentNodeList.set_used(0);
|
||||
|
||||
if (LightManager)
|
||||
|
@ -1597,8 +1601,9 @@ void CSceneManager::drawAll()
|
|||
for (i=0; i<TransparentEffectNodeList.size(); ++i)
|
||||
TransparentEffectNodeList[i].Node->render();
|
||||
}
|
||||
|
||||
#ifdef _IRR_SCENEMANAGER_DEBUG
|
||||
Parameters->setAttribute("drawn_transparent_effect", (s32) TransparentEffectNodeList.size());
|
||||
#endif
|
||||
TransparentEffectNodeList.set_used(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -632,6 +632,7 @@ namespace scene
|
|||
video::SColorf AmbientLight;
|
||||
|
||||
//! String parameters
|
||||
// NOTE: Attributes are slow and should only be used for debug-info and not in release
|
||||
io::CAttributes* Parameters;
|
||||
|
||||
//! Mesh cache
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <AppKit/NSOpenGL.h>
|
||||
#import <AppKit/NSBitmapImageRep.h>
|
||||
|
||||
#include "CIrrDeviceStub.h"
|
||||
#include "IrrlichtDevice.h"
|
||||
#include "IImagePresenter.h"
|
||||
|
@ -19,16 +23,6 @@
|
|||
#include <OpenGL/OpenGL.h>
|
||||
#include <map>
|
||||
|
||||
#ifdef __MAC_10_6
|
||||
@class NSWindow;
|
||||
@class NSOpenGLContext;
|
||||
@class NSBitmapImageRep;
|
||||
#else
|
||||
class NSWindow;
|
||||
class NSOpenGLContext;
|
||||
class NSBitmapImageRep;
|
||||
#endif
|
||||
|
||||
namespace irr
|
||||
{
|
||||
class CIrrDeviceMacOSX : public CIrrDeviceStub, video::IImagePresenter
|
||||
|
|
|
@ -506,7 +506,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
|
|||
chdir([path fileSystemRepresentation]);
|
||||
[path release];
|
||||
}
|
||||
|
||||
NSWindow* a;
|
||||
uname(&name);
|
||||
Operator = new COSOperator(name.version);
|
||||
os::Printer::log(name.version,ELL_INFORMATION);
|
||||
|
|
|
@ -4383,11 +4383,11 @@
|
|||
0867D690FE84028FC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0450;
|
||||
};
|
||||
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "MacOSX" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
|
@ -6054,7 +6054,6 @@
|
|||
1DEB921F08733DC00010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
|
@ -6064,8 +6063,6 @@
|
|||
GCC_PREFIX_HEADER = MacOSX_Prefix.pch;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = Irrlicht;
|
||||
SHARED_PRECOMPS_DIR = "";
|
||||
SYMROOT = build;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -6073,7 +6070,6 @@
|
|||
1DEB922008733DC00010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
|
@ -6082,7 +6078,6 @@
|
|||
INSTALL_PATH = /usr/local/lib;
|
||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
|
||||
PRODUCT_NAME = Irrlicht;
|
||||
SHARED_PRECOMPS_DIR = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue