From 7bae34bc61200855cb62fc8bdf2dadc74589731a Mon Sep 17 00:00:00 2001 From: hybrid Date: Tue, 1 Jun 2010 22:52:38 +0000 Subject: [PATCH] Merged revisions 3175-3300 from trunk. Another huge update, bringing the ogl-es branch to the latest version of Irrlicht. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@3301 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 99 +- doc/upgrade-guide.txt | 390 ++ examples/02.Quake3Map/main.cpp | 17 +- examples/03.CustomSceneNode/main.cpp | 28 +- examples/04.Movement/Movement.cbp | 11 +- examples/04.Movement/main.cpp | 28 +- examples/05.UserInterface/main.cpp | 26 +- examples/06.2DGraphics/main.cpp | 28 +- examples/07.Collision/main.cpp | 44 +- examples/08.SpecialFX/main.cpp | 24 +- examples/09.Meshviewer/main.cpp | 30 +- examples/10.Shaders/main.cpp | 28 +- .../11.PerPixelLighting/PerPixelLighting.cbp | 23 +- examples/11.PerPixelLighting/main.cpp | 6 +- examples/12.TerrainRendering/main.cpp | 33 +- examples/13.RenderToTexture/main.cpp | 28 +- .../14.Win32Window/Win32Window_vc8.vcproj | 2 +- examples/14.Win32Window/main.cpp | 27 +- examples/15.LoadIrrFile/main.cpp | 27 +- examples/16.Quake3MapShader/main.cpp | 46 +- examples/18.SplitScreen/main.cpp | 26 +- examples/19.MouseAndJoystick/main.cpp | 28 +- examples/20.ManagedLights/main.cpp | 127 +- examples/21.Quake3Explorer/main.cpp | 107 +- examples/22.MaterialViewer/main.cpp | 33 +- examples/23.SMeshHandling/SMeshHandling.cbp | 39 + examples/23.SMeshHandling/main.cpp | 25 +- examples/Demo/CDemo.cpp | 1 + include/ECullingTypes.h | 4 +- include/EDriverFeatures.h | 3 + include/EDriverTypes.h | 5 +- include/EMaterialFlags.h | 5 +- include/IEventReceiver.h | 6 +- include/IFileSystem.h | 32 +- include/IGPUProgrammingServices.h | 36 +- include/IGUIElement.h | 1 + include/IGUIListBox.h | 2 +- include/IGUIScrollBar.h | 6 +- include/IGUISkin.h | 4 +- include/IMeshManipulator.h | 13 +- include/ISceneNode.h | 15 +- include/ITexture.h | 25 +- include/IVideoDriver.h | 65 +- include/IrrCompileConfig.h | 10 +- include/S3DVertex.h | 30 + include/SColor.h | 25 +- include/SMaterial.h | 14 +- include/SVertexManipulator.h | 2 +- include/aabbox3d.h | 8 +- include/driverChoice.h | 42 + include/irrMath.h | 34 +- include/irrString.h | 294 +- include/irrTypes.h | 4 + include/irrXML.h | 18 +- include/irrlicht.h | 2 +- include/line2d.h | 16 +- include/matrix4.h | 161 +- include/quaternion.h | 26 + include/vector3d.h | 2 +- source/Irrlicht/CAnimatedMeshMD2.cpp | 18 - source/Irrlicht/CAnimatedMeshMD2.h | 3 - source/Irrlicht/CAnimatedMeshSceneNode.cpp | 9 +- source/Irrlicht/CB3DMeshFileLoader.cpp | 2 +- source/Irrlicht/CBillboardSceneNode.cpp | 5 +- source/Irrlicht/CCameraSceneNode.cpp | 29 +- source/Irrlicht/CColladaFileLoader.cpp | 281 +- source/Irrlicht/CColladaFileLoader.h | 19 +- source/Irrlicht/CCubeSceneNode.cpp | 7 +- source/Irrlicht/CD3D8Driver.cpp | 11 +- source/Irrlicht/CD3D9Driver.cpp | 161 +- source/Irrlicht/CD3D9Driver.h | 40 +- source/Irrlicht/CD3D9MaterialRenderer.h | 3 + source/Irrlicht/CD3D9NormalMapRenderer.h | 3 + source/Irrlicht/CD3D9ParallaxMapRenderer.h | 3 + source/Irrlicht/CD3D9ShaderMaterialRenderer.h | 3 + source/Irrlicht/CD3D9Texture.h | 3 + source/Irrlicht/CEmptySceneNode.cpp | 5 +- source/Irrlicht/CFileSystem.cpp | 24 +- source/Irrlicht/CGUIEnvironment.cpp | 138 +- source/Irrlicht/CGUIEnvironment.h | 3 + source/Irrlicht/CGUIFileOpenDialog.cpp | 3 +- source/Irrlicht/CGUIListBox.cpp | 7 +- source/Irrlicht/CGUIListBox.h | 2 +- source/Irrlicht/CGUIMessageBox.cpp | 18 +- source/Irrlicht/CGUIModalScreen.cpp | 2 +- source/Irrlicht/CGUIScrollBar.cpp | 8 +- source/Irrlicht/CGUIScrollBar.h | 2 +- source/Irrlicht/CGUISkin.cpp | 38 +- source/Irrlicht/CGUIWindow.cpp | 109 +- source/Irrlicht/CGeometryCreator.cpp | 4 +- source/Irrlicht/CIrrDeviceLinux.cpp | 32 +- source/Irrlicht/CIrrDeviceWin32.cpp | 320 +- source/Irrlicht/CIrrDeviceWinCE.cpp | 8 +- source/Irrlicht/CIrrMeshWriter.cpp | 6 +- source/Irrlicht/CLightSceneNode.cpp | 3 +- source/Irrlicht/CMD2MeshFileLoader.cpp | 6 +- source/Irrlicht/CMS3DMeshFileLoader.cpp | 13 +- source/Irrlicht/CMeshManipulator.cpp | 532 +-- source/Irrlicht/CMeshManipulator.h | 5 +- source/Irrlicht/CMeshSceneNode.cpp | 3 +- source/Irrlicht/CMountPointReader.cpp | 21 +- source/Irrlicht/CMountPointReader.h | 6 - source/Irrlicht/CNPKReader.cpp | 8 +- source/Irrlicht/CNullDriver.cpp | 158 +- source/Irrlicht/CNullDriver.h | 125 +- source/Irrlicht/COBJMeshFileLoader.cpp | 9 +- source/Irrlicht/COgreMeshFileLoader.cpp | 15 +- source/Irrlicht/COpenGLDriver.cpp | 350 +- source/Irrlicht/COpenGLDriver.h | 36 +- source/Irrlicht/COpenGLExtensionHandler.cpp | 201 +- source/Irrlicht/COpenGLExtensionHandler.h | 470 +- source/Irrlicht/COpenGLSLMaterialRenderer.cpp | 352 +- source/Irrlicht/COpenGLSLMaterialRenderer.h | 1 + source/Irrlicht/COpenGLTexture.cpp | 4 +- source/Irrlicht/CPakReader.cpp | 6 +- source/Irrlicht/CSceneManager.cpp | 87 +- .../CSceneNodeAnimatorCollisionResponse.cpp | 2 +- source/Irrlicht/CShadowVolumeSceneNode.cpp | 121 +- source/Irrlicht/CShadowVolumeSceneNode.h | 10 +- source/Irrlicht/CSkinnedMesh.cpp | 17 +- source/Irrlicht/CSkyBoxSceneNode.cpp | 3 +- source/Irrlicht/CSkyDomeSceneNode.cpp | 15 +- source/Irrlicht/CSphereSceneNode.cpp | 5 +- source/Irrlicht/CTarReader.cpp | 2 +- source/Irrlicht/CTerrainSceneNode.cpp | 3 +- source/Irrlicht/CVolumeLightSceneNode.cpp | 3 +- source/Irrlicht/CXMLReaderImpl.h | 25 +- source/Irrlicht/CXMeshFileLoader.cpp | 1 - source/Irrlicht/CZipReader.cpp | 19 +- source/Irrlicht/Irrlicht-gcc.cbp | 1 + source/Irrlicht/Irrlicht.dev | 10 +- source/Irrlicht/Irrlicht9.0.vcproj | 28 +- source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm | 1 + source/Irrlicht/Octree.h | 30 +- source/Irrlicht/SConstruct | 8 +- source/Irrlicht/glext.h | 3793 ++++++++++------- source/Irrlicht/glxext.h | 201 +- source/Irrlicht/irrXML.cpp | 4 +- source/Irrlicht/wglext.h | 208 +- tests/color.cpp | 21 + tests/irrString.cpp | 76 +- tests/lights.cpp | 59 + tests/main.cpp | 9 +- tests/matrixOps.cpp | 19 + tests/md2Animation.cpp | 22 +- tests/media/Burning's Video-lightType.png | Bin 0 -> 3072 bytes tests/media/Burning's Video-orthoCam.png | Bin 0 -> 5326 bytes tests/media/Direct3D 8.1-lightType.png | Bin 0 -> 1856 bytes tests/media/Direct3D 8.1-orthoCam.png | Bin 0 -> 4415 bytes .../media/Direct3D 8.1-stencilSelfShadow.png | Bin 0 -> 14571 bytes tests/media/Direct3D 8.1-stencilShadow.png | Bin 0 -> 5648 bytes tests/media/Direct3D 9.0-lightType.png | Bin 0 -> 1856 bytes tests/media/Direct3D 9.0-orthoCam.png | Bin 0 -> 4415 bytes tests/media/Direct3D 9.0-orthoStencil.png | Bin 0 -> 2104 bytes .../media/Direct3D 9.0-stencilSelfShadow.png | Bin 0 -> 14550 bytes tests/media/Direct3D 9.0-stencilShadow.png | Bin 0 -> 5648 bytes tests/media/OpenGL-lightType.png | Bin 0 -> 3291 bytes tests/media/OpenGL-orthoCam.png | Bin 0 -> 4381 bytes tests/media/OpenGL-orthoStencil.png | Bin 0 -> 2084 bytes tests/media/OpenGL-stencilSelfShadow.png | Bin 0 -> 12250 bytes tests/media/OpenGL-stencilShadow.png | Bin 0 -> 5321 bytes .../OpenGL-transparentAlphaChannelRef.png | Bin 0 -> 30159 bytes tests/orthoCam.cpp | 97 + tests/sceneCollisionManager.cpp | 29 +- tests/stencilshadow.cpp | 72 + tests/testQuaternion.cpp | 74 + tests/testVector3d.cpp | 2 - tests/tests-last-passed-at.txt | 4 +- tests/tests_vc9.vcproj | 20 + tests/textureFeatures.cpp | 24 +- tests/textureRenderStates.cpp | 82 +- tests/transparentAlphaChannelRef.cpp | 1 + tools/GUIEditor/CGUIColorAttribute.h | 14 +- tools/GUIEditor/CGUIEditWindow.cpp | 6 + tools/GUIEditor/CGUIEditWorkspace.cpp | 30 +- tools/GUIEditor/CGUITextureAttribute.h | 8 +- tools/GUIEditor/CGUITextureCacheBrowser.cpp | 18 +- tools/GUIEditor/main.cpp | 31 +- 178 files changed, 7317 insertions(+), 3892 deletions(-) create mode 100644 examples/23.SMeshHandling/SMeshHandling.cbp create mode 100644 include/driverChoice.h create mode 100644 tests/color.cpp create mode 100644 tests/lights.cpp create mode 100644 tests/media/Burning's Video-lightType.png create mode 100644 tests/media/Burning's Video-orthoCam.png create mode 100644 tests/media/Direct3D 8.1-lightType.png create mode 100644 tests/media/Direct3D 8.1-orthoCam.png create mode 100644 tests/media/Direct3D 8.1-stencilSelfShadow.png create mode 100644 tests/media/Direct3D 8.1-stencilShadow.png create mode 100644 tests/media/Direct3D 9.0-lightType.png create mode 100644 tests/media/Direct3D 9.0-orthoCam.png create mode 100644 tests/media/Direct3D 9.0-orthoStencil.png create mode 100644 tests/media/Direct3D 9.0-stencilSelfShadow.png create mode 100644 tests/media/Direct3D 9.0-stencilShadow.png create mode 100644 tests/media/OpenGL-lightType.png create mode 100644 tests/media/OpenGL-orthoCam.png create mode 100644 tests/media/OpenGL-orthoStencil.png create mode 100644 tests/media/OpenGL-stencilSelfShadow.png create mode 100644 tests/media/OpenGL-stencilShadow.png create mode 100644 tests/media/OpenGL-transparentAlphaChannelRef.png create mode 100644 tests/orthoCam.cpp create mode 100644 tests/stencilshadow.cpp create mode 100644 tests/testQuaternion.cpp diff --git a/changes.txt b/changes.txt index bb608da8..ea18481b 100644 --- a/changes.txt +++ b/changes.txt @@ -1,11 +1,82 @@ -Changes in 1.7 +----------------------------- +Changes in 1.7.1 (17.02.2010) + + - Fix octree with frustum+parent checks enabled (didn't clip at all before). Now using plane-checks instead of edge-checks for frustum-box intersection. + + - Prevent that X11 selects larger resolutions in fullscreen even when perfect fits are available. + + - Ignore setResizable also on X11 when we're fullscreen to avoid messing up the window mode. + + - Work around a crash when pressing ESC after closing a Messagebox (found by Acki) + + - Prevent borland compile warnings in SColorHSL::FromRGB and in SVertexColorThresholdManipulator (found by mdeininger) + + - Improve Windows version detection rules (Patch from brferreira) + + - Make it compile on Borland compilers (thx to mdeininger) + + - Make sure that CAnimatedMeshSceneNode::clone calls the virtual updateAbsolutePosition for the new object + + - Fix that clones got dropped too often when SceneNodes without parent got cloned (found by Ulf) + + - Make sure TAB is still recognized on X11 when shift+tab is pressed. This does also fix going to the previous tabstop on X11. + + - Send EGET_ELEMENT_LEFT also when there won't be a new hovered element + + - Update docs for EGET_ELEMENT_LEFT and EGET_ELEMENT_HOVERED + + - Fix tooltips: Remove them when the element is hidden or removed (thx to seven for finding) + + - Fix tooltips: Make (more) sure they don't get confused by gui-subelements + + - Fix tooltips: Get faster relaunch times working + + - Fix tooltips: Make sure hovered element is never the tooltip itself + + - Fix string::remove which got in an endless loop when remove was called with an empty string (found and fixed by Ulf) + + - Correctly release the GLSL shaders + + - Make sure we only release an X11 atom when it was actually created + + - Fix aabbox collision test, which not only broke the collision test routines, but also frustum culling, octree tests, etc. + + - Fix compilation problem under OSX due to wrong glProgramParameteri usage + + - mem leak in OBJ loader fixed + + - Removed some default parameters to reduce ambigious situations +--------------------------- +Changes in 1.7 (03.02.2010) + + - Implement minimize and deminimize under OSX. - Define sorting order for vector2d and vector3d in operators <, <=, > and >= to fix bugs 2783509 and 2783510. Operators order now by X,Y,Z and use float tolerances. + - Ogre mesh 32bit indices fixed. + - Fix tooltips for gui-elements with sub-element like IGUISpinBox (id: 2927079, found by ArakisTheKitsune) - ITimer no longer stops when started twice + - wchar_t filesystem updates under Windows. + + - Joystick POV fixed under Windows, ids fixed under OSX. + + - Some updates to skinned mesh for better bones support and scaling animations. + + - OSX supports external window id in creation parameters now. + + - Fix bbox collision tests. + + - Updates for win32 key handling + + - new convenience method for flat plane creation. + + - Sky dome and other meshes use VBOs by default now. + + - Speed up b3d loading for files with many frames, material color flags and vertex color support enhanced. + - Add hasType to IGUIElement as a dynamic_cast substitute. - Add another parameter to IGUISkin::draw3DWindowBackground to allow getting the client area without actually drawing @@ -26,6 +97,10 @@ Changes in 1.7 - Add clearSystemMessages to devices (implemented only for Linux and Win32 so far). + - Support changing the render window from beginScene also with OpenGL driver. + + - Add getMaterial2D which allows to alter the 2d render state settings, such as filtering, anti-aliasing, thickness, etc. + - Fix incorrect cursorpos for resizable windows on Windows Vista (found and patched by buffer) - Change the beginScene window parameter from void* to SExposedVideoData&. This will allow to manage contexts for OpenGL at some point. @@ -38,6 +113,8 @@ Changes in 1.7 - Bugfix: Mousewheel no longer sends EMIE_MOUSE_WHEEL messages twice on Linux. + - Use latest jpeglib + - refactoring: E_ATTRIBUTE_TYPE and IAttribute have now own headers - CStringWArrayAttribute speedup @@ -48,12 +125,16 @@ Changes in 1.7 - Support AES-encrypted zip files. Should work with 128, 196, and 256 bit AES. This addition also adds a new PRNG, SHA, and other algorithms to the engine, though no interface is yet added for them. The implementation of the encryption algorithms is provided by Dr Brian Gladman. + - flattenFilename and getAbsolutePath fixed and properly added at several places. + - Added geometry shaders for OpenGL. A first version of the code was submitted by Matthew Kielan (devsh). - Bugfix: irrArray should no longer crash when using other allocators. - Add MaterialViewer example. + - Texture activation now back in setMaterial, which simplifies writing external material renderers (OpenGL only). + - Checkbox uses now disabled text color when disabled. - Changed colors for window-title caption to keep them readable when not active. @@ -92,6 +173,18 @@ Changes in 1.7 New function findItemWithCommandId New function insertItem + - new vector3d::getSphericalCoordinateAngles method. + + - new triangle3d::isTotalOutsideBox method. + + - Newly introduced VertexManipulator interface. This allows for very easy creation of vertex manipulation algorithms. Several manipulators, e.g. vertex color changer and transformation algorithms are already available. + + - createMeshWith1TCoords avoids vertex duplication + + - getRotation now handles matrices with scaling as well + + - Ogre format animations now supported. + - irrArray: Fixed issues with push_front and reallocation Changed behavior for set_pointer and clear, when free_when_destroyed is false @@ -150,8 +243,8 @@ Changes in 1.7 - draw3DTriangle now renders filled polygons, old behavior can be achieved by setting EMT_WIREFRAME ----------------- -Changes in 1.6.1 +----------------------------- +Changes in 1.6.1 (13.01.2010) - Fix pingpong for CSceneNodeAnimatorFlyStraight (found by gbox) diff --git a/doc/upgrade-guide.txt b/doc/upgrade-guide.txt index a7bb726a..ee638b9a 100644 --- a/doc/upgrade-guide.txt +++ b/doc/upgrade-guide.txt @@ -2499,3 +2499,393 @@ IGUISkin.h new enum value EGST_COUNT + +Changes for Version 1.7 +------------------------- +This version has less API-breaking changes than the previous major changes. It has many new features, which simply add methods. All those changes, which affect old methods or structures are mostly put in parallel to the old (and now deprecated) methods. Only a few things are changed without backward compatibility: The texture wrap mode is split into separate U and V modes. The beginScene void* parameter has been replaced by an SExposedVideoData. Simply wrap the pointer with this struct and it should work again. +EMIE_LMOUSE_DOUBLE_CLICK replaces EMIE_MOUSE_DOUBLE_CLICK and EMIE_LMOUSE_TRIPLE_CLICK replaces EMIE_MOUSE_TRIPLE_CLICK +Elements used in the array container need now to have an operator= +Here comes the full list: + +path.h +New type +struct SNamedPath + +triangle3d.h +New method +bool isTotalOutsideBox(const aabbox3d& box) const + +ESceneNodeTypes.h +Changed enum value (from octt) +ESNT_OCTREE = MAKE_IRR_ID('o','c','t','r'), + +SColor.h +New method +f32 getLightness() const + +driverChoice.h +New method +static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true) + +ITexture.h +New parameter +virtual void regenerateMipMapLevels(void* mipmapData=0) = 0; +Changed return value (from io:path) +const io::SNamedPath& getName() const { return NamedPath; } + +SceneParameters.h +New scene parameters +const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath"; +const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath"; + +IMeshManipulator.h +Not virtual anymore +void setVertexColorAlpha(IMesh* mesh, s32 alpha) const +void setVertexColors(IMesh* mesh, video::SColor color) const +void scale(IMeshBuffer* buffer, const core::vector3df& factor) const +void scaleMesh(IMesh* mesh, const core::vector3df& factor) const +void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const +void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const +void transform(IMesh* mesh, const core::matrix4& m) const +void transform(IMeshBuffer* buffer, const core::matrix4& m) const +New method +template +bool apply(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate=false) const +template +bool apply(const Functor& func, IMesh* mesh, bool boundingBoxUpdate=false) const +virtual void recalculateTangents(IMesh* mesh, bool recalculateNormals=false, + bool smooth=false, bool angleWeighted=false) const=0; +void scale(IMesh* mesh, const core::vector3df& factor) const +New parameter +virtual IMesh* createMeshWithTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false, bool recalculateTangents=true) const = 0; + +coreutil.h +Changed return type and parameters (from stringc/w) +inline io::path& cutFilenameExtension ( io::path &dest, const io::path &source ) +inline io::path& getFileNameExtension ( io::path &dest, const io::path &source ) +inline io::path& deletePathFromFilename(io::path& filename) +Fixed behavior +inline io::path& deletePathFromPath(io::path& filename, s32 pathCount) + +ICursorControl.h +Return const-ref +virtual const core::position2d& getPosition() = 0; + +irrArray.h +Fixed allocator template usage +array(const array& other) : data(0) +const array& operator=(const array& other) +bool operator == (const array& other) const +bool operator != (const array& other) const +Changed behavior for free_when_destroyed +void set_pointer(T* newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true) +void set_free_when_destroyed(bool f) + +irrMap.h +Renamed method (from isEmpty) +bool empty() const +New method +void swap(map& other) + +IAnimatedMesh.h +virtual f32 getAnimationSpeed() const =0; + +IAttributes.h +Made parameters const-ref +virtual void addArray(const c8* attributeName, const core::array& value) = 0; +virtual void setAttribute(const c8* attributeName, const core::array& value) = 0; +virtual void setAttribute(s32 index, const core::array& value) = 0; + +ISceneManager.h +Renamed method (from OctTree) +virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; +virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0, + s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; +virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh, + ISceneNode* node, s32 minimalPolysPerNode=32) = 0; +New parameter (makeActive) +virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0, + const core::vector3df& position = core::vector3df(0,0,0), + const core::vector3df& lookat = core::vector3df(0,0,100), + s32 id=-1, bool makeActive=true) = 0; +virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent = 0, + f32 rotateSpeed = -1500.0f, f32 zoomSpeed = 200.0f, + f32 translationSpeed = 1500.0f, s32 id=-1, + bool makeActive=true) = 0; +virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, + f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1, + SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, + f32 jumpSpeed = 0.f, bool invertMouse=false, + bool makeActive=true) = 0; +Make parameter const +virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader, + ISceneNode* parent=0, s32 id=-1) = 0; +New parameter (loop, pingpong) +virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + const core::array< core::vector3df >& points, + f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0; + +SMaterialLayer.h +New clamp modes +ETC_MIRROR_CLAMP, ETC_MIRROR_CLAMP_TO_EDGE, ETC_MIRROR_CLAMP_TO_BORDER +New material layer modes (replaces TextureWrap) +TextureWrapU(ETC_REPEAT), TextureWrapV(ETC_REPEAT) + +vector3d.h +Use tolerance to compare, changed order function to total order +bool operator<=(const vector3d&other) const +bool operator>=(const vector3d&other) const +bool operator<(const vector3d&other) const +bool operator>(const vector3d&other) const +New method +vector3d getSphericalCoordinateAngles() +New method specializations +template <> +inline vector3d vector3d::operator /(s32 val) const {return core::vector3d(X/val,Y/val,Z/val);} +template <> +inline vector3d& vector3d::operator /=(s32 val) {X/=val;Y/=val;Z/=val; return *this;} + +SExposedVideoData.h +New constructors +SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;} +explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;} + +IGUIEnvironment.h +New method +virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0; +New parameter (image) +virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0, + bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0; + +IGeometryCreator.h +New method +IMesh* createPlaneMesh(const core::dimension2d& tileSize, + const core::dimension2d& tileCount, + video::SMaterial* material, + const core::dimension2d& textureRepeatCount) const + +IFileArchive.h +New archive type +EFAT_NPK = MAKE_IRR_ID('N','P','K', 0), +New member for storing the password of AES-encrypted archives +core::stringc Password; + +IFileSystem.h +New parameter (password) +virtual bool addFileArchive(const path& filename, bool ignoreCase=true, + bool ignorePaths=true, + E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, + const core::stringc& password="") =0; + +IrrlichtDevice.h +New method +virtual void clearSystemMessages() = 0; + +irrMath.h +Changed constant (from 1) +const s32 ROUNDING_ERROR_S32 = 0; +New method +template +inline void swap(T& a, T& b) + +IGPUProgrammingServices.h +New parameters (for geometry shaders) +virtual s32 addHighLevelShaderMaterial +virtual s32 addHighLevelShaderMaterialFromFiles +virtual s32 addHighLevelShaderMaterialFromFiles +New overload (for calling with geometry shaders) +s32 addHighLevelShaderMaterial +s32 addHighLevelShaderMaterialFromFiles +s32 addHighLevelShaderMaterialFromFiles + +ISceneNode.h +New types + typedef core::list ISceneNodeList; + typedef core::list ISceneNodeAnimatorList; + +IEventReceiver.h +Renamed events (split from EMIE_MOUSE_*) +EMIE_LMOUSE_DOUBLE_CLICK, +EMIE_RMOUSE_DOUBLE_CLICK, +EMIE_MMOUSE_DOUBLE_CLICK, +EMIE_LMOUSE_TRIPLE_CLICK, +EMIE_RMOUSE_TRIPLE_CLICK, +EMIE_MMOUSE_TRIPLE_CLICK, + +IGUISpriteBank.h +New method +virtual s32 addTextureAsSprite(video::ITexture* texture) = 0; +virtual void clear() = 0; + +SMaterial.h +Changed binary packing (non-visible from user calls) +inline f32 pack_texureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE ) + +IGUISkin.h +New values +EGDS_MESSAGE_BOX_GAP_SPACE, +EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH, +EGDS_MESSAGE_BOX_MAX_TEST_WIDTH, +EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT, +EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT, +New parameter (checkClientArea) +virtual core::rect draw3DWindowBackground(IGUIElement* element, + bool drawTitleBar, video::SColor titleBarColor, + const core::rect& rect, + const core::rect* clip=0, + core::rect* checkClientArea=0) = 0; + +quaternion.h +New operator +bool operator!=(const quaternion& other) const; +New method +inline quaternion& set(const core::quaternion& quat); +inline bool equals(const quaternion& other, + const f32 tolerance = ROUNDING_ERROR_f32 ) const; + +irrList.h +New method +u32 size() const +void swap(list& other) + +IVideoDriver.h +New render targets +ERT_MULTI_RENDER_TEXTURES +New class +struct IRenderTarget +Changed parameter (from void*) +virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, + SColor color=SColor(255,0,0,0), + const SExposedVideoData& videoData=SExposedVideoData(), + core::rect* sourceRect=0) =0; +New parameter (mipmapData) +virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0; +New method +virtual bool setRenderTarget(const core::array& texture, + bool clearBackBuffer=true, bool clearZBuffer=true, + SColor color=video::SColor(0,0,0,0)) =0; +void drawIndexedTriangleFan(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +virtual void getFog(SColor& color, E_FOG_TYPE& fogType, + f32& start, f32& end, f32& density, + bool& pixelFog, bool& rangeFog) = 0; +virtual SMaterial& getMaterial2D() =0; +virtual void enableMaterial2D(bool enable=true) =0; +virtual core::dimension2du getMaxTextureSize() const =0; +Made non-virtual +void drawIndexedTriangleList(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleList(const S3DVertexTangents* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleFan(const S3DVertex* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) +void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices, + u32 vertexCount, const u16* indexList, u32 triangleCount) + +EDriverFeatures.h +New driver feature enums +EVDF_MULTIPLE_RENDER_TARGETS, +EVDF_MRT_BLEND, +EVDF_MRT_COLOR_MASK, +EVDF_MRT_BLEND_FUNC, +EVDF_GEOMETRY_SHADER, + +IGUIWindow.h +New method +virtual core::rect getClientRect() const = 0; + +IGUIContextMenu.h +New enum +enum ECONTEXT_MENU_CLOSE +New method +virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0; +virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0; +virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; +virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0; +virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0; +virtual bool getItemAutoChecking(u32 idx) const = 0; +virtual void setEventParent(IGUIElement *parent) = 0; +New parameter +virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, + bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; + +SIrrCreationParameters.h +New parameter (LoggingLevel) +createDevice + +matrix4.h +New method +bool equals(const core::CMatrix4& other, const T tolerance=(T)ROUNDING_ERROR_f64) const; + +SSkinMeshBuffer.h +Renamed method (from MoveTo_2TCoords) +virtual void convertTo2TCoords() +Renamed method (from MoveTo_Tangents) +virtual void convertToTangents() + +SVertexManipulator.h +New classes (for vertex manipulation) +class SVertexColorSetManipulator : public IVertexManipulator +class SVertexColorSetAlphaManipulator : public IVertexManipulator +class SVertexColorInvertManipulator : public IVertexManipulator +class SVertexColorThresholdManipulator : public IVertexManipulator +class SVertexColorBrightnessManipulator : public IVertexManipulator +class SVertexColorContrastManipulator : public IVertexManipulator +class SVertexColorContrastBrightnessManipulator : public IVertexManipulator +class SVertexColorGammaManipulator : public IVertexManipulator +; +class SVertexColorScaleManipulator : public IVertexManipulator +class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator +class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator +class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator +class SVertexColorInterpolateLinearManipulator : public IVertexManipulator +class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator +class SVertexPositionScaleManipulator : public IVertexManipulator +; +class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator +class SVertexPositionTransformManipulator : public IVertexManipulator +class SVertexTCoordsScaleManipulator : public IVertexManipulator + +IMeshCache.h +Renamed method (from getMeshByFilename) +virtual IAnimatedMesh* getMeshByName(const io::path& name) = 0; +Renamed method and changed return type (from getMeshFilename/io::path) +virtual const io::SNamedPath& getMeshName(u32 index) const = 0; +virtual const io::SNamedPath& getMeshName(const IAnimatedMesh* const mesh) const = 0; +virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0; +Renamed method (from setMeshFilename) +virtual bool renameMesh(u32 index, const io::path& name) = 0; +virtual bool renameMesh(const IAnimatedMesh* const mesh, const io::path& name) = 0; +virtual bool renameMesh(const IMesh* const mesh, const io::path& name) = 0; + +IGUIElement.h +Changed parameter (to const-ref) + IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment* environment, IGUIElement* parent, +s32 id, const core::rect& rectangle) +New method +virtual bool hasType(EGUI_ELEMENT_TYPE type) const + +irrString.h +Changed parameter (to template with allocator) in all methods with templates +Made destructor non-virtual +~string() +Added parameter +s32 find(const B* const str, const u32 start = 0) const +New method +void remove(T c) +void remove(const string toRemove) +void removeChars(const string & characters) +template +u32 split(container& ret, const T* const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const + +vector2d.h +Use tolerance to compare, changed order function to total order +bool operator<=(const vector2d&other) const +bool operator>=(const vector2d&other) const +bool operator<(const vector2d&other) const +bool operator>(const vector2d&other) const + diff --git a/examples/02.Quake3Map/main.cpp b/examples/02.Quake3Map/main.cpp index 364e4bdb..d574bed2 100644 --- a/examples/02.Quake3Map/main.cpp +++ b/examples/02.Quake3Map/main.cpp @@ -47,6 +47,9 @@ int main() which video driver to use. The Software device might be too slow to draw a huge Quake 3 map, but just for the fun of it, we make this decision possible, too. + Instead of copying this whole code into your app, you can simply include + driverChoice.h from Irrlicht's include directory. The function + driverChoiceConsole does exactly the same. */ // ask user for driver @@ -54,8 +57,8 @@ int main() video::E_DRIVER_TYPE driverType; printf("Please select the driver you want for this example:\n"\ - " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\ - " (d) OpenGL-ES1\n (e) Software Renderer\n (f) Burning's Software Renderer\n"\ + " (a) OpenGL 1.5\n (b) Direct3D 9.0c\n (c) Direct3D 8.1\n"\ + " (d) OpenGL-ES1\n (e) Burning's Software Renderer\n (f) Software Renderer\n"\ " (g) NullDevice\n (otherKey) exit\n\n"); char i; @@ -63,12 +66,12 @@ int main() switch(i) { - case 'a': driverType = video::EDT_DIRECT3D9;break; - case 'b': driverType = video::EDT_DIRECT3D8;break; - case 'c': driverType = video::EDT_OPENGL; break; + case 'a': driverType = video::EDT_OPENGL; break; + case 'b': driverType = video::EDT_DIRECT3D9;break; + case 'c': driverType = video::EDT_DIRECT3D8;break; case 'd': driverType = video::EDT_OGLES1; break; - case 'e': driverType = video::EDT_SOFTWARE; break; - case 'f': driverType = video::EDT_BURNINGSVIDEO;break; + case 'e': driverType = video::EDT_BURNINGSVIDEO;break; + case 'f': driverType = video::EDT_SOFTWARE; break; case 'g': driverType = video::EDT_NULL; break; default: return 1; } diff --git a/examples/03.CustomSceneNode/main.cpp b/examples/03.CustomSceneNode/main.cpp index 2fd83d7b..c49c30df 100644 --- a/examples/03.CustomSceneNode/main.cpp +++ b/examples/03.CustomSceneNode/main.cpp @@ -20,7 +20,7 @@ To start, I include the header files, use the irr namespace, and tell the linker to link with the .lib file. */ #include -#include +#include "driverChoice.h" using namespace irr; @@ -167,28 +167,10 @@ the engine, create the scene node and a camera, and look at the result. */ int main() { - // let user select driver type - - video::E_DRIVER_TYPE driverType; - - printf("Please select the driver you want for this example:\n"\ - " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\ - " (d) Software Renderer\n (e) Burning's Software Renderer\n"\ - " (f) NullDevice\n (otherKey) exit\n\n"); - - char i; - std::cin >> i; - - switch(i) - { - case 'a': driverType = video::EDT_DIRECT3D9;break; - case 'b': driverType = video::EDT_DIRECT3D8;break; - case 'c': driverType = video::EDT_OPENGL; break; - case 'd': driverType = video::EDT_OGLES1; break; - case 'e': driverType = video::EDT_BURNINGSVIDEO;break; - case 'f': driverType = video::EDT_NULL; break; - default: return 0; - } + // ask user for driver + video::E_DRIVER_TYPE driverType=driverChoiceConsole(); + if (driverType==video::EDT_COUNT) + return 1; // create device diff --git a/examples/04.Movement/Movement.cbp b/examples/04.Movement/Movement.cbp index fa322a0e..4d3a5179 100644 --- a/examples/04.Movement/Movement.cbp +++ b/examples/04.Movement/Movement.cbp @@ -7,7 +7,7 @@