diff --git a/changes.txt b/changes.txt index e3fbe355..09823396 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,132 @@ -Changes in 1.8 (??.0?.2010) +Changes in 1.8 (??.??.2011) + + - Renamed IGUIElement::bringToBack to sendToBack, like in Windows + + - Send EGET_ELEMENT_CLOSED event when context menues should be closed (thx @ Mloren for reporting). + + - zip archive fixes: Fix directory tags in file list. Fix loading of stream zip files which have file sizes only in the central directory. + + - Added treeview to GUI editor, provided by Armen + + - Added root type for GUI environment + + - Fixed panel scrollbars in GUI editor, reported by Armen + + - Fix b3d loading of files with mixed mesh/bone sections. + + - Fix particle emitters which used integer random numbers so far. The distributions of the particles should be much better (and the code also somewhat faster) now. + + - Add new random method frand: Returns a random number in the interval [0..1] and gives better distributions than using fmodf on the integer number. + + - Add node parameter to saveScene and loadScene. saveScene saves the given node and all descendants to the file (if 0, the full scene is saved as before). loadScene loads all elements of the scene as childs of the given node. As before, 0 would load the file on the top level (scenemanager). + + - Add method to make a filename relative to a given directory. + + - Fix setMesh to correctly update the joints cache. + + - Fix setting transition time of skinned meshes back to 0. + + - Add some getters to IGUIImage: getImage, getColor + + - Fix OpenGL FBODepthTexture to create less overhead + + - Fix MRT disablingunder OpenGL + + - API change: Added write only lock mode for textures. The lock method has changed the signature and uses an enum parameter now instead of a bool. The default is still to lock for read/write (previously 'false'). The old 'true' value should be replaced by ETLM_READ_ONLY. + + - Speedup deleting of particles + + - Add function IParticleSystemSceneNode::clearParticles + + - Fix RTT render states under OpenGL + + - Fix AntiAliasing setup under Windows/OpenGL in case no AA is available + + - Fix transformation matrices when RTT used + + - API change: getScreenCoordinatesFrom3DPosition has a new parameter, which needs to be set to true to get the original behavior. Now, the method returns coordinates which would fit as render coordinates of a currently enabled viewport. With the parameter set to true the result would fit only after the viewport is reset to full window rendering. + + - Add flag and method to disable clipping of the text to the gui element rectangle in GUI static text. + + - addShadowVolumeSceneNode now replaces an existing shadow. One should avoid to call this method multiple times without changing any parameter, as it is quite time consuming and cannot recognize the duplicate calls. + + - Add function IGUIEnvironment::removeFont (TODO: Does not remove the texture from cache so far) + + - Update to bzip2 1.0.6, libpng 1.4.4 and lzma from 9.20 SDK + + - Functions in IMeshCache expecting IAnimatedMesh* parameters removed as similar functions with IMesh* can be used since a while. Fixes also problems when IAnimatedMesh* got upcasted to IMesh*. (thx @ Greenya for reporting) + + - Fix blend states for MRTs + + - The following functions will now use a "ISceneNode *" instead of a "const ISceneNode *": + ITriangleSelector::getSceneNodeForTriangle, ISceneNodeAnimatorCollisionResponse::getCollisionNode, ISceneCollisionManager::getCollisionPoint and ISceneCollisionManager::getCollisionResultPosition. + As collision functions often are followed by changing node positions users where so far forced to using const_casts (found by Greenya). + + - Add vector3d::getAs3Values (patch provided by slavik262) + + - Add function to SViewFrustum to get corners of the near plane (patch provided by Matt Kline, aka slavik262) + + - ParticleFadeOutAffector::setFadeOutTime can no longer be set to invalid values + + - ParticleFadeOutAffector uses now throughout u32 for fadeOutTime (found by greenya) + + - Add missing access function CParticleSystemSceneNode::getAffectors() (seen by B@z) + + - Add missing setters/getters for particle emitters (seen by B@z) + + - Compile-defines can now be disabled from Makefiles/Projectfiles instead of having to change IrrCompileConfig.h each time. + + - IGUITabControl::setActiveTab should only take IGUITab* and not IGUIElement* (thx to greenya for finding) + + - Add new skin-colors: EGDC_GRAY_WINDOW_SYMBOL, EGDC_EDITABLE, EGDC_GRAY_EDITABLE, EGDC_FOCUSED_EDITABLE + + - Disabled state is now extended to sub-elements + + - Make disabled state for several elements more visible + + - Bugfix: Icons in tabcontrol get now affected immediately by skin-changes + + - Add xml example written by Yoran Bosman. + + - Fix cursor cleanup under Linux when using multiple devices + + - Fix collada parser + + - Fix MRT reset under D3D + + - Add a generic attribute interface for querying video driver attributes which are not necessarily of type bool. This interface allows to check certain supported features, such as the number of user clip planes, supported lights and textures, MRTs, and other things. The interface might change in the future, but it's fully functional already. The supported attributes are listed in the API docs of the function: +The following names can be queried for the given types: + * MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. + * MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. + * MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. + * MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. + * MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. + * MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL + * MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. + * MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). + * MaxTextureSize (int) Dimension that a texture may have, both in width and height. + * MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. + * MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. + * Version (int) Version of the driver. Should be Major*100+Minor + * ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. + + - Fix getRotationDegrees + + - Add creation parameter which allows to disable highres timers on Windows upon device creation. + + - Several transparency setup bugs fixed. Now, alpha_vertex_blend uses proper alpha blending instead of a mixed add/alpha blending. + + - Added a method to get real time and date in a human readable struct + + - Fix add folder archives method to support files without trailing slashes. + + - fix transparent_reflection_2_layers + + - Add support for MSVC 2010 + + - Fix "unsupported format" warning on RTT usage + + - Add UseMipMap flag in material - Add IGUIElement::bringToBack (patch written by DtD, although I'm to blame for the function-name) @@ -76,28 +204,111 @@ Changes in 1.8 (??.0?.2010) //! converts a 8 bit palettized or non palettized image (A8) into A8R8G8B8 static void convert8BitTo32Bit(const u8* in, u8* out, s32 width, s32 height, const u8* palette, s32 linepad = 0, bool flip=false); -- In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing) + - In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing) -- add dimension2d::operator- + - Add occlusion query support. Based on code by Nadro -- add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled + - Add support for vertex_array_bgra extension in OpenGL driver. This will speed up OpenGL rendering quite a lot as it skips the silly color conversion thing we have to do otherwise. -- Add logging level ELL_DEBUG + - Replace raw xml char implementation with template struct in order to decouple the type from POD types. May also help for 64bit problems or changes needed there. -- Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system. + - add dimension2d::operator- -- Add parameter to line2d::intersectWith to allow getting intersections outside the segments (thx Yoran). + - add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled -- Added support for custom cursors + - Add logging level ELL_DEBUG -- Avoid argument lookup ambiguity in swap when used in combination with stl. Using same trick as boost now and use 2 different template parameters in it. + - Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system. -- Fixed bug causing memory access violation in string::replace found and patched by Nalin. + - Add parameter to line2d::intersectWith to allow getting intersections outside the segments (thx Yoran). -- WM_SYSCOMMAND - SC_KEYMENU message is now ignored (F10 and ALT in Win32 windowed mode) + - External windows are not destroyed anymore + + - clamp values in getRotationDegrees to avoid nan values + + - texture size in terrain mesh fixed + + - ms3d fixes + + - Add new matrix methods for infinite projection matrix + + - Support new OpenGL 2.x shader creation + + - Added support for custom cursors + + - Avoid argument lookup ambiguity in swap when used in combination with stl. Using same trick as boost now and use 2 different template parameters in it. + + - Fixed bug causing memory access violation in string::replace found and patched by Nalin. + + - WM_SYSCOMMAND - SC_KEYMENU message is now ignored (F10 and ALT in Win32 windowed mode) ----------------------------- -Changes in 1.7.2 (??.??.2010) +Changes in 1.7.3 (??.??.2011) + + - Skip bone weights and additional information in ms3d file if no joint was defined before. + + - Fix mem leak in CImage, found by mloren. + + - Fix tga writing, reported by xirtamatrix + + - Tab-positions care now about the borders correctly + + - TabControl now respositions it's tabs when setTabVerticalAlignment is changed (thx @ ceyron for reporting+testcase) + + - CGUIModalScreen now no longer takes focus itself, but tries to give it first child when possible to fix modal windows losing focus all the time + + - Modal screens no longer blinks when gui-elements call removeFocus on themself (thx @ yaten for reporting+testcase) + + - Fix crash in multiline-editbox when selecting with mouse (thx @ ceyron for reporting and testcase) + + - Fix render context creation for OpenGL under Windows. + + - Fix the reset problem of d3d9 driver in combination with hardware buffers. + + - Fix .x loader in case of unused vertices. + + - Avoid empty line in texts with very large words. Text wrapping would introduce an empty line in earlier versions. + + - Add a new attribute which assigns hw mapping hint to the whole Mesh. + + - Allow creation of water scene node without mesh. + + - Fix regeneration of skydome. + + - Fix scene node type and factory support for volume light + + - Q3 maps no longer crash when faces try accessing lightmaps which are not mentioned to be loaded in the file. + + - Fix crash on null-readfile in texture loading + + - Get particles saved before 1.7.2 (for example in irrEdit) working again (thx to smashly for problem reporting) + + - Fix IGUIScrollBar setMax and setMin which had been restricted wrongly (reported by REDDemon) + + - Fix CNullDriver::createImage - Creating the image from a texture-rectangle which doesn't start at 0,0 works now again (thx @ ceyron for bugreport+testcase) + + - Menu no longer sets highlight state when clicking disabled menu-item (reported by Mloren) + + - Treeview can now be disabled + +----------------------------- +Changes in 1.7.2 (15.11.2010) + + - Fix in d3d9 driver, which caused a crash when device creation failed. Bug found and fixed by Kostya + + - Fix a wrong access to Value instead of ValueW. Found and fixed by vroad. + + - Fix line loop rendering in d3d drivers. Fix submitted by tonic. + + - Fix tar recognition in tar reader. + + - Fix blend mode setup in OpenGL driver, when using the material2d override, as pointed out by Auria + + - Avoid crash due to tcoords2 handling. Might need some more fixing to work correctly. + + - Fix 2d line intersections. Has had problems with consecutive, but non-overlapping line segments and with overlapping line segments. + + - Fix image creation from texture, found by dataslayer - Fix crashes when taking Screenhots for DirectX in Windowed mode (thx to agamemnus for reporting) @@ -108,10 +319,10 @@ Changes in 1.7.2 (??.??.2010) - Fix CXMLReaderImpl::getAttributeValueAsInt which returned wrong values with large integers (thx to squisher for finding) - - Add EGET_TREEVIEW_NODE_COLLAPSE and deprecate EGET_TREEVIEW_NODE_COLLAPS (found by greenya) - - Fix compile problem in swap when using irrlicht in combination with stl (backport from trunk r3281) + - Add EGET_TREEVIEW_NODE_COLLAPSE and deprecate EGET_TREEVIEW_NODE_COLLAPS (found by greenya) + - Fix serialization in CParticleSystemSceneNode (found by B@z) - Prevent crash in BillboardTextSceneNode when a custom font is used. Found and fixed by Nalin (bugtracker id: 3020487) @@ -138,6 +349,8 @@ Changes in 1.7.2 (??.??.2010) - Add EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH and deprecated EGDS_MESSAGE_BOX_MAX_TEST_WIDTH (thx to greenya for reporting). + - Fix colors in irr files. + - Fix several places where "used" in core::string was used wrongly preventing some memory corruption - Remove additional slash in pathnames in X-Loader @@ -148,6 +361,20 @@ Changes in 1.7.2 (??.??.2010) - Fix arrowMesh boundingbox. + - Fix rounding problem in getInterpolated in the color classes + + - Scrollbar in GUIListbox now uses default id -1 instead of 0 + + - Fix octree clipping issues. + + - Fix obj loader. + + - clone function fixes. + + - Fix tooltips. + + - Fix Ogre parser. + ----------------------------- Changes in 1.7.1 (17.02.2010) @@ -741,7 +968,6 @@ Changes in 1.6 (23.09.2009) virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0; virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0; and calculating methods to DeviceStub. - implemented in Win32, SDL, Linux TODO: other Devices - irrlicht.h changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix diff --git a/examples/01.HelloWorld/HelloWorld.sln b/examples/01.HelloWorld/HelloWorld.sln deleted file mode 100644 index c720d78a..00000000 --- a/examples/01.HelloWorld/HelloWorld.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld.vcproj", "{A4D8C3B0-B3D2-4EC9-A2CC-FBC09C09DE12}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A4D8C3B0-B3D2-4EC9-A2CC-FBC09C09DE12}.Debug.ActiveCfg = Debug|Win32 - {A4D8C3B0-B3D2-4EC9-A2CC-FBC09C09DE12}.Debug.Build.0 = Debug|Win32 - {A4D8C3B0-B3D2-4EC9-A2CC-FBC09C09DE12}.Release.ActiveCfg = Release|Win32 - {A4D8C3B0-B3D2-4EC9-A2CC-FBC09C09DE12}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/01.HelloWorld/HelloWorld_vc10.vcxproj b/examples/01.HelloWorld/HelloWorld_vc10.vcxproj new file mode 100644 index 00000000..363cf5ed --- /dev/null +++ b/examples/01.HelloWorld/HelloWorld_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 01.HelloWorld + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9} + HelloWorld + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/HelloWorld.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/HelloWorld.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\01.HelloWorld.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/02.Quake3Map/Quake3Map.sln b/examples/02.Quake3Map/Quake3Map.sln deleted file mode 100644 index 99388e93..00000000 --- a/examples/02.Quake3Map/Quake3Map.sln +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Quake3Map", "Quake3Map.vcproj", "{AF8861FB-BB79-4562-9F17-34C72F94DCD1}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Relase - Fast FPU = Relase - Fast FPU - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Debug.ActiveCfg = Debug|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Debug.Build.0 = Debug|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Relase - Fast FPU.ActiveCfg = Release|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Relase - Fast FPU.Build.0 = Release|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Release.ActiveCfg = Release|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/02.Quake3Map/Quake3Map_vc10.vcxproj b/examples/02.Quake3Map/Quake3Map_vc10.vcxproj new file mode 100644 index 00000000..77b4ec5e --- /dev/null +++ b/examples/02.Quake3Map/Quake3Map_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 02.Quake3Map + {D1A464A2-D479-458C-98A2-60965D823CD1} + Quake3Map + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/Quake3Map.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Quake3Map.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\02.Quake3Map.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/03.CustomSceneNode/CustomSceneNode.sln b/examples/03.CustomSceneNode/CustomSceneNode.sln deleted file mode 100644 index a237eb92..00000000 --- a/examples/03.CustomSceneNode/CustomSceneNode.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CustomSceneNode", "CustomSceneNode.vcproj", "{832A634E-7236-47DC-80C1-EDEF1012CC71}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {832A634E-7236-47DC-80C1-EDEF1012CC71}.Debug.ActiveCfg = Debug|Win32 - {832A634E-7236-47DC-80C1-EDEF1012CC71}.Debug.Build.0 = Debug|Win32 - {832A634E-7236-47DC-80C1-EDEF1012CC71}.Release.ActiveCfg = Release|Win32 - {832A634E-7236-47DC-80C1-EDEF1012CC71}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj b/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj new file mode 100644 index 00000000..aef92aaf --- /dev/null +++ b/examples/03.CustomSceneNode/CustomSceneNode_vc10.vcxproj @@ -0,0 +1,134 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 03.CustomSceneNode + {171CCDFA-C140-4956-8EB7-F0168F4521D3} + CustomSceneNode + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/CustomSceneNode.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/CustomSceneNode.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + .\Release/CustomSceneNode.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\03.CustomSceneNode.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/CustomSceneNode.pdb + Console + false + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/examples/04.Movement/Movement.sln b/examples/04.Movement/Movement.sln deleted file mode 100644 index 4092dcd0..00000000 --- a/examples/04.Movement/Movement.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Movement", "Movement.vcproj", "{1A16BBE1-A49B-4406-8883-681E6EA8702C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.ActiveCfg = Debug|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Debug.Build.0 = Debug|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.ActiveCfg = Release|Win32 - {1A16BBE1-A49B-4406-8883-681E6EA8702C}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/04.Movement/Movement_vc10.vcxproj b/examples/04.Movement/Movement_vc10.vcxproj new file mode 100644 index 00000000..e20af4c1 --- /dev/null +++ b/examples/04.Movement/Movement_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 04.Movement + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF} + Movement + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/Movement.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Movement.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\04.Movement.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/05.UserInterface/UserInterface.sln b/examples/05.UserInterface/UserInterface.sln deleted file mode 100644 index fff6d086..00000000 --- a/examples/05.UserInterface/UserInterface.sln +++ /dev/null @@ -1,24 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserInterface", "UserInterface.vcproj", "{7FD46B60-53A7-4634-A07C-95AA83BBE9F6}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Relase - Fast FPU = Relase - Fast FPU - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Debug.ActiveCfg = Debug|Win32 - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Debug.Build.0 = Debug|Win32 - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Relase - Fast FPU.ActiveCfg = Release|Win32 - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Relase - Fast FPU.Build.0 = Release|Win32 - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Release.ActiveCfg = Release|Win32 - {7FD46B60-53A7-4634-A07C-95AA83BBE9F6}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/05.UserInterface/UserInterface_vc10.vcxproj b/examples/05.UserInterface/UserInterface_vc10.vcxproj new file mode 100644 index 00000000..5c54b298 --- /dev/null +++ b/examples/05.UserInterface/UserInterface_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 05.UserInterface + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53} + UserInterface + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/UserInterface.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/UserInterface.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\05.UserInterface.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/06.2DGraphics/2DGraphics.sln b/examples/06.2DGraphics/2DGraphics.sln deleted file mode 100644 index c2dcf807..00000000 --- a/examples/06.2DGraphics/2DGraphics.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "2DGraphics", "2DGraphics.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug.ActiveCfg = Debug|Win32 - {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug.Build.0 = Debug|Win32 - {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release.ActiveCfg = Release|Win32 - {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/06.2DGraphics/2DGraphics_vc10.vcxproj b/examples/06.2DGraphics/2DGraphics_vc10.vcxproj new file mode 100644 index 00000000..0cc42aa4 --- /dev/null +++ b/examples/06.2DGraphics/2DGraphics_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 06.2DGraphics + {E71B6F18-10DC-4101-A541-F6D33F71B2BD} + 2DGraphics + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Release/2DGraphics.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/2DGraphics.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\06.2DGraphics.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/07.Collision/Collision.sln b/examples/07.Collision/Collision.sln deleted file mode 100644 index 1ab83fa3..00000000 --- a/examples/07.Collision/Collision.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Collision", "Collision.vcproj", "{3C621A22-3107-4236-A96A-6E100B8055A3}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {3C621A22-3107-4236-A96A-6E100B8055A3}.Debug.ActiveCfg = Debug|Win32 - {3C621A22-3107-4236-A96A-6E100B8055A3}.Debug.Build.0 = Debug|Win32 - {3C621A22-3107-4236-A96A-6E100B8055A3}.Release.ActiveCfg = Release|Win32 - {3C621A22-3107-4236-A96A-6E100B8055A3}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/07.Collision/Collision_vc10.vcxproj b/examples/07.Collision/Collision_vc10.vcxproj new file mode 100644 index 00000000..fe7bc51b --- /dev/null +++ b/examples/07.Collision/Collision_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 07.Collision + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E} + Collision + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/Collision.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Collision.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\07.Collision.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/08.SpecialFX/SpecialFX.sln b/examples/08.SpecialFX/SpecialFX.sln deleted file mode 100644 index fd457566..00000000 --- a/examples/08.SpecialFX/SpecialFX.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpecialFx", "SpecialFX.vcproj", "{92C265D1-5821-4A09-AD6B-7E1D9E3D4D6C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {92C265D1-5821-4A09-AD6B-7E1D9E3D4D6C}.Debug.ActiveCfg = Debug|Win32 - {92C265D1-5821-4A09-AD6B-7E1D9E3D4D6C}.Debug.Build.0 = Debug|Win32 - {92C265D1-5821-4A09-AD6B-7E1D9E3D4D6C}.Release.ActiveCfg = Release|Win32 - {92C265D1-5821-4A09-AD6B-7E1D9E3D4D6C}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/08.SpecialFX/SpecialFX_vc10.vcxproj b/examples/08.SpecialFX/SpecialFX_vc10.vcxproj new file mode 100644 index 00000000..bd040474 --- /dev/null +++ b/examples/08.SpecialFX/SpecialFX_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 08.SpecialFX + {C869BF55-B9D6-4980-BC92-60FA0CF8411A} + SpecialFX + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Release/SpecialFX.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/SpecialFX.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\08.SpecialFx.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/09.Meshviewer/Meshviewer.sln b/examples/09.Meshviewer/Meshviewer.sln deleted file mode 100644 index 43d01ce7..00000000 --- a/examples/09.Meshviewer/Meshviewer.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshViewer", "Meshviewer.vcproj", "{0FD81A06-DFB5-4FB2-A05D-C73E71AF8BD5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {0FD81A06-DFB5-4FB2-A05D-C73E71AF8BD5}.Debug.ActiveCfg = Debug|Win32 - {0FD81A06-DFB5-4FB2-A05D-C73E71AF8BD5}.Debug.Build.0 = Debug|Win32 - {0FD81A06-DFB5-4FB2-A05D-C73E71AF8BD5}.Release.ActiveCfg = Release|Win32 - {0FD81A06-DFB5-4FB2-A05D-C73E71AF8BD5}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/09.Meshviewer/Meshviewer_vc10.vcxproj b/examples/09.Meshviewer/Meshviewer_vc10.vcxproj new file mode 100644 index 00000000..ec4d65b3 --- /dev/null +++ b/examples/09.Meshviewer/Meshviewer_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 09.Meshviewer + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06} + Meshviewer + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Release/Meshviewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/Meshviewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\09.MeshViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/10.Shaders/Shaders.sln b/examples/10.Shaders/Shaders.sln deleted file mode 100644 index 3676e188..00000000 --- a/examples/10.Shaders/Shaders.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shaders", "Shaders.vcproj", "{FDD47B00-D264-4B94-89A8-163700847250}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {FDD47B00-D264-4B94-89A8-163700847250}.Debug.ActiveCfg = Debug|Win32 - {FDD47B00-D264-4B94-89A8-163700847250}.Debug.Build.0 = Debug|Win32 - {FDD47B00-D264-4B94-89A8-163700847250}.Release.ActiveCfg = Release|Win32 - {FDD47B00-D264-4B94-89A8-163700847250}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/10.Shaders/Shaders_vc10.vcxproj b/examples/10.Shaders/Shaders_vc10.vcxproj new file mode 100644 index 00000000..45d83f61 --- /dev/null +++ b/examples/10.Shaders/Shaders_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 10.Shaders + {27158C82-CD15-4A9B-9848-35E7065B209F} + Shaders + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/Shaders.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Shaders.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\10.Shaders.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/11.PerPixelLighting/PerPixelLighting.sln b/examples/11.PerPixelLighting/PerPixelLighting.sln deleted file mode 100644 index ddad2748..00000000 --- a/examples/11.PerPixelLighting/PerPixelLighting.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PerPixelLighting", "PerPixelLighting.vcproj", "{591A69BA-56D5-4CD5-8FAA-2AE3F59A19B7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {591A69BA-56D5-4CD5-8FAA-2AE3F59A19B7}.Debug.ActiveCfg = Debug|Win32 - {591A69BA-56D5-4CD5-8FAA-2AE3F59A19B7}.Debug.Build.0 = Debug|Win32 - {591A69BA-56D5-4CD5-8FAA-2AE3F59A19B7}.Release.ActiveCfg = Release|Win32 - {591A69BA-56D5-4CD5-8FAA-2AE3F59A19B7}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj b/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj new file mode 100644 index 00000000..38800268 --- /dev/null +++ b/examples/11.PerPixelLighting/PerPixelLighting_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 11.PerPixelLighting + {C4B42409-542D-4EFC-9E6B-44713FD47A33} + PerPixelLighting + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/PerPixelLighting.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/PerPixelLighting.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\11.PerPixelLighting.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/11.PerPixelLighting/main.cpp b/examples/11.PerPixelLighting/main.cpp index 90400b62..5b8a0f9c 100644 --- a/examples/11.PerPixelLighting/main.cpp +++ b/examples/11.PerPixelLighting/main.cpp @@ -151,10 +151,6 @@ private: ProblemText->setVisible(true); else ProblemText->setVisible(false); - - - - } private: @@ -214,7 +210,6 @@ int main() // disable mouse cursor device->getCursorControl()->setVisible(false); - /* Because we want the whole scene to look a little bit scarier, we add some fog to it. This is done by a call to IVideoDriver::setFog(). There @@ -234,17 +229,14 @@ int main() IMeshManipulator::makePlanarTextureMapping() method. */ - scene::IAnimatedMesh* roomMesh = smgr->getMesh( - "../../media/room.3ds"); + scene::IAnimatedMesh* roomMesh = smgr->getMesh("../../media/room.3ds"); scene::ISceneNode* room = 0; scene::ISceneNode* earth = 0; if (roomMesh) { - /* - The Room Mesh doesn't have proper Texture Mapping on the floor, - so we can recreate them on runtime - */ + // The Room mesh doesn't have proper Texture Mapping on the + // floor, so we can recreate them on runtime smgr->getMeshManipulator()->makePlanarTextureMapping( roomMesh->getMesh(0), 0.003f); @@ -407,7 +399,7 @@ int main() walls. But of course, this will change in future versions of Irrlicht where higher versions of pixel/vertex shaders will be implemented too. */ -#if 0 + // add light 2 (red) scene::ISceneNode* light2 = smgr->addLightSceneNode(0, core::vector3df(0,0,0), @@ -453,7 +445,6 @@ int main() ps->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp")); ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA); -#endif MyEventReceiver receiver(room, earth, env, driver); device->setEventReceiver(&receiver); diff --git a/examples/12.TerrainRendering/TerrainRendering.sln b/examples/12.TerrainRendering/TerrainRendering.sln deleted file mode 100644 index e6b93ee1..00000000 --- a/examples/12.TerrainRendering/TerrainRendering.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TerrainRendering", "TerrainRendering.vcproj", "{CC3423A9-535A-4E83-9115-88383DCDA750}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {CC3423A9-535A-4E83-9115-88383DCDA750}.Debug.ActiveCfg = Debug|Win32 - {CC3423A9-535A-4E83-9115-88383DCDA750}.Debug.Build.0 = Debug|Win32 - {CC3423A9-535A-4E83-9115-88383DCDA750}.Release.ActiveCfg = Release|Win32 - {CC3423A9-535A-4E83-9115-88383DCDA750}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj b/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj new file mode 100644 index 00000000..7443b4da --- /dev/null +++ b/examples/12.TerrainRendering/TerrainRendering_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 12.TerrainRendering + {3A5B74E5-6390-43B0-A459-2793B81FFD31} + TerrainRendering + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/TerrainRendering.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/TerrainRendering.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\12.TerrainRendering.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/13.RenderToTexture/RenderToTexture.sln b/examples/13.RenderToTexture/RenderToTexture.sln deleted file mode 100644 index b7c6b348..00000000 --- a/examples/13.RenderToTexture/RenderToTexture.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RenderToTexture", "RenderToTexture.vcproj", "{C4F5BB37-D873-4DE2-B7D0-A60A936798E1}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.ActiveCfg = Debug|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Debug.Build.0 = Debug|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.ActiveCfg = Release|Win32 - {C4F5BB37-D873-4DE2-B7D0-A60A936798E1}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj b/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj new file mode 100644 index 00000000..83082f4c --- /dev/null +++ b/examples/13.RenderToTexture/RenderToTexture_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 13.RenderToTexture + {0914E5C8-5352-467B-8421-C9EB35BD5596} + RenderToTexture + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Release/RenderToTexture.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + .\Debug/RenderToTexture.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/14.Win32Window/Win32Window.sln b/examples/14.Win32Window/Win32Window.sln deleted file mode 100644 index 80868103..00000000 --- a/examples/14.Win32Window/Win32Window.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Win32Window", "Win32Window.vcproj", "{3DEBCF2B-999A-4372-B031-7FBF3AC3B2BA}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {3DEBCF2B-999A-4372-B031-7FBF3AC3B2BA}.Debug.ActiveCfg = Debug|Win32 - {3DEBCF2B-999A-4372-B031-7FBF3AC3B2BA}.Debug.Build.0 = Debug|Win32 - {3DEBCF2B-999A-4372-B031-7FBF3AC3B2BA}.Release.ActiveCfg = Release|Win32 - {3DEBCF2B-999A-4372-B031-7FBF3AC3B2BA}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/14.Win32Window/Win32Window.vcproj b/examples/14.Win32Window/Win32Window.vcproj index 42592a6e..c8576c76 100644 --- a/examples/14.Win32Window/Win32Window.vcproj +++ b/examples/14.Win32Window/Win32Window.vcproj @@ -39,6 +39,7 @@ Name="VCCustomBuildTool"/> + + + + Debug + Win32 + + + Release + Win32 + + + + 14.Win32Window + {772FBE05-D05A-467B-9842-BEC409EEA8D0} + Win32Window + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/Win32Window.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/Win32Window.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + opengl32.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\14.Win32Window.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/15.LoadIrrFile/LoadIrrFile.sln b/examples/15.LoadIrrFile/LoadIrrFile.sln deleted file mode 100644 index 5e8570b1..00000000 --- a/examples/15.LoadIrrFile/LoadIrrFile.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LoadIrrFile", "LoadIrrFile.vcproj", "{AF8861FB-BB79-4562-9F17-34C72F94DCD1}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Debug.ActiveCfg = Debug|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Debug.Build.0 = Debug|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Release.ActiveCfg = Release|Win32 - {AF8861FB-BB79-4562-9F17-34C72F94DCD1}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/15.LoadIrrFile/LoadIrrFile.vcproj b/examples/15.LoadIrrFile/LoadIrrFile.vcproj index f0ca0a6d..fef46266 100644 --- a/examples/15.LoadIrrFile/LoadIrrFile.vcproj +++ b/examples/15.LoadIrrFile/LoadIrrFile.vcproj @@ -45,8 +45,7 @@ AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/LoadIrrFile.pdb" - SubSystem="1" - TargetMachine="1"/> + SubSystem="1"/> + + + + Debug + Win32 + + + Release + Win32 + + + + 15.LoadIrrFile + {78C9F424-523C-49AC-94B7-823AA4A26BF9} + LoadIrrFile + + + + Application + false + MultiByte + + + Application + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/LoadIrrFile.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/LoadIrrFile.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\15.LoadIrrFile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/16.Quake3MapShader/Quake3MapShader.sln b/examples/16.Quake3MapShader/Quake3MapShader.sln deleted file mode 100644 index db6824dc..00000000 --- a/examples/16.Quake3MapShader/Quake3MapShader.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "Quake3MapShader.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.ActiveCfg = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug.Build.0 = Debug|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.ActiveCfg = Release|Win32 - {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/16.Quake3MapShader/Quake3MapShader.vcproj b/examples/16.Quake3MapShader/Quake3MapShader.vcproj index 4d46421c..de658b34 100644 --- a/examples/16.Quake3MapShader/Quake3MapShader.vcproj +++ b/examples/16.Quake3MapShader/Quake3MapShader.vcproj @@ -34,6 +34,7 @@ Name="VCLinkerTool" OutputFile="..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe" LinkIncremental="0" + SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/Quake3MapShader.pdb" diff --git a/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj b/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj new file mode 100644 index 00000000..a01d827f --- /dev/null +++ b/examples/16.Quake3MapShader/Quake3MapShader_vc10.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 16.Quake3MapShader + {EB3B38EA-5CE7-4983-845B-880661E69D09} + 16.Quake3MapShader + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + true + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\16.Quake3MapShader.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + diff --git a/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj new file mode 100644 index 00000000..f8852121 --- /dev/null +++ b/examples/17.HelloWorld_Mobile/17. HelloWorld for Windows Mobile on PC_vc10.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 17.HelloWorld_Mobile + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B} + My17HelloWorldforWindowsMobileonPC + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + true + ..\..\bin\Win32-VisualStudio\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + + + ..\..\bin\Win32-VisualStudio\17.HelloWorld_Mobile.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + diff --git a/examples/18.SplitScreen/SplitScreen.sln b/examples/18.SplitScreen/SplitScreen.sln deleted file mode 100644 index d577d3ae..00000000 --- a/examples/18.SplitScreen/SplitScreen.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "SplitScreen.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32 - {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/18.SplitScreen/SplitScreen_vc10.vcxproj b/examples/18.SplitScreen/SplitScreen_vc10.vcxproj new file mode 100644 index 00000000..aa9a0a9a --- /dev/null +++ b/examples/18.SplitScreen/SplitScreen_vc10.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 18.SplitScreen + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0} + 18.SplitScreen + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + true + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SplitScreen.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\18.SplitScreen.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick.sln b/examples/19.MouseAndJoystick/MouseAndJoystick.sln deleted file mode 100644 index 7807a0d3..00000000 --- a/examples/19.MouseAndJoystick/MouseAndJoystick.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseAndJoystick", "MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.ActiveCfg = Debug|Win32 - {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug.Build.0 = Debug|Win32 - {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.ActiveCfg = Release|Win32 - {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj b/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj new file mode 100644 index 00000000..655415f7 --- /dev/null +++ b/examples/19.MouseAndJoystick/MouseAndJoystick_vc10.vcxproj @@ -0,0 +1,126 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 19.MouseAndJoystick + {FE853A36-E0D1-4AC5-A792-B643E70D2953} + MouseAndJoystick + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/MouseAndJoystick.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/MouseAndJoystick.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\19.MouseAndJoystick.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/20.ManagedLights/ManagedLights.sln b/examples/20.ManagedLights/ManagedLights.sln deleted file mode 100644 index 09e27763..00000000 --- a/examples/20.ManagedLights/ManagedLights.sln +++ /dev/null @@ -1,17 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 - {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/20.ManagedLights/ManagedLights_vc10.vcxproj b/examples/20.ManagedLights/ManagedLights_vc10.vcxproj new file mode 100644 index 00000000..de4c646c --- /dev/null +++ b/examples/20.ManagedLights/ManagedLights_vc10.vcxproj @@ -0,0 +1,127 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 20.ManagedLights + {16007FE2-142B-47F8-93E1-519BA3F39E71} + ManagedLights + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Debug/ManagedLights.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\Lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Console + + + + + + + .\Release/ManagedLights.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\20.ManagedLights.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/21.Quake3Explorer/Quake3Explorer.sln b/examples/21.Quake3Explorer/Quake3Explorer.sln deleted file mode 100644 index 0a110de2..00000000 --- a/examples/21.Quake3Explorer/Quake3Explorer.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{830FD174-FABE-4667-B9FC-F7F8B8378EE7}") = "21.Quake3MapExplorer", "Quake3MapShader.vcproj", "{CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}.Debug.ActiveCfg = Debug|Win32 - {CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}.Debug.Build.0 = Debug|Win32 - {CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}.Release.ActiveCfg = Release|Win32 - {CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj b/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj new file mode 100644 index 00000000..f62872f5 --- /dev/null +++ b/examples/21.Quake3Explorer/Quake3Explorer_vc10.vcxproj @@ -0,0 +1,114 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 21.Quake3Explorer + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD} + 21.Quake3Explorer + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + true + ..\..\bin\Win32-VisualStudio\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)Quake3MapShader.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreaded + false + + + Level3 + + + FastCall + + + ..\..\bin\Win32-VisualStudio\21.Quake3Explorer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + + + + + + + diff --git a/examples/21.Quake3Explorer/main.cpp b/examples/21.Quake3Explorer/main.cpp index 2bc3c4ee..99912a94 100644 --- a/examples/21.Quake3Explorer/main.cpp +++ b/examples/21.Quake3Explorer/main.cpp @@ -16,7 +16,7 @@ You can download the Quake III Arena demo ( copyright id software ) at the following location: ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe -Copyright 2006-2009 Burningwater, Thomas Alten +Copyright 2006-2011 Burningwater, Thomas Alten */ #include "q3factory.h" @@ -652,6 +652,8 @@ void CQuake3EventHandler::CreateGUI() env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) ); env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) ); env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) ); + env->getSkin()->setColor ( EGDC_EDITABLE, video::SColor(240,0x44,0x44,0x44) ); + env->getSkin()->setColor ( EGDC_FOCUSED_EDITABLE, video::SColor(240,0x54,0x54,0x54) ); env->getSkin()->setColor ( EGDC_WINDOW, video::SColor(240,0x66,0x66,0x66) ); // minimal gui size 800x600 @@ -1733,7 +1735,7 @@ void CQuake3EventHandler::useItem( Q3Player * player) line3d line(start, end); // get intersection point with map - const scene::ISceneNode* hitNode; + scene::ISceneNode* hitNode; if (smgr->getSceneCollisionManager()->getCollisionPoint( line, Meta, end, triangle,hitNode)) { @@ -1933,7 +1935,7 @@ void CQuake3EventHandler::Render() driver->beginScene(true, true, SColor(0,0,0,0)); driver->getOverrideMaterial().Material.ColorMask = ECP_NONE; driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; - driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX + + driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX + ESNRP_SOLID + ESNRP_TRANSPARENT + ESNRP_TRANSPARENT_EFFECT + @@ -1959,7 +1961,7 @@ void CQuake3EventHandler::Render() driver->getOverrideMaterial().Material.ColorMask = ECP_RED; driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; - driver->getOverrideMaterial().EnablePasses = + driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT| ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW; @@ -1975,7 +1977,7 @@ void CQuake3EventHandler::Render() driver->getOverrideMaterial().Material.ColorMask = ECP_GREEN + ECP_BLUE; driver->getOverrideMaterial().EnableFlags = EMF_COLOR_MASK; - driver->getOverrideMaterial().EnablePasses = + driver->getOverrideMaterial().EnablePasses = ESNRP_SKY_BOX|ESNRP_SOLID|ESNRP_TRANSPARENT| ESNRP_TRANSPARENT_EFFECT|ESNRP_SHADOW; diff --git a/examples/22.MaterialViewer/MaterialViewer.sln b/examples/22.MaterialViewer/MaterialViewer.sln deleted file mode 100644 index c4fc6f43..00000000 --- a/examples/22.MaterialViewer/MaterialViewer.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaterialViewer", "MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32 - {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32 - {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32 - {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj b/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj new file mode 100644 index 00000000..57692fcc --- /dev/null +++ b/examples/22.MaterialViewer/MaterialViewer_vc10.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 22.MaterialViewer + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA} + MaterialViewer + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + .\Release/MaterialViewer.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + .\Release/MaterialViewer.pdb + Console + + + + + + + .\Debug/MaterialViewer.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\22.MaterialViewer.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + .\Debug/MaterialViewer.pdb + Console + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + diff --git a/examples/23.SMeshHandling/SMeshHandling.sln b/examples/23.SMeshHandling/SMeshHandling.sln deleted file mode 100644 index 710c1e1c..00000000 --- a/examples/23.SMeshHandling/SMeshHandling.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.SMeshHandling", "SMeshHandling.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.ActiveCfg = Debug|Win32 - {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32 - {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32 - {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj b/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj new file mode 100644 index 00000000..cd1dd840 --- /dev/null +++ b/examples/23.SMeshHandling/SMeshHandling_vc10.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 23.SMeshHandling + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7} + 23.SMeshHandling + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + true + ..\..\bin\Win32-VisualStudio\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)SMeshHandling.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\23.SMeshHandling.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + diff --git a/examples/24.CursorControl/CursorControl.sln b/examples/24.CursorControl/CursorControl.sln deleted file mode 100644 index 6830c554..00000000 --- a/examples/24.CursorControl/CursorControl.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "CursorControl.vcproj", "{02B67A37-50E1-49db-BECF-905BC029C2FE}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.ActiveCfg = Debug|Win32 - {02B67A37-50E1-49db-BECF-905BC029C2FE}.Debug.Build.0 = Debug|Win32 - {02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.ActiveCfg = Release|Win32 - {02B67A37-50E1-49db-BECF-905BC029C2FE}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/24.CursorControl/CursorControl_vc10.vcxproj b/examples/24.CursorControl/CursorControl_vc10.vcxproj new file mode 100644 index 00000000..57e34cae --- /dev/null +++ b/examples/24.CursorControl/CursorControl_vc10.vcxproj @@ -0,0 +1,105 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + 24.CursorControl + {02B67A37-50E1-49DB-BECF-905BC029C2FE} + 24.CursorControl + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + $(OutDir)CursorControl.pdb + Console + + + + + + + true + Speed + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + Sync + + + Level3 + + + Cdecl + + + ..\..\bin\Win32-VisualStudio\24.CursorControl.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + false + Console + true + true + + + + + + + + + + + diff --git a/examples/24.CursorControl/CursorControl_vc9.sln b/examples/24.CursorControl/CursorControl_vc9.sln deleted file mode 100644 index 044f45d4..00000000 --- a/examples/24.CursorControl/CursorControl_vc9.sln +++ /dev/null @@ -1,18 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 - {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/25.XmlHandling/Makefile b/examples/25.XmlHandling/Makefile new file mode 100644 index 00000000..92f5655a --- /dev/null +++ b/examples/25.XmlHandling/Makefile @@ -0,0 +1,66 @@ +# Makefile for Irrlicht Examples +# It's usually sufficient to change just the target name and source file list +# and be sure that CXX is set to a valid compiler + +# Name of the executable created (.exe will be added automatically if necessary) +Target := 25.XmlHandling +# List of source files, separated by spaces +Sources := main.cpp +# Path to Irrlicht directory, should contain include/ and lib/ +IrrlichtHome := ../.. +# Path for the executable. Note that Irrlicht.dll should usually also be there for win32 systems +BinPath = ../../bin/$(SYSTEM) + +# general compiler settings (might need to be set when compiling the lib, too) +# preprocessor flags, e.g. defines and include paths +USERCPPFLAGS = +# compiler flags such as optimization flags +USERCXXFLAGS = -O3 -ffast-math +#USERCXXFLAGS = -g -Wall +# linker flags such as additional libraries and link paths +USERLDFLAGS = + +#### +#no changes necessary below this line +#### + +CPPFLAGS = -I$(IrrlichtHome)/include -I/usr/X11R6/include $(USERCPPFLAGS) +CXXFLAGS = $(USERCXXFLAGS) +LDFLAGS = $(USERLDFLAGS) + +#default target is Linux +all: all_linux + +# target specific settings +all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm -lXext -lX11 -lXcursor +all_linux clean_linux: SYSTEM=Linux +all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc +all_win32 clean_win32 static_win32: SUF=.exe +static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_ +all_win32: LDFLAGS += -lopengl32 -lm +static_win32: LDFLAGS += -lgdi32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lopengl32 +# name of the binary - only valid for targets which set SYSTEM +DESTPATH = $(BinPath)/$(Target)$(SUF) + +all_linux all_win32 static_win32: + $(warning Building...) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) + +clean: clean_linux clean_win32 + $(warning Cleaning...) + +clean_linux clean_win32: + @$(RM) $(DESTPATH) + +.PHONY: all all_win32 static_win32 clean clean_linux clean_win32 + +#multilib handling +ifeq ($(HOSTTYPE), x86_64) +LIBSELECT=64 +endif +#solaris real-time features +ifeq ($(HOSTTYPE), sun4) +LDFLAGS += -lrt +endif + diff --git a/examples/25.XmlHandling/XmlHandling.cbp b/examples/25.XmlHandling/XmlHandling.cbp new file mode 100644 index 00000000..eff8e20f --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling.cbp @@ -0,0 +1,60 @@ + + + + + + diff --git a/examples/25.XmlHandling/XmlHandling.vcproj b/examples/25.XmlHandling/XmlHandling.vcproj new file mode 100644 index 00000000..152a4158 --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling.vcproj @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/25.XmlHandling/XmlHandling_vc8.vcproj b/examples/25.XmlHandling/XmlHandling_vc8.vcproj new file mode 100644 index 00000000..0831ba9a --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc8.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/25.XmlHandling/XmlHandling_vc9.vcproj b/examples/25.XmlHandling/XmlHandling_vc9.vcproj new file mode 100644 index 00000000..79a1048f --- /dev/null +++ b/examples/25.XmlHandling/XmlHandling_vc9.vcproj @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/25.XmlHandling/main.cpp b/examples/25.XmlHandling/main.cpp new file mode 100644 index 00000000..6a11ac6e --- /dev/null +++ b/examples/25.XmlHandling/main.cpp @@ -0,0 +1,523 @@ +/** Example 025 Xml Handling + * + * Demonstrates loading and saving of configurations via XML + * @author Y.M. Bosman + */ + +#include + +using namespace irr; +using namespace core; +using namespace scene; +using namespace video; +using namespace io; +using namespace gui; + +#ifdef _IRR_WINDOWS_ +#pragma comment(lib, "Irrlicht.lib") +#endif + + +/** + * SettingManager class + * This class loads and writes the settings + * and manages the options. + * + * + * The class makes use of irrMap which is a an associative arrays using a red-black tree + * it allows easy mapping of a key to a value, along the way there is some information on how to use it + * + */ + +class SettingManager +{ +public: + + /** + * Construct setting managers and set default settings + */ + SettingManager(const stringw& settings_file): SettingsFile(settings_file), NullDevice(0) + { + // Irrlicht null device, we want to load settings before we actually created our device, therefore, nulldevice + NullDevice = irr::createDevice(irr::video::EDT_NULL); + + + //DriverOptions is an irrlicht map, + //we can insert values in the map in two ways by calling insert(key,value) or by using the [key] operator + //the [] operator overrides values if they already exist + DriverOptions.insert(L"Software", EDT_SOFTWARE ); + DriverOptions.insert(L"OpenGL", EDT_OPENGL ); + DriverOptions.insert(L"Direct3D9", EDT_DIRECT3D9 ); + + //some resolution options + ResolutionOptions.insert(L"640x480", dimension2du(640,480) ); + ResolutionOptions.insert(L"800x600", dimension2du(800,600) ); + ResolutionOptions.insert(L"1024x768", dimension2du(1024,768) ); + + //our preferred defaults + SettingMap.insert(L"driver", L"Direct3D9"); //0 is software + SettingMap.insert(L"resolution", L"640x480"); //0 is 640x480 + SettingMap.insert(L"fullscreen", L"0"); //0 is false + + } + + /** + * Destructor, you could store settings automatically on exit of your application if you wanted to + * in our case we simply drop the nulldevice + */ + ~SettingManager() + { + if(NullDevice) + { + NullDevice->closeDevice(); + NullDevice->drop(); + } + }; + + /** + * Load xml from disk, overwrite default settings + * The xml we are trying to load has the following structure + * settings nested in sections nested in the root node, like so + * + * + * + * + * + */ + bool load() + { + //if not able to create device dont attempt to load + if(!NullDevice) + return false; + + irr::io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(SettingsFile); //create xml reader + if ( !xml ) + return false; + + const stringw settingTag(L"setting"); //we'll be looking for this tag in the xml + stringw currentSection; //keep track of our currentsection + const stringw videoTag(L"video"); //constant for videotag + + //while there is more to read + while(xml->read()) + { + //check the node type + switch(xml->getNodeType()) + { + //we found a new element + case irr::io::EXN_ELEMENT: + { + //we currently are in the empty or mygame section and find the video tag so we set our current section to video + if(currentSection.empty() && videoTag.equals_ignore_case(xml->getNodeName())) + { + currentSection = videoTag; + } + //we are in the video section and we find a setting to parse + else if (currentSection.equals_ignore_case(videoTag) && settingTag.equals_ignore_case(xml->getNodeName() )) + { + //read in the key + stringw key = xml->getAttributeValueSafe(L"name"); + //if there actually is a key to set + if( !key.empty()) + { + //set the setting in the map to the value, + //the [] operator overrides values if they already exist or inserts a new key value + //pair into the settings map if it was not defined yet + SettingMap[ key ] = xml->getAttributeValueSafe(L"value"); + } + } + + //.. + // You can add your own sections and tags to read in here + //.. + + } + break; + + //we found the end of an element + case irr::io::EXN_ELEMENT_END: + //we were at the end of the video section so we reset our tag + currentSection=L""; + break; + } + } + + // don't forget to delete the xml reader + xml->drop(); + + return true; + } + + /** + * Save the xml to disk + * We use the nulldevice + */ + bool save() + { + + //if not able to create device don't attempt to save + if(!NullDevice) + return false; + + //create xml writer + irr::io::IXMLWriter* xwriter = NullDevice->getFileSystem()->createXMLWriter( SettingsFile ); + if(!xwriter) + return false; + + //write out the obligatory xml header. Each xml-file needs to have exactly one of those. + xwriter->writeXMLHeader(); + + //start element mygame, you replace the label "mygame" with anything you want + xwriter->writeElement(L"mygame"); + xwriter->writeLineBreak(); //new line + + //start section with video settings + xwriter->writeElement(L"video"); + xwriter->writeLineBreak(); //new line + + // getIterator gets us a pointer to the first node of the settings map + // every iteration we increase the iterator which gives us the next map node + // until we reach the end we write settings one by one by using the nodes key and value functions + map::Iterator i = SettingMap.getIterator(); + for(; !i.atEnd(); i++) + { + //write element as + //the second parameter indicates this is an empty element with no children, just attributes + xwriter->writeElement(L"setting",true, L"name", i->getKey().c_str(), L"value",i->getValue().c_str() ); + xwriter->writeLineBreak(); + } + xwriter->writeLineBreak(); + + //close video section + xwriter->writeClosingTag(L"video"); + xwriter->writeLineBreak(); + + //.. + // You can add writing sound settings, savegame information etc + //.. + + //close mygame section + xwriter->writeClosingTag(L"mygame"); + + //delete xml writer + xwriter->drop(); + + return true; + } + + /** + * Set setting in our manager + */ + void setSetting(const stringw& name, const stringw& value) + { + SettingMap[name]=value; + } + + /** + * set setting overload to quickly assign integers to our setting map + */ + void setSetting(const stringw& name, s32 value) + { + SettingMap[name]=stringw(value); + } + + /** + * Get setting as string + * @param key name of setting + * @return empty string if the settings is not found, else value of the setting + */ + stringw getSetting(const stringw& key) const + { + //the find function or irrmap returns a pointer to a map Node + //if the key can be found, otherwise it returns null + //the map node has the function getValue and getKey, as we already know the key, we return node->getValue() + map::Node* n = SettingMap.find(key); + if (n) + return n->getValue(); + else + return L""; + + } + + /** + * Get setting as bool + * @param key name of setting + * @return false if the key cannot be found, else true if the setting == 1 + */ + bool getSettingAsBoolean(const stringw& key ) const + { + stringw s = getSetting(key); + if(s.empty()) + return false; + return s.equals_ignore_case(L"1"); + } + + /** + * Get setting as integer NOTE: function is not used in example but provided for completeness + * @param key name of setting + * @return 0 if the key cannot be found, else the setting converted to an integer + */ + s32 getSettingAsInteger(const stringw& key ) const + { + //we implicitly cast to string instead of stringw because strtol10 does not accept wide strings + stringc s = getSetting(key); + if(s.empty()) + return 0; + + return strtol10(s.c_str()); + + + } + +public: + map DriverOptions; //available options for driver config + map ResolutionOptions; //available options for resolution config +private: + + SettingManager(const SettingManager& other); // defined but not implemented + SettingManager& operator=(const SettingManager& other); // defined but not implemented + + map SettingMap; //current config + + stringw SettingsFile; // location of the xml, usually the + irr::IrrlichtDevice* NullDevice; + +}; + +/** + * Application context for global variables + */ +struct SAppContext +{ + SAppContext() + : Device(0),Gui(0), Driver(0), Settings(0), ShouldQuit(false), + ButtonSave(0), ButtonExit(0), ListboxDriver(0), + ListboxResolution(0), CheckboxFullscreen(0) + { + } + + ~SAppContext() + { + if(Settings) + delete Settings; + + if(Device) + { + Device->closeDevice(); + Device->drop(); + } + } + + IrrlichtDevice * Device; + IGUIEnvironment* Gui; + IVideoDriver* Driver; + SettingManager* Settings; + bool ShouldQuit; + + //settings dialog + IGUIButton* ButtonSave; + IGUIButton* ButtonExit; + IGUIListBox* ListboxDriver; + IGUIListBox* ListboxResolution; + IGUICheckBox* CheckboxFullscreen; +}; + +/* + A typical event receiver. +*/ +class MyEventReceiver : public IEventReceiver +{ +public: + MyEventReceiver(SAppContext & a) : App(a) { } + + virtual bool OnEvent(const SEvent& event) + { + if (event.EventType == EET_GUI_EVENT ) + { + switch ( event.GUIEvent.EventType ) + { + //handle button click events + case EGET_BUTTON_CLICKED: + { + //Our save button was called so we obtain the settings from our dialog and save them + if ( event.GUIEvent.Caller == App.ButtonSave ) + { + //if there is a selection write it + if( App.ListboxDriver->getSelected() != -1) + App.Settings->setSetting(L"driver", App.ListboxDriver->getListItem(App.ListboxDriver->getSelected())); + + //if there is a selection write it + if( App.ListboxResolution->getSelected() != -1) + App.Settings->setSetting(L"resolution", App.ListboxResolution->getListItem(App.ListboxResolution->getSelected())); + + App.Settings->setSetting(L"fullscreen", App.CheckboxFullscreen->isChecked()); + + + if(App.Settings->save()) + { + App.Gui->addMessageBox(L"settings save",L"settings saved, please restart for settings to change effect","",true); + } + } + // cancel/exit button clicked, tell the application to exit + else if( event.GUIEvent.Caller == App.ButtonExit) + { + App.ShouldQuit = true; + } + } + break; + } + } + + return false; + } + +private: + SAppContext & App; +}; + + +/** + * Function to create a video settings dialog + * This dialog shows the current settings from the configuration xml and allows them to be changed + */ +void createSettingsDialog(SAppContext& app) +{ + // first get rid of alpha in gui + for (irr::s32 i=0; igetSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i); + col.setAlpha(255); + app.Gui->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col); + } + + //create video settings windows + gui::IGUIWindow* windowSettings = app.Gui->addWindow(rect(10,10,400,400),true,L"Videosettings"); + app.Gui->addStaticText (L"Select your desired video settings", rect< s32 >(10,20, 200, 40), false, true, windowSettings); + + // add listbox for driver choice + app.Gui->addStaticText (L"Driver", rect< s32 >(10,50, 200, 60), false, true, windowSettings); + app.ListboxDriver = app.Gui->addListBox(rect(10,60,220,120), windowSettings, 1,true); + + //add all available options to the driver choice listbox + map::Iterator i = app.Settings->DriverOptions.getIterator(); + for(; !i.atEnd(); i++) + app.ListboxDriver->addItem(i->getKey().c_str()); + + //set currently selected driver + app.ListboxDriver->setSelected(app.Settings->getSetting("driver").c_str()); + + // add listbox for resolution choice + app.Gui->addStaticText (L"Resolution", rect< s32 >(10,130, 200, 140), false, true, windowSettings); + app.ListboxResolution = app.Gui->addListBox(rect(10,140,220,200), windowSettings, 1,true); + + //add all available options tothe resolution listbox + map::Iterator ri = app.Settings->ResolutionOptions.getIterator(); + for(; !ri.atEnd(); ri++) + app.ListboxResolution->addItem(ri->getKey().c_str()); + + //set currently selected resolution + app.ListboxResolution->setSelected(app.Settings->getSetting("resolution").c_str()); + + //add checkbox to toggle fullscreen, initially set to loaded setting + app.CheckboxFullscreen = app.Gui->addCheckBox(app.Settings->getSettingAsBoolean("fullscreen"), + rect(10,220,220,240), + windowSettings, -1, + L"Fullscreen"); + + //last but not least add save button + app.ButtonSave = app.Gui->addButton(rect(80,250,150,270), windowSettings, 2, L"Save video settings"); + + //exit/cancel button + app.ButtonExit = app.Gui->addButton(rect(160,250,240,270), windowSettings, 2, L"Cancel and exit"); +} + +int main() +{ + //create new application context + SAppContext app; + + //create device creation parameters that can get overwritten by our settings file + SIrrlichtCreationParameters param; + param.DriverType = EDT_SOFTWARE; + param.WindowSize.set(640,480); + + /** + * Try to load config. + * I leave it as an exercise of the reader to store the configuration in the local application data folder, + * the only logical place to store config data for games. For all other operating systems I redirect to your manuals + */ + app.Settings = new SettingManager("../../media/settings.xml"); + if( !app.Settings->load() ) + { + // ... + // Here add your own exception handling, for now we continue because there are defaults set in SettingManager constructor + // ... + } + else + { + //settings xml loaded from disk, + + //map driversetting to driver type and test if the setting is valid + //the DriverOptions map contains string representations mapped to to irrlicht E_DRIVER_TYPE enum + //e.g "direct3d9" will become 4 + //see DriverOptions in the settingmanager class for details + map::Node* driver = app.Settings->DriverOptions.find( app.Settings->getSetting("driver") ); + + if(driver) + { + if( irr::IrrlichtDevice::isDriverSupported( static_cast( driver->getValue() ))) + { + // selected driver is supported, so we use it. + param.DriverType = static_cast( driver->getValue()); + } + } + + //map resolution setting to dimension in a similar way as demonstrated above + map::Node* res = app.Settings->ResolutionOptions.find( app.Settings->getSetting("resolution") ); + if(res) + { + param.WindowSize = res->getValue(); + } + + //get fullscreen setting from config + param.Fullscreen = app.Settings->getSettingAsBoolean("fullscreen"); + } + + //create the irrlicht device using the settings + app.Device = createDeviceEx(param); + if (app.Device == 0) + { + // You can add your own exception handling on driver failure + exit(0); + } + + app.Device->setWindowCaption(L"Xmlhandling - Irrlicht engine tutorial"); + app.Driver = app.Device->getVideoDriver(); + app.Gui = app.Device->getGUIEnvironment(); + + createSettingsDialog(app); + + //set event receiver so we can respond to gui events + MyEventReceiver receiver(app); + app.Device->setEventReceiver(&receiver); + + //enter main loop + while(!app.ShouldQuit && app.Device->run()) + { + if(app.Device->isWindowActive()) + { + app.Driver->beginScene(true, true, SColor(0,200,200,200)); + app.Gui->drawAll(); + app.Driver->endScene(); + } + app.Device->sleep(10); + } + + //app destroys device in destructor + + return 0; +} diff --git a/examples/BuildAllExamples.workspace b/examples/BuildAllExamples.workspace index 490ca036..86c4a905 100644 --- a/examples/BuildAllExamples.workspace +++ b/examples/BuildAllExamples.workspace @@ -20,10 +20,10 @@ - + - + diff --git a/examples/BuildAllExamples_v7.sln b/examples/BuildAllExamples_v7.sln index 3d50c58c..1896e593 100644 --- a/examples/BuildAllExamples_v7.sln +++ b/examples/BuildAllExamples_v7.sln @@ -3,79 +3,94 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrli ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld.vcproj", "{265B57DD-0C6D-4CFD-A95E-0FCC3ECD0E90}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map.vcproj", "{4DC646F0-D34A-4EA6-8EDF-7109F0DFBC09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode.vcproj", "{32078844-1903-47AB-AEAC-FC2E3415DB46}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement.vcproj", "{735B050B-1AC5-4602-B0BE-D2D2B5893E94}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface.vcproj", "{0294193E-12DE-4B24-91C0-419865BF7E33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision.vcproj", "{EB92287F-CBA1-4FF9-801E-89091F0B6D10}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFx", "08.SpecialFX\SpecialFX.vcproj", "{8553D1C8-6AE6-423E-A2D5-1016804AE67C}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.MeshViewer", "09.Meshviewer\Meshviewer.vcproj", "{EF198BF9-7446-443D-961E-E617E1BD3AFB}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders.vcproj", "{A4F71E8D-4042-4909-9AB8-1BA4CF5B926D}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting.vcproj", "{EC388ECA-E430-477A-A969-66FE5F84508A}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.MeshViewer", "09.Meshviewer\Meshviewer.vcproj", "{EF198BF9-7446-443D-961E-E617E1BD3AFB}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map.vcproj", "{4DC646F0-D34A-4EA6-8EDF-7109F0DFBC09}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering.vcproj", "{D70CD59D-853A-4343-9DE0-A73B3D48914D}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision.vcproj", "{EB92287F-CBA1-4FF9-801E-89091F0B6D10}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering.vcproj", "{D70CD59D-853A-4343-9DE0-A73B3D48914D}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface.vcproj", "{0294193E-12DE-4B24-91C0-419865BF7E33}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile.vcproj", "{1AD3DB5E-D751-42D5-8F3E-7C3010539F5C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFx", "08.SpecialFX\SpecialFX.vcproj", "{8553D1C8-6AE6-423E-A2D5-1016804AE67C}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld.vcproj", "{265B57DD-0C6D-4CFD-A95E-0FCC3ECD0E90}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders.vcproj", "{A4F71E8D-4042-4909-9AB8-1BA4CF5B926D}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode.vcproj", "{32078844-1903-47AB-AEAC-FC2E3415DB46}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture.vcproj", "{AFC223BD-4371-4A8B-A90B-0D338BD2DEBB}" ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window.vcproj", "{3A73BAFE-60DE-4E40-9E37-710760BC25C6}" ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile.vcproj", "{1AD3DB5E-D751-42D5-8F3E-7C3010539F5C}" ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc7.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" @@ -83,7 +98,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Qua {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling.vcproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "..\tools\GUIEditor\GUI Editor_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFontTool\newFontTool\irrFontTool_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject @@ -175,6 +211,26 @@ Global {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug.Build.0 = Debug|Win32 {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.ActiveCfg = Release|Win32 {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/examples/BuildAllExamples_v8.sln b/examples/BuildAllExamples_v8.sln index 0ca5b530..43683788 100644 --- a/examples/BuildAllExamples_v8.sln +++ b/examples/BuildAllExamples_v8.sln @@ -1,9 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld_vc8", "01.HelloWorld\HelloWorld_vc8.vcproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map_vc8", "02.Quake3Map\Quake3Map_vc8.vcproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc8", "03.CustomSceneNode\CustomSceneNode_vc8.vcproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" ProjectSection(ProjectDependencies) = postProject @@ -11,12 +19,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode_vc8", "0 EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc8", "04.Movement\Movement_vc8.vcproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc8.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics_vc8", "06.2DGraphics\2DGraphics_vc8.vcproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision_vc8", "07.Collision\Collision_vc8.vcproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc8", "08.SpecialFX\SpecialFX_vc8.vcproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" ProjectSection(ProjectDependencies) = postProject @@ -24,12 +44,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX_vc8", "08.Spec EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer_vc8", "09.Meshviewer\Meshviewer_vc8.vcproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders_vc8", "10.Shaders\Shaders_vc8.vcproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting_vc8", "11.PerPixelLighting\PerPixelLighting_vc8.vcproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering_vc8", "12.TerrainRendering\TerrainRendering_vc8.vcproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc8", "13.RenderToTexture\RenderToTexture_vc8.vcproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" ProjectSection(ProjectDependencies) = postProject @@ -37,22 +69,29 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture_vc8", "1 EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window_vc8", "14.Win32Window\Win32Window_vc8.vcproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile_vc8", "15.LoadIrrFile\LoadIrrFile_vc8.vcproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc8", "16.Quake3MapShader\Quake3MapShader_vc8.vcproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc8", "19.MouseAndJoystick\MouseAndJoystick_vc8.vcproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc8", "20.ManagedLights\ManagedLights_vc8.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" ProjectSection(ProjectDependencies) = postProject @@ -64,13 +103,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc8", "21 {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld for Windows Mobile on PC", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v8.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer_vc8", "22.MaterialViewer\MaterialViewer_vc8.vcproj", "{2856AB41-9BC5-4716-9B35-762A65F6F5D1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc8", "23.SMeshHandling\SMeshHandling_vc8.vcproj", "{08D2F676-9DEB-4443-AEF7-52CC6F7D5F7C}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc8", "24.CursorControl\CursorControl_vc8.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo_vc8", "Demo\Demo_vc8.vcproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/examples/BuildAllExamples_v9.sln b/examples/BuildAllExamples_v9.sln index 372cbb77..f424ac84 100644 --- a/examples/BuildAllExamples_v9.sln +++ b/examples/BuildAllExamples_v9.sln @@ -88,6 +88,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader_vc9", "1 {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen_vc9", "18.SplitScreen\SplitScreen_vc9.vcproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} @@ -118,7 +123,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling_vc9", "23. {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile_v9", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_v9.vcproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" ProjectSection(ProjectDependencies) = postProject {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection @@ -138,8 +143,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh Converter", "..\tools\ {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl_vc9", "24.CursorControl\CursorControl_vc9.vcproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 diff --git a/examples/BuildAllExamples_vc10.sln b/examples/BuildAllExamples_vc10.sln new file mode 100644 index 00000000..d67073e8 --- /dev/null +++ b/examples/BuildAllExamples_vc10.sln @@ -0,0 +1,263 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01.HelloWorld", "01.HelloWorld\HelloWorld_vc10.vcxproj", "{5AD4C95C-BA38-4692-BA4B-8C25A86208F9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02.Quake3Map", "02.Quake3Map\Quake3Map_vc10.vcxproj", "{D1A464A2-D479-458C-98A2-60965D823CD1}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03.CustomSceneNode", "03.CustomSceneNode\CustomSceneNode_vc10.vcxproj", "{171CCDFA-C140-4956-8EB7-F0168F4521D3}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement", "04.Movement\Movement_vc10.vcxproj", "{7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface", "05.UserInterface\UserInterface_vc10.vcxproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "06.2DGraphics", "06.2DGraphics\2DGraphics_vc10.vcxproj", "{E71B6F18-10DC-4101-A541-F6D33F71B2BD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07.Collision", "07.Collision\Collision_vc10.vcxproj", "{3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "08.SpecialFX", "08.SpecialFX\SpecialFX_vc10.vcxproj", "{C869BF55-B9D6-4980-BC92-60FA0CF8411A}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "09.Meshviewer", "09.Meshviewer\Meshviewer_vc10.vcxproj", "{2AE24484-22FC-481B-9A40-7CD0DA5C8E06}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "10.Shaders", "10.Shaders\Shaders_vc10.vcxproj", "{27158C82-CD15-4A9B-9848-35E7065B209F}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "11.PerPixelLighting", "11.PerPixelLighting\PerPixelLighting_vc10.vcxproj", "{C4B42409-542D-4EFC-9E6B-44713FD47A33}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12.TerrainRendering", "12.TerrainRendering\TerrainRendering_vc10.vcxproj", "{3A5B74E5-6390-43B0-A459-2793B81FFD31}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13.RenderToTexture", "13.RenderToTexture\RenderToTexture_vc10.vcxproj", "{0914E5C8-5352-467B-8421-C9EB35BD5596}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14.Win32Window", "14.Win32Window\Win32Window_vc10.vcxproj", "{772FBE05-D05A-467B-9842-BEC409EEA8D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15.LoadIrrFile", "15.LoadIrrFile\LoadIrrFile_vc10.vcxproj", "{78C9F424-523C-49AC-94B7-823AA4A26BF9}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16.Quake3MapShader", "16.Quake3MapShader\Quake3MapShader_vc10.vcxproj", "{EB3B38EA-5CE7-4983-845B-880661E69D09}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17.HelloWorld_Mobile", "17.HelloWorld_Mobile\17. HelloWorld for Windows Mobile on PC_vc10.vcxproj", "{2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18.SplitScreen", "18.SplitScreen\SplitScreen_vc10.vcxproj", "{1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick", "19.MouseAndJoystick\MouseAndJoystick_vc10.vcxproj", "{FE853A36-E0D1-4AC5-A792-B643E70D2953}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights", "20.ManagedLights\ManagedLights_vc10.vcxproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer", "21.Quake3Explorer\Quake3Explorer_vc10.vcxproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer_vc10.vcxproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMeshHandling\SMeshHandling_vc10.vcxproj", "{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "24.CursorControl", "24.CursorControl\CursorControl_vc10.vcxproj", "{02B67A37-50E1-49DB-BECF-905BC029C2FE}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo\Demo_vc10.vcxproj", "{6F076455-D955-45D4-9C68-4AD4E45F2D47}" + ProjectSection(ProjectDependencies) = postProject + {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUIEditor", "..\tools\GUIEditor\GUI Editor_vc10.vcxproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTool", "..\tools\IrrFontTool\newFontTool\irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshConverter", "..\tools\MeshConverter\MeshConverter_vc10.vcxproj", "{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Debug|Win32.Build.0 = Debug|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.ActiveCfg = Release|Win32 + {5AD4C95C-BA38-4692-BA4B-8C25A86208F9}.Release|Win32.Build.0 = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Debug|Win32.Build.0 = Debug|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.ActiveCfg = Release|Win32 + {D1A464A2-D479-458C-98A2-60965D823CD1}.Release|Win32.Build.0 = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Debug|Win32.Build.0 = Debug|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.ActiveCfg = Release|Win32 + {171CCDFA-C140-4956-8EB7-F0168F4521D3}.Release|Win32.Build.0 = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Debug|Win32.Build.0 = Debug|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.ActiveCfg = Release|Win32 + {7BDBB7E8-E0C9-4A0D-83C1-D389D6140FEF}.Release|Win32.Build.0 = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.ActiveCfg = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Debug|Win32.Build.0 = Debug|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.ActiveCfg = Release|Win32 + {622C9DD7-0391-49FF-AF53-24F9D5A8EC53}.Release|Win32.Build.0 = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Debug|Win32.Build.0 = Debug|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.ActiveCfg = Release|Win32 + {E71B6F18-10DC-4101-A541-F6D33F71B2BD}.Release|Win32.Build.0 = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Debug|Win32.Build.0 = Debug|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.ActiveCfg = Release|Win32 + {3E30297B-5BE3-4A5C-B31E-08A28ADDB29E}.Release|Win32.Build.0 = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Debug|Win32.Build.0 = Debug|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.ActiveCfg = Release|Win32 + {C869BF55-B9D6-4980-BC92-60FA0CF8411A}.Release|Win32.Build.0 = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Debug|Win32.Build.0 = Debug|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.ActiveCfg = Release|Win32 + {2AE24484-22FC-481B-9A40-7CD0DA5C8E06}.Release|Win32.Build.0 = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.ActiveCfg = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Debug|Win32.Build.0 = Debug|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.ActiveCfg = Release|Win32 + {27158C82-CD15-4A9B-9848-35E7065B209F}.Release|Win32.Build.0 = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Debug|Win32.Build.0 = Debug|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.ActiveCfg = Release|Win32 + {C4B42409-542D-4EFC-9E6B-44713FD47A33}.Release|Win32.Build.0 = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Debug|Win32.Build.0 = Debug|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.ActiveCfg = Release|Win32 + {3A5B74E5-6390-43B0-A459-2793B81FFD31}.Release|Win32.Build.0 = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.ActiveCfg = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Debug|Win32.Build.0 = Debug|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.ActiveCfg = Release|Win32 + {0914E5C8-5352-467B-8421-C9EB35BD5596}.Release|Win32.Build.0 = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Debug|Win32.Build.0 = Debug|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.ActiveCfg = Release|Win32 + {772FBE05-D05A-467B-9842-BEC409EEA8D0}.Release|Win32.Build.0 = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Debug|Win32.Build.0 = Debug|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.ActiveCfg = Release|Win32 + {78C9F424-523C-49AC-94B7-823AA4A26BF9}.Release|Win32.Build.0 = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Debug|Win32.Build.0 = Debug|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.ActiveCfg = Release|Win32 + {EB3B38EA-5CE7-4983-845B-880661E69D09}.Release|Win32.Build.0 = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Debug|Win32.Build.0 = Debug|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.ActiveCfg = Release|Win32 + {2A29B6B1-AFC4-46C7-9944-7052AAE66F7B}.Release|Win32.Build.0 = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Debug|Win32.Build.0 = Debug|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.ActiveCfg = Release|Win32 + {1AB9413E-4F53-42A3-8CB2-CB4BE22336D0}.Release|Win32.Build.0 = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32 + {FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.Build.0 = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.Build.0 = Debug|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32 + {16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.Build.0 = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32 + {CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug|Win32.Build.0 = Debug|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.ActiveCfg = Release|Win32 + {4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release|Win32.Build.0 = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug|Win32.Build.0 = Debug|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.ActiveCfg = Release|Win32 + {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release|Win32.Build.0 = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Debug|Win32.Build.0 = Debug|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.ActiveCfg = Release|Win32 + {02B67A37-50E1-49DB-BECF-905BC029C2FE}.Release|Win32.Build.0 = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Debug|Win32.Build.0 = Debug|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.ActiveCfg = Release|Win32 + {6F076455-D955-45D4-9C68-4AD4E45F2D47}.Release|Win32.Build.0 = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 + {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 + {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Debug|Win32.Build.0 = Debug|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.ActiveCfg = Release|Win32 + {E72B637E-4AA6-46F3-885F-AC67B4B470ED}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/examples/Demo/CDemo.cpp b/examples/Demo/CDemo.cpp index 489d89d0..3e726b06 100644 --- a/examples/Demo/CDemo.cpp +++ b/examples/Demo/CDemo.cpp @@ -620,7 +620,7 @@ void CDemo::shoot() core::line3d line(start, end); // get intersection point with map - const scene::ISceneNode* hitNode; + scene::ISceneNode* hitNode; if (sm->getSceneCollisionManager()->getCollisionPoint( line, mapSelector, end, triangle, hitNode)) { diff --git a/examples/Demo/Demo.sln b/examples/Demo/Demo.sln deleted file mode 100644 index 2e27b67d..00000000 --- a/examples/Demo/Demo.sln +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo", "Demo.vcproj", "{5CFEB8FB-92BA-4FAD-A66C-EB53E3FD8DDA}" - ProjectSection(ProjectDependencies) = postProject - {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\..\source\Irrlicht\Irrlicht7.1.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {5CFEB8FB-92BA-4FAD-A66C-EB53E3FD8DDA}.Debug.ActiveCfg = Debug|Win32 - {5CFEB8FB-92BA-4FAD-A66C-EB53E3FD8DDA}.Debug.Build.0 = Debug|Win32 - {5CFEB8FB-92BA-4FAD-A66C-EB53E3FD8DDA}.Release.ActiveCfg = Release|Win32 - {5CFEB8FB-92BA-4FAD-A66C-EB53E3FD8DDA}.Release.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release.ActiveCfg = Relase - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release.Build.0 = Relase - Fast FPU|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/examples/Demo/Demo_vc10.vcxproj b/examples/Demo/Demo_vc10.vcxproj new file mode 100644 index 00000000..8ce4fc77 --- /dev/null +++ b/examples/Demo/Demo_vc10.vcxproj @@ -0,0 +1,159 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {6F076455-D955-45D4-9C68-4AD4E45F2D47} + Demo + + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + + ..\..\bin\Win32-VisualStudio\ + + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/Demo.tlb + + + + + MaxSpeed + Default + false + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + Windows + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/Demo.tlb + + + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + ..\..\bin\Win32-VisualStudio\Demo.exe + ..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + diff --git a/include/CDynamicMeshBuffer.h b/include/CDynamicMeshBuffer.h index ef497d37..009ed7b6 100644 --- a/include/CDynamicMeshBuffer.h +++ b/include/CDynamicMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/CIndexBuffer.h b/include/CIndexBuffer.h index b5ac958d..c78f2460 100644 --- a/include/CIndexBuffer.h +++ b/include/CIndexBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/CMeshBuffer.h b/include/CMeshBuffer.h index e2b2a50f..4bd2b30b 100644 --- a/include/CMeshBuffer.h +++ b/include/CMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/CVertexBuffer.h b/include/CVertexBuffer.h index 6d715248..65708047 100644 --- a/include/CVertexBuffer.h +++ b/include/CVertexBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EAttributes.h b/include/EAttributes.h index 023ccf1a..d0f265ca 100644 --- a/include/EAttributes.h +++ b/include/EAttributes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ECullingTypes.h b/include/ECullingTypes.h index e33f1f93..4131d509 100644 --- a/include/ECullingTypes.h +++ b/include/ECullingTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EDebugSceneTypes.h b/include/EDebugSceneTypes.h index 025d22b5..d113ae7c 100644 --- a/include/EDebugSceneTypes.h +++ b/include/EDebugSceneTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EDriverFeatures.h b/include/EDriverFeatures.h index 7d42a5df..bf1b3d07 100644 --- a/include/EDriverFeatures.h +++ b/include/EDriverFeatures.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EDriverTypes.h b/include/EDriverTypes.h index 0acc7c70..fcdab283 100644 --- a/include/EDriverTypes.h +++ b/include/EDriverTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EGUIAlignment.h b/include/EGUIAlignment.h index 9ebd40ce..e52f3587 100644 --- a/include/EGUIAlignment.h +++ b/include/EGUIAlignment.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EGUIElementTypes.h b/include/EGUIElementTypes.h index c47eadbe..ddbf7848 100644 --- a/include/EGUIElementTypes.h +++ b/include/EGUIElementTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -88,6 +88,9 @@ enum EGUI_ELEMENT_TYPE //! Unknown type. EGUIET_ELEMENT, + //! The root of the GUI + EGUIET_ROOT, + //! Not an element, amount of elements in there EGUIET_COUNT, @@ -123,6 +126,7 @@ const c8* const GUIElementTypeNames[] = "treeview", "window", "element", + "root", 0 }; diff --git a/include/EHardwareBufferFlags.h b/include/EHardwareBufferFlags.h index 46db26a5..c107460e 100644 --- a/include/EHardwareBufferFlags.h +++ b/include/EHardwareBufferFlags.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EMaterialFlags.h b/include/EMaterialFlags.h index 683a671c..85fedb59 100644 --- a/include/EMaterialFlags.h +++ b/include/EMaterialFlags.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EMaterialTypes.h b/include/EMaterialTypes.h index 69f92cdd..3d88c8e2 100644 --- a/include/EMaterialTypes.h +++ b/include/EMaterialTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EMeshWriterEnums.h b/include/EMeshWriterEnums.h index 4e6cd50c..63d77d72 100644 --- a/include/EMeshWriterEnums.h +++ b/include/EMeshWriterEnums.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EMessageBoxFlags.h b/include/EMessageBoxFlags.h index 8e8ead8a..fcf3863a 100644 --- a/include/EMessageBoxFlags.h +++ b/include/EMessageBoxFlags.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/EPrimitiveTypes.h b/include/EPrimitiveTypes.h index 2d105300..c8ae5ffd 100644 --- a/include/EPrimitiveTypes.h +++ b/include/EPrimitiveTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ESceneNodeAnimatorTypes.h b/include/ESceneNodeAnimatorTypes.h index 63a78f7f..0683252b 100644 --- a/include/ESceneNodeAnimatorTypes.h +++ b/include/ESceneNodeAnimatorTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ESceneNodeTypes.h b/include/ESceneNodeTypes.h index ee5c2a6d..b84ce1a5 100644 --- a/include/ESceneNodeTypes.h +++ b/include/ESceneNodeTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ETerrainElements.h b/include/ETerrainElements.h index b71b5150..cb5e5e5b 100644 --- a/include/ETerrainElements.h +++ b/include/ETerrainElements.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IAnimatedMesh.h b/include/IAnimatedMesh.h index 791c0ca8..bea77a8e 100644 --- a/include/IAnimatedMesh.h +++ b/include/IAnimatedMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IAnimatedMeshMD2.h b/include/IAnimatedMeshMD2.h index 692a8c50..c17f0482 100644 --- a/include/IAnimatedMeshMD2.h +++ b/include/IAnimatedMeshMD2.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IAnimatedMeshMD3.h b/include/IAnimatedMeshMD3.h index 8aa3ba93..2be5d905 100644 --- a/include/IAnimatedMeshMD3.h +++ b/include/IAnimatedMeshMD3.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2007-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IAnimatedMeshSceneNode.h b/include/IAnimatedMeshSceneNode.h index 94c79299..d9d5ad7b 100644 --- a/include/IAnimatedMeshSceneNode.h +++ b/include/IAnimatedMeshSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -210,7 +210,7 @@ namespace scene virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0; //! render mesh ignoring its transformation. - /** Used with ragdolls. Culling is unaffected. */ + /** Culling is unaffected. */ virtual void setRenderFromIdentity( bool On )=0; //! Creates a clone of this scene node and its children. diff --git a/include/IAttributeExchangingObject.h b/include/IAttributeExchangingObject.h index 0f90e9fc..ab4e4293 100644 --- a/include/IAttributeExchangingObject.h +++ b/include/IAttributeExchangingObject.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IAttributes.h b/include/IAttributes.h index 3db84e97..1f594100 100644 --- a/include/IAttributes.h +++ b/include/IAttributes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -67,7 +67,7 @@ public: virtual bool existsAttribute(const c8* attributeName) = 0; //! Returns attribute index from name, -1 if not found - virtual s32 findAttribute(const c8* attributeName) = 0; + virtual s32 findAttribute(const c8* attributeName) const =0; //! Removes all attributes virtual void clear() = 0; @@ -102,11 +102,11 @@ public: //! Gets an attribute as integer value //! \param attributeName: Name of the attribute to get. //! \return Returns value of the attribute previously set by setAttribute() - virtual s32 getAttributeAsInt(const c8* attributeName) = 0; + virtual s32 getAttributeAsInt(const c8* attributeName) const =0; //! Gets an attribute as integer value //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual s32 getAttributeAsInt(s32 index) = 0; + virtual s32 getAttributeAsInt(s32 index) const =0; //! Sets an attribute as integer value virtual void setAttribute(s32 index, s32 value) = 0; diff --git a/include/IBillboardSceneNode.h b/include/IBillboardSceneNode.h index 1948fe76..894f5645 100644 --- a/include/IBillboardSceneNode.h +++ b/include/IBillboardSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IBillboardTextSceneNode.h b/include/IBillboardTextSceneNode.h index e8aca8e6..d4bd1581 100644 --- a/include/IBillboardTextSceneNode.h +++ b/include/IBillboardTextSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IBoneSceneNode.h b/include/IBoneSceneNode.h index 2fa0b501..7ce769ec 100644 --- a/include/IBoneSceneNode.h +++ b/include/IBoneSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ICameraSceneNode.h b/include/ICameraSceneNode.h index b8a340ed..63616602 100644 --- a/include/ICameraSceneNode.h +++ b/include/ICameraSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ICursorControl.h b/include/ICursorControl.h index 31675622..6c089fc0 100644 --- a/include/ICursorControl.h +++ b/include/ICursorControl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IDummyTransformationSceneNode.h b/include/IDummyTransformationSceneNode.h index ce42da85..b39f7017 100644 --- a/include/IDummyTransformationSceneNode.h +++ b/include/IDummyTransformationSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IDynamicMeshBuffer.h b/include/IDynamicMeshBuffer.h index 8c86da69..8e6224d7 100644 --- a/include/IDynamicMeshBuffer.h +++ b/include/IDynamicMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h index 4532c42d..500470ee 100644 --- a/include/IEventReceiver.h +++ b/include/IEventReceiver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IFileArchive.h b/include/IFileArchive.h index eabd4552..cacb3548 100644 --- a/include/IFileArchive.h +++ b/include/IFileArchive.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt/ Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt/ Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IFileList.h b/include/IFileList.h index e5830478..9fb174e8 100644 --- a/include/IFileList.h +++ b/include/IFileList.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -45,7 +45,7 @@ public: //! Returns the file offset of a file in the file list, based on an index. /** \param index is the zero based index of the file which should be returned. The index must be less than the amount getFileCount() returns. - \return The size of the file in bytes. */ + \return The offset of the file in bytes. */ virtual u32 getFileOffset(u32 index) const = 0; //! Returns the ID of a file in the file list, based on an index. @@ -66,7 +66,7 @@ public: //! Searches for a file or folder in the list /** Searches for a file by name \param filename The name of the file to search for. - \param isFolder True if you are searching for a file, false if you want a dir. + \param isFolder True if you are searching for a directory path, false if you are searching for a file \return Returns the index of the file in the file list, or -1 if no matching name name was found. */ virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0; diff --git a/include/IFileSystem.h b/include/IFileSystem.h index 39e49adf..4a526d59 100644 --- a/include/IFileSystem.h +++ b/include/IFileSystem.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -232,6 +232,9 @@ public: //! flatten a path and file name for example: "/you/me/../." becomes "/you" virtual path& flattenFilename(path& directory, const path& root="/") const =0; + //! Get the relative filename, relative to the given directory + virtual path getRelativeFilename(const path& filename, const path& directory) const =0; + //! Creates a list of files and directories in the current working directory and returns it. /** \return a Pointer to the created IFileList is returned. After the list has been used it has to be deleted using its IFileList::drop() method. diff --git a/include/IGPUProgrammingServices.h b/include/IGPUProgrammingServices.h index b666648a..bb5f811f 100644 --- a/include/IGPUProgrammingServices.h +++ b/include/IGPUProgrammingServices.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -37,20 +37,20 @@ public: \param vertexShaderProgram: String containing the source of the vertex shader program. This can be 0 if no vertex program shall be used. \param vertexShaderEntryPointName: Name of the entry function of the - vertexShaderProgram + vertexShaderProgram (p.e. "main") \param vsCompileTarget: Vertex shader version the high level shader shall be compiled to. \param pixelShaderProgram: String containing the source of the pixel shader program. This can be 0 if no pixel shader shall be used. \param pixelShaderEntryPointName: Entry name of the function of the - pixelShaderEntryPointName + pixelShaderProgram (p.e. "main") \param psCompileTarget: Pixel shader version the high level shader shall be compiled to. \param geometryShaderProgram: String containing the source of the geometry shader program. This can be 0 if no geometry shader shall be used. \param geometryShaderEntryPointName: Entry name of the function of the - geometryShaderEntryPointName + geometryShaderProgram (p.e. "main") \param gsCompileTarget: Geometry shader version the high level shader shall be compiled to. \param inType Type of vertices passed to geometry shader @@ -116,21 +116,21 @@ public: of the vertex shader program. Set to empty string if no vertex shader shall be created. \param vertexShaderEntryPointName: Name of the entry function of the - vertexShaderProgram + vertexShaderProgram (p.e. "main") \param vsCompileTarget: Vertex shader version the high level shader shall be compiled to. \param pixelShaderProgramFileName: Text file containing the source of the pixel shader program. Set to empty string if no pixel shader shall be created. \param pixelShaderEntryPointName: Entry name of the function of the - pixelShaderEntryPointName + pixelShaderProgram (p.e. "main") \param psCompileTarget: Pixel shader version the high level shader shall be compiled to. - \param geometryShaderProgramFileName: String containing the source of + \param geometryShaderProgramFileName: Name of the source of the geometry shader program. Set to empty string if no geometry shader shall be created. \param geometryShaderEntryPointName: Entry name of the function of the - geometryShaderEntryPointName + geometryShaderProgram (p.e. "main") \param gsCompileTarget: Geometry shader version the high level shader shall be compiled to. \param inType Type of vertices passed to geometry shader @@ -202,14 +202,14 @@ public: \param pixelShaderProgram: Text file handle containing the source of the pixel shader program. Set to 0 if no pixel shader shall be created. \param pixelShaderEntryPointName: Entry name of the function of the - pixelShaderEntryPointName + pixelShaderProgram (p.e. "main") \param psCompileTarget: Pixel shader version the high level shader shall be compiled to. \param geometryShaderProgram: Text file handle containing the source of the geometry shader program. Set to 0 if no geometry shader shall be created. \param geometryShaderEntryPointName: Entry name of the function of the - geometryShaderEntryPointName + geometryShaderProgram (p.e. "main") \param gsCompileTarget: Geometry shader version the high level shader shall be compiled to. \param inType Type of vertices passed to geometry shader diff --git a/include/IGUIButton.h b/include/IGUIButton.h index 16d80505..810049c0 100644 --- a/include/IGUIButton.h +++ b/include/IGUIButton.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUICheckBox.h b/include/IGUICheckBox.h index d398ad69..85a142b8 100644 --- a/include/IGUICheckBox.h +++ b/include/IGUICheckBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIColorSelectDialog.h b/include/IGUIColorSelectDialog.h index 331aed4f..3bd2975c 100644 --- a/include/IGUIColorSelectDialog.h +++ b/include/IGUIColorSelectDialog.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIComboBox.h b/include/IGUIComboBox.h index 57af3c4a..3d818d98 100644 --- a/include/IGUIComboBox.h +++ b/include/IGUIComboBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIContextMenu.h b/include/IGUIContextMenu.h index f18a7396..36c3f223 100644 --- a/include/IGUIContextMenu.h +++ b/include/IGUIContextMenu.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIEditBox.h b/include/IGUIEditBox.h index b90aaa38..e3bba6eb 100644 --- a/include/IGUIEditBox.h +++ b/include/IGUIEditBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIElement.h b/include/IGUIElement.h index 123e52bc..03ca9972 100644 --- a/include/IGUIElement.h +++ b/include/IGUIElement.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -454,9 +454,16 @@ public: } - //! Returns true if element is enabled. + //! Returns true if element is enabled + /** Currently elements do _not_ care about parent-states. + So if you want to affect childs you have to enable/disable them all. + The only exception to this are sub-elements which also check their parent. + */ virtual bool isEnabled() const { + if ( isSubElement() && IsEnabled && getParent() ) + return getParent()->isEnabled(); + _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; return IsEnabled; } @@ -540,7 +547,7 @@ public: //! Moves a child to the back, so it's siblings are drawn on top of it /** \return True if successful, false if not. */ - virtual bool bringToBack(IGUIElement* child) + virtual bool sendToBack(IGUIElement* child) { core::list::Iterator it = Children.begin(); if (child == (*it)) // already there diff --git a/include/IGUIElementFactory.h b/include/IGUIElementFactory.h index e203c2fb..09a43aa6 100644 --- a/include/IGUIElementFactory.h +++ b/include/IGUIElementFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIEnvironment.h b/include/IGUIEnvironment.h index 16dcd00f..fe5448f3 100644 --- a/include/IGUIEnvironment.h +++ b/include/IGUIEnvironment.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -174,6 +174,9 @@ public: \return Pointer to the font stored. This can differ from given parameter if the name previously existed. */ virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0; + //! remove loaded font + virtual void removeFont(IGUIFont* font) = 0; + //! Returns the default built-in font. /** \return Pointer to the default built-in font. This pointer should not be dropped. See IReferenceCounted::drop() for diff --git a/include/IGUIFileOpenDialog.h b/include/IGUIFileOpenDialog.h index 1531caaa..1ae48ea9 100644 --- a/include/IGUIFileOpenDialog.h +++ b/include/IGUIFileOpenDialog.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -14,6 +14,7 @@ namespace gui { //! Standard file chooser dialog. + /** When the user selects a folder this does change the current working directory */ class IGUIFileOpenDialog : public IGUIElement { public: diff --git a/include/IGUIFont.h b/include/IGUIFont.h index 60dea3d8..7ce3878f 100644 --- a/include/IGUIFont.h +++ b/include/IGUIFont.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIFontBitmap.h b/include/IGUIFontBitmap.h index 152ca106..d6a7592f 100644 --- a/include/IGUIFontBitmap.h +++ b/include/IGUIFontBitmap.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIImage.h b/include/IGUIImage.h index 55e62473..024fe33e 100644 --- a/include/IGUIImage.h +++ b/include/IGUIImage.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -25,10 +25,13 @@ namespace gui IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect rectangle) : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {} - //! Sets an image + //! Sets an image texture virtual void setImage(video::ITexture* image) = 0; - //! Sets the colour of the image + //! Gets the image texture + virtual video::ITexture* getImage() const = 0; + + //! Sets the color of the image virtual void setColor(video::SColor color) = 0; //! Sets if the image should scale to fit the element @@ -37,6 +40,9 @@ namespace gui //! Sets if the image should use its alpha channel to draw itself virtual void setUseAlphaChannel(bool use) = 0; + //! Gets the color of the image + virtual video::SColor getColor() const = 0; + //! Returns true if the image is scaled to fit, false if not virtual bool isImageScaled() const = 0; diff --git a/include/IGUIInOutFader.h b/include/IGUIInOutFader.h index 2d3bc49b..c556c5b0 100644 --- a/include/IGUIInOutFader.h +++ b/include/IGUIInOutFader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIListBox.h b/include/IGUIListBox.h index 9f53745b..4217fd7d 100644 --- a/include/IGUIListBox.h +++ b/include/IGUIListBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIMeshViewer.h b/include/IGUIMeshViewer.h index 5bc499f5..7199b224 100644 --- a/include/IGUIMeshViewer.h +++ b/include/IGUIMeshViewer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIScrollBar.h b/include/IGUIScrollBar.h index 3470108c..cd603f96 100644 --- a/include/IGUIScrollBar.h +++ b/include/IGUIScrollBar.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUISkin.h b/include/IGUISkin.h index 6a821656..49bae3db 100644 --- a/include/IGUISkin.h +++ b/include/IGUISkin.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -99,6 +99,15 @@ namespace gui EGDC_ICON, //! Selected icons in a list or tree EGDC_ICON_HIGH_LIGHT, + //! Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes + EGDC_GRAY_WINDOW_SYMBOL, + //! Window background for editable field (editbox, checkbox-field) + EGDC_EDITABLE, + //! Grayed (disabled) window background for editable field (editbox, checkbox-field) + EGDC_GRAY_EDITABLE, + //! Show focus of window background for editable field (editbox or when checkbox-field is pressed) + EGDC_FOCUSED_EDITABLE, + //! this value is not used, it only specifies the amount of default colors //! available. EGDC_COUNT @@ -128,6 +137,10 @@ namespace gui "WindowSymbol", "Icon", "IconHighlight", + "GrayWindowSymbol", + "Editable", + "GrayEditable", + "FocusedEditable", 0, }; diff --git a/include/IGUISpinBox.h b/include/IGUISpinBox.h index b55d911e..dbbf4832 100644 --- a/include/IGUISpinBox.h +++ b/include/IGUISpinBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Michael Zeilfelder +// Copyright (C) 2006-2011 Michael Zeilfelder // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUISpriteBank.h b/include/IGUISpriteBank.h index de4bd71b..17fbd240 100644 --- a/include/IGUISpriteBank.h +++ b/include/IGUISpriteBank.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIStaticText.h b/include/IGUIStaticText.h index 18cc2440..b9ab1ff0 100644 --- a/include/IGUIStaticText.h +++ b/include/IGUIStaticText.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -91,6 +91,12 @@ namespace gui /** If the text is broken, this returns the width of the widest line \return The width of the text, or the widest broken line. */ virtual s32 getTextWidth(void) const = 0; + + //! Set whether the text in this label should be clipped if it goes outside bounds + virtual void setTextRestrainedInside(bool restrainedInside) = 0; + + //! Checks if the text in this label should be clipped if it goes outside bounds + virtual bool isTextRestrainedInside() const = 0; }; diff --git a/include/IGUITabControl.h b/include/IGUITabControl.h index d423646d..1fc8746f 100644 --- a/include/IGUITabControl.h +++ b/include/IGUITabControl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -75,7 +75,7 @@ namespace gui //! Brings a tab to front. /** \param tab: pointer to the tab. \return Returns true if successful. */ - virtual bool setActiveTab(IGUIElement *tab) = 0; + virtual bool setActiveTab(IGUITab *tab) = 0; //! Returns which tab is currently active virtual s32 getActiveTab() const = 0; diff --git a/include/IGUITable.h b/include/IGUITable.h index d7d4c937..ff9f000a 100644 --- a/include/IGUITable.h +++ b/include/IGUITable.h @@ -1,4 +1,4 @@ -// Copyright (C) 2003-2009 Nikolaus Gebhardt +// Copyright (C) 2003-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -149,7 +149,7 @@ namespace gui //! clears the table rows, but keeps the columns intact virtual void clearRows() = 0; - //! Swap two row positions. This is useful for a custom ordering algo. + //! Swap two row positions. virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0; //! This tells the table to start ordering all the rows. diff --git a/include/IGUIToolbar.h b/include/IGUIToolbar.h index 962d624d..afcc43f2 100644 --- a/include/IGUIToolbar.h +++ b/include/IGUIToolbar.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGUIWindow.h b/include/IGUIWindow.h index c5fd2b3d..1ff1b144 100644 --- a/include/IGUIWindow.h +++ b/include/IGUIWindow.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IGeometryCreator.h b/include/IGeometryCreator.h index fcf66973..82889d58 100644 --- a/include/IGeometryCreator.h +++ b/include/IGeometryCreator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -60,9 +60,9 @@ public: */ IMesh* createPlaneMesh( const core::dimension2d& tileSize, - const core::dimension2d& tileCount, - video::SMaterial* material, - const core::dimension2d& textureRepeatCount) const + const core::dimension2d& tileCount=core::dimension2du(1,1), + video::SMaterial* material=0, + const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const { return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount); } diff --git a/include/IImage.h b/include/IImage.h index 308bb286..3905049d 100644 --- a/include/IImage.h +++ b/include/IImage.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -87,7 +87,7 @@ public: //! copies this surface into another virtual void copyTo(IImage* target, const core::position2d& pos, const core::rect& sourceRect, const core::rect* clipRect=0) =0; - //! copies this surface into another, using the alpha mask, an cliprect and a color to add with + //! copies this surface into another, using the alpha mask and cliprect and a color to add with virtual void copyToWithAlpha(IImage* target, const core::position2d& pos, const core::rect& sourceRect, const SColor &color, const core::rect* clipRect = 0) =0; @@ -95,7 +95,7 @@ public: //! copies this surface into another, scaling it to fit, appyling a box filter virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false) = 0; - //! fills the surface with black or white + //! fills the surface with given color virtual void fill(const SColor &color) =0; //! get the amount of Bits per Pixel of the given color format @@ -129,7 +129,7 @@ public: } //! test if the color format is only viable for RenderTarget textures - /** Since we don't have support for e.g. floating point iimage formats + /** Since we don't have support for e.g. floating point IImage formats one should test if the color format can be used for arbitrary usage, or if it is restricted to RTTs. */ static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format) diff --git a/include/IImageLoader.h b/include/IImageLoader.h index a9163582..b921b618 100644 --- a/include/IImageLoader.h +++ b/include/IImageLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IImageWriter.h b/include/IImageWriter.h index bbdaafd3..a00c033a 100644 --- a/include/IImageWriter.h +++ b/include/IImageWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IIndexBuffer.h b/include/IIndexBuffer.h index b8d3a7e0..54957fdd 100644 --- a/include/IIndexBuffer.h +++ b/include/IIndexBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ILightManager.h b/include/ILightManager.h index cb31e6f5..eaa4151c 100644 --- a/include/ILightManager.h +++ b/include/ILightManager.h @@ -1,5 +1,5 @@ // Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ILightSceneNode.h b/include/ILightSceneNode.h index 53e9f17f..0a322eb8 100644 --- a/include/ILightSceneNode.h +++ b/include/ILightSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ILogger.h b/include/ILogger.h index a07256b8..c238d1bb 100644 --- a/include/ILogger.h +++ b/include/ILogger.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMaterialRenderer.h b/include/IMaterialRenderer.h index 7c164432..205a59f9 100644 --- a/include/IMaterialRenderer.h +++ b/include/IMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMaterialRendererServices.h b/include/IMaterialRendererServices.h index df6ff8ba..e41df246 100644 --- a/include/IMaterialRendererServices.h +++ b/include/IMaterialRendererServices.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMesh.h b/include/IMesh.h index 17109bff..feae7b30 100644 --- a/include/IMesh.h +++ b/include/IMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMeshBuffer.h b/include/IMeshBuffer.h index 6054d0ab..beebee1f 100644 --- a/include/IMeshBuffer.h +++ b/include/IMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMeshCache.h b/include/IMeshCache.h index 5d470feb..3f8ed878 100644 --- a/include/IMeshCache.h +++ b/include/IMeshCache.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -49,14 +49,7 @@ namespace scene this name. */ virtual void addMesh(const io::path& name, IAnimatedMesh* mesh) = 0; - //! Removes a mesh from the cache. - /** After loading a mesh with getMesh(), the mesh can be - removed from the cache using this method, freeing a lot of - memory. - \param mesh Pointer to the mesh which shall be removed. */ - virtual void removeMesh(const IAnimatedMesh* const mesh) = 0; - - //! Removes a mesh from the cache. + //! Removes the mesh from the cache. /** After loading a mesh with getMesh(), the mesh can be removed from the cache using this method, freeing a lot of memory. @@ -71,12 +64,7 @@ namespace scene \return Number of meshes in cache. */ virtual u32 getMeshCount() const = 0; - //! Returns current index number of the mesh, and -1 if it is not in the cache. - /** \param mesh Pointer to the mesh to search for. - \return Index of the mesh in the cache, or -1 if not found. */ - virtual s32 getMeshIndex(const IAnimatedMesh* const mesh) const = 0; - - //! Returns current index number of the mesh, and -1 if it is not in the cache. + //! Returns current index number of the mesh or -1 when not found. /** \param mesh Pointer to the mesh to search for. \return Index of the mesh in the cache, or -1 if not found. */ virtual s32 getMeshIndex(const IMesh* const mesh) const = 0; @@ -104,13 +92,6 @@ namespace scene return getMeshName(index).getInternalName(); } - //! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename). - /** \deprecated Use getMeshName() instead. */ - _IRR_DEPRECATED_ const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const - { - return getMeshName(mesh).getInternalName(); - } - //! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename). /** \deprecated Use getMeshName() instead. */ _IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const @@ -125,13 +106,6 @@ namespace scene return renameMesh(index, filename); } - //! Renames a loaded mesh. - /** \deprecated Use renameMesh() instead. */ - _IRR_DEPRECATED_ bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename) - { - return renameMesh(mesh, filename); - } - //! Renames a loaded mesh. /** \deprecated Use renameMesh() instead. */ _IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename) @@ -149,12 +123,7 @@ namespace scene \return The name if mesh was found and has a name, else the path is empty. */ virtual const io::SNamedPath& getMeshName(u32 index) const = 0; - //! Get the name of a loaded mesh, if there is any. - /** \param mesh Pointer to mesh to query. - \return The name if mesh was found and has a name, else the path is empty. */ - virtual const io::SNamedPath& getMeshName(const IAnimatedMesh* const mesh) const = 0; - - //! Get the name of a loaded mesh, if there is any. + //! Get the name of the loaded mesh if there is any. /** \param mesh Pointer to mesh to query. \return The name if mesh was found and has a name, else the path is empty. */ virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0; @@ -168,16 +137,7 @@ namespace scene \return True if mesh was renamed. */ virtual bool renameMesh(u32 index, const io::path& name) = 0; - //! Renames a loaded mesh. - /** Note that renaming meshes might change the ordering of the - meshes, and so the index of the meshes as returned by - getMeshIndex() or taken by some methods will change. - \param mesh Mesh to be renamed. - \param name New name for the mesh. - \return True if mesh was renamed. */ - virtual bool renameMesh(const IAnimatedMesh* const mesh, const io::path& name) = 0; - - //! Renames a loaded mesh. + //! Renames the loaded mesh /** Note that renaming meshes might change the ordering of the meshes, and so the index of the meshes as returned by getMeshIndex() or taken by some methods will change. diff --git a/include/IMeshLoader.h b/include/IMeshLoader.h index 34964578..8c0b56d4 100644 --- a/include/IMeshLoader.h +++ b/include/IMeshLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMeshManipulator.h b/include/IMeshManipulator.h index fda04adf..97d85fb5 100644 --- a/include/IMeshManipulator.h +++ b/include/IMeshManipulator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMeshSceneNode.h b/include/IMeshSceneNode.h index 41206315..4e10ea90 100644 --- a/include/IMeshSceneNode.h +++ b/include/IMeshSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMeshWriter.h b/include/IMeshWriter.h index 9b8f095a..228729e0 100644 --- a/include/IMeshWriter.h +++ b/include/IMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IMetaTriangleSelector.h b/include/IMetaTriangleSelector.h index a4e07a4d..be78b5cb 100644 --- a/include/IMetaTriangleSelector.h +++ b/include/IMetaTriangleSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IOSOperator.h b/include/IOSOperator.h index 21ff0877..2b8ea36e 100644 --- a/include/IOSOperator.h +++ b/include/IOSOperator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleAffector.h b/include/IParticleAffector.h index f3d742cb..6dd3ae69 100644 --- a/include/IParticleAffector.h +++ b/include/IParticleAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleAnimatedMeshSceneNodeEmitter.h b/include/IParticleAnimatedMeshSceneNodeEmitter.h index f29b26a8..cf1f097d 100644 --- a/include/IParticleAnimatedMeshSceneNodeEmitter.h +++ b/include/IParticleAnimatedMeshSceneNodeEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleAttractionAffector.h b/include/IParticleAttractionAffector.h index 3ac81497..b2ef4206 100644 --- a/include/IParticleAttractionAffector.h +++ b/include/IParticleAttractionAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleBoxEmitter.h b/include/IParticleBoxEmitter.h index 5dd1e8a2..4a9312bc 100644 --- a/include/IParticleBoxEmitter.h +++ b/include/IParticleBoxEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleCylinderEmitter.h b/include/IParticleCylinderEmitter.h index ed66448f..63b9f213 100644 --- a/include/IParticleCylinderEmitter.h +++ b/include/IParticleCylinderEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleEmitter.h b/include/IParticleEmitter.h index 03c4c6e0..43ad7f42 100644 --- a/include/IParticleEmitter.h +++ b/include/IParticleEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -75,6 +75,15 @@ public: //! Set the minimum starting size for particles virtual void setMinStartSize( const core::dimension2df& size ) = 0; + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) = 0; + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0; + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0; + //! Get direction the emitter emits particles virtual const core::vector3df& getDirection() const = 0; @@ -96,6 +105,15 @@ public: //! Get the minimum starting size for particles virtual const core::dimension2df& getMinStartSize() const = 0; + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const = 0; + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const = 0; + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const = 0; + //! Get emitter type virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; } diff --git a/include/IParticleFadeOutAffector.h b/include/IParticleFadeOutAffector.h index 54f14da0..daa90f76 100644 --- a/include/IParticleFadeOutAffector.h +++ b/include/IParticleFadeOutAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -20,14 +20,14 @@ public: //! Sets the targetColor, i.e. the color the particles will interpolate to over time. virtual void setTargetColor( const video::SColor& targetColor ) = 0; - //! Sets the amount of time it takes for each particle to fade out. - virtual void setFadeOutTime( f32 fadeOutTime ) = 0; + //! Sets the time in milliseconds it takes for each particle to fade out (minimal 1 ms) + virtual void setFadeOutTime( u32 fadeOutTime ) = 0; //! Gets the targetColor, i.e. the color the particles will interpolate to over time. virtual const video::SColor& getTargetColor() const = 0; - //! Gets the amount of time it takes for each particle to fade out. - virtual f32 getFadeOutTime() const = 0; + //! Gets the time in milliseconds it takes for each particle to fade out. + virtual u32 getFadeOutTime() const = 0; //! Get emitter type virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_FADE_OUT; } diff --git a/include/IParticleGravityAffector.h b/include/IParticleGravityAffector.h index 45b6da31..fa9aee6c 100644 --- a/include/IParticleGravityAffector.h +++ b/include/IParticleGravityAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleMeshEmitter.h b/include/IParticleMeshEmitter.h index 69761faa..5787e138 100644 --- a/include/IParticleMeshEmitter.h +++ b/include/IParticleMeshEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleRingEmitter.h b/include/IParticleRingEmitter.h index 9c3c6b58..390f5c24 100644 --- a/include/IParticleRingEmitter.h +++ b/include/IParticleRingEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleRotationAffector.h b/include/IParticleRotationAffector.h index 58c743fd..098d19b4 100644 --- a/include/IParticleRotationAffector.h +++ b/include/IParticleRotationAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleSphereEmitter.h b/include/IParticleSphereEmitter.h index bc1b6eef..e711d025 100644 --- a/include/IParticleSphereEmitter.h +++ b/include/IParticleSphereEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IParticleSystemSceneNode.h b/include/IParticleSystemSceneNode.h index 5835ca07..92ee0b58 100644 --- a/include/IParticleSystemSceneNode.h +++ b/include/IParticleSystemSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -64,6 +64,9 @@ public: Default is true. */ virtual void setParticlesAreGlobal(bool global=true) = 0; + //! Remove all currently visible particles + virtual void clearParticles() = 0; + //! Gets the particle emitter, which creates the particles. /** \return The particle emitter. Can be 0 if none is set. */ virtual IParticleEmitter* getEmitter() =0; @@ -91,6 +94,10 @@ public: \param affector: New affector. */ virtual void addAffector(IParticleAffector* affector) = 0; + //! Get a list of all particle affectors. + /** \return The list of particle affectors attached to this node. */ + virtual const core::list& getAffectors() const = 0; + //! Removes all particle affectors in the particle system. virtual void removeAllAffectors() = 0; diff --git a/include/IQ3LevelMesh.h b/include/IQ3LevelMesh.h index a0008876..f0837471 100644 --- a/include/IQ3LevelMesh.h +++ b/include/IQ3LevelMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IQ3Shader.h b/include/IQ3Shader.h index 02dd7b3e..e00be85e 100644 --- a/include/IQ3Shader.h +++ b/include/IQ3Shader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2006-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IReadFile.h b/include/IReadFile.h index 6f67f5ca..b4991b1f 100644 --- a/include/IReadFile.h +++ b/include/IReadFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IReferenceCounted.h b/include/IReferenceCounted.h index 6ed9474b..4ba7d6af 100644 --- a/include/IReferenceCounted.h +++ b/include/IReferenceCounted.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneCollisionManager.h b/include/ISceneCollisionManager.h index 066140ae..0894e995 100644 --- a/include/ISceneCollisionManager.h +++ b/include/ISceneCollisionManager.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -40,7 +40,7 @@ namespace scene \return True if a collision was detected and false if not. */ virtual bool getCollisionPoint(const core::line3d& ray, ITriangleSelector* selector, core::vector3df& outCollisionPoint, - core::triangle3df& outTriangle, const ISceneNode*& outNode) =0; + core::triangle3df& outTriangle, ISceneNode*& outNode) =0; //! Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid. /** This can be used for moving a character in a 3d world: The @@ -73,7 +73,7 @@ namespace scene core::triangle3df& triout, core::vector3df& hitPosition, bool& outFalling, - const ISceneNode*& outNode, + ISceneNode*& outNode, f32 slidingSpeed = 0.0005f, const core::vector3df& gravityDirectionAndSpeed = core::vector3df(0.0f, 0.0f, 0.0f)) = 0; @@ -86,21 +86,25 @@ namespace scene at a length of the far value of the camera at a position which would be behind the 2d screen coodinates. */ virtual core::line3d getRayFromScreenCoordinates( - const core::position2d & pos, ICameraSceneNode* camera = 0) = 0; + const core::position2d& pos, ICameraSceneNode* camera = 0) = 0; //! Calculates 2d screen position from a 3d position. /** \param pos: 3D position in world space to be transformed into 2d. \param camera: Camera to be used. If null, the currently active camera is used. + \param useViewPort: Calculate screen coordinates relative to + the current view port. Please note that unless the driver does + not take care of the view port, it is usually best to get the + result in absolute screen coordinates (flag=false). \return 2d screen coordinates which a object in the 3d world would have if it would be rendered to the screen. If the 3d - position is behind the camera, it is set to (-10000,-10000). In + position is behind the camera, it is set to (-1000,-1000). In most cases you can ignore this fact, because if you use this method for drawing a decorator over a 3d object, it will be clipped by the screen borders. */ virtual core::position2d getScreenCoordinatesFrom3DPosition( - const core::vector3df & pos, ICameraSceneNode* camera=0) = 0; + const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0; //! Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera. /** The collision tests are done using a bounding box for each diff --git a/include/ISceneManager.h b/include/ISceneManager.h index f6b65b7c..e00db57f 100644 --- a/include/ISceneManager.h +++ b/include/ISceneManager.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -967,22 +967,22 @@ namespace scene //! add a static arrow mesh to the meshpool /** \param name Name of the mesh - \param vtxColor0 color of the cylinder - \param vtxColor1 color of the cone + \param vtxColorCylinder color of the cylinder + \param vtxColorCone color of the cone \param tesselationCylinder Number of quads the cylinder side consists of \param tesselationCone Number of triangles the cone's roof consits of \param height Total height of the arrow \param cylinderHeight Total height of the cylinder, should be lesser than total height - \param width0 Diameter of the cylinder - \param width1 Diameter of the cone's base, should be not smaller than the cylinder's diameter + \param widthCylinder Diameter of the cylinder + \param widthCone Diameter of the cone's base, should be not smaller than the cylinder's diameter \return Pointer to the arrow mesh if successful, otherwise 0. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ virtual IAnimatedMesh* addArrowMesh(const io::path& name, - video::SColor vtxColor0=0xFFFFFFFF, - video::SColor vtxColor1=0xFFFFFFFF, + video::SColor vtxColorCylinder=0xFFFFFFFF, + video::SColor vtxColorCone=0xFFFFFFFF, u32 tesselationCylinder=4, u32 tesselationCone=8, f32 height=1.f, f32 cylinderHeight=0.6f, - f32 width0=0.05f, f32 width1=0.3f) = 0; + f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0; //! add a static sphere mesh to the meshpool /** \param name Name of the mesh @@ -1433,12 +1433,15 @@ namespace scene The scene is usually written to an .irr file, an xml based format. .irr files can Be edited with the Irrlicht Engine Editor, irrEdit (http://irredit.irrlicht3d.org). To load .irr files again, see ISceneManager::loadScene(). - \param filename: Name of the file. - \param userDataSerializer: If you want to save some user data for every scene node into the + \param filename Name of the file. + \param userDataSerializer If you want to save some user data for every scene node into the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the top node of the scene. This node and all of its + descendants are saved into the scene file. Pass 0 or the scene manager to save the full + scene (which is also the default). \return True if successful. */ - virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0; + virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; //! Saves the current scene into a file. /** Scene nodes with the option isDebugObject set to true are not being saved. @@ -1449,8 +1452,11 @@ namespace scene \param userDataSerializer: If you want to save some user data for every scene node into the file, implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the top node of the scene. This node and all of its + descendants are saved into the scene file. Pass 0 or the scene manager to save the full + scene (which is also the default). \return True if successful. */ - virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0) = 0; + virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; //! Loads a scene. Note that the current scene is not cleared before. /** The scene is usually load from an .irr file, an xml based format. .irr files can @@ -1462,8 +1468,10 @@ namespace scene implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the root node of the scene. Pass 0 to add the scene + directly to the scene manager (which is also the default). \return True if successful. */ - virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0; + virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; //! Loads a scene. Note that the current scene is not cleared before. /** The scene is usually load from an .irr file, an xml based format. .irr files can @@ -1475,8 +1483,10 @@ namespace scene implement the ISceneUserDataSerializer interface and provide it as parameter here. Otherwise, simply specify 0 as this parameter. + \param node Node which is taken as the root node of the scene. Pass 0 to add the scene + directly to the scene manager (which is also the default). \return True if successful. */ - virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0) = 0; + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; //! Get a mesh writer implementation if available /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() diff --git a/include/ISceneNode.h b/include/ISceneNode.h index e1c429ad..1db3cf5a 100644 --- a/include/ISceneNode.h +++ b/include/ISceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneNodeAnimator.h b/include/ISceneNodeAnimator.h index 02c36149..1d5b26c6 100644 --- a/include/ISceneNodeAnimator.h +++ b/include/ISceneNodeAnimator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneNodeAnimatorCameraFPS.h b/include/ISceneNodeAnimatorCameraFPS.h index 5b21584d..4d552392 100644 --- a/include/ISceneNodeAnimatorCameraFPS.h +++ b/include/ISceneNodeAnimatorCameraFPS.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneNodeAnimatorCameraMaya.h b/include/ISceneNodeAnimatorCameraMaya.h index 15b0b869..338b824b 100644 --- a/include/ISceneNodeAnimatorCameraMaya.h +++ b/include/ISceneNodeAnimatorCameraMaya.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneNodeAnimatorCollisionResponse.h b/include/ISceneNodeAnimatorCollisionResponse.h index 41b137a4..e88d4cf9 100644 --- a/include/ISceneNodeAnimatorCollisionResponse.h +++ b/include/ISceneNodeAnimatorCollisionResponse.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -153,7 +153,7 @@ namespace scene virtual const core::vector3df & getCollisionResultPosition(void) const = 0; //! Returns the node that was collided with. - virtual const ISceneNode* getCollisionNode(void) const = 0; + virtual ISceneNode* getCollisionNode(void) const = 0; //! Sets a callback interface which will be called if a collision occurs. /** \param callback: collision callback handler that will be called when a collision diff --git a/include/ISceneNodeAnimatorFactory.h b/include/ISceneNodeAnimatorFactory.h index 589682b5..f6600e72 100644 --- a/include/ISceneNodeAnimatorFactory.h +++ b/include/ISceneNodeAnimatorFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneNodeFactory.h b/include/ISceneNodeFactory.h index 798f702e..8413335a 100644 --- a/include/ISceneNodeFactory.h +++ b/include/ISceneNodeFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISceneUserDataSerializer.h b/include/ISceneUserDataSerializer.h index 33c299da..aeef5395 100644 --- a/include/ISceneUserDataSerializer.h +++ b/include/ISceneUserDataSerializer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IShaderConstantSetCallBack.h b/include/IShaderConstantSetCallBack.h index 6931e0f3..21418d6a 100644 --- a/include/IShaderConstantSetCallBack.h +++ b/include/IShaderConstantSetCallBack.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -12,6 +12,7 @@ namespace irr namespace video { class IMaterialRendererServices; + class SMaterial; //! Interface making it possible to set constants for gpu programs every frame. /** Implement this interface in an own class and pass a pointer to it to one of diff --git a/include/IShadowVolumeSceneNode.h b/include/IShadowVolumeSceneNode.h index e0e838f6..6b2e5370 100644 --- a/include/IShadowVolumeSceneNode.h +++ b/include/IShadowVolumeSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ISkinnedMesh.h b/include/ISkinnedMesh.h index fe59f025..0cb3f90a 100644 --- a/include/ISkinnedMesh.h +++ b/include/ISkinnedMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ITerrainSceneNode.h b/include/ITerrainSceneNode.h index 88f64533..3f2f02c3 100644 --- a/include/ITerrainSceneNode.h +++ b/include/ITerrainSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ITextSceneNode.h b/include/ITextSceneNode.h index 9542199e..d7b73955 100644 --- a/include/ITextSceneNode.h +++ b/include/ITextSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/ITexture.h b/include/ITexture.h index 227fbf37..7a4daca1 100644 --- a/include/ITexture.h +++ b/include/ITexture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -70,6 +70,21 @@ enum E_TEXTURE_CREATION_FLAG ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff }; +//! Enum for the mode for texture locking. Read-Only, write-only or read/write. +enum E_TEXTURE_LOCK_MODE +{ + //! The default mode. Texture can be read and written to. + ETLM_READ_WRITE = 0, + + //! Read only. The texture is downloaded, but not uploaded again. + /** Often used to read back shader generated textures. */ + ETLM_READ_ONLY, + + //! Write only. The texture is not downloaded and might be uninitialised. + /** The updated texture is uploaded to the GPU. + Used for initialising the shader from the CPU. */ + ETLM_WRITE_ONLY +}; //! Interface of a Video Driver dependent Texture. /** An ITexture is created by an IVideoDriver by using IVideoDriver::addTexture @@ -99,14 +114,17 @@ public: unlocked. The size of the i-th mipmap level is defined as max(getSize().Width>>i,1) and max(getSize().Height>>i,1) - \param readOnly Specifies that no changes to the locked texture are - made. Unspecified behavior will arise if still write access happens. + \param mode Specifies what kind of changes to the locked texture are + allowed. Unspecified behavior will arise if texture is written in read + only mode or read from in write only mode. + Support for this feature depends on the driver, so don't rely on the + texture being write-protected when locking with read-only, etc. \param mipmapLevel Number of the mipmapLevel to lock. 0 is main texture. Non-existing levels will silently fail and return 0. \return Returns a pointer to the pixel data. The format of the pixel can be determined by using getColorFormat(). 0 is returned, if the texture cannot be locked. */ - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0) = 0; + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) = 0; //! Unlock function. Must be called after a lock() to the texture. /** One should avoid to call unlock more than once before another lock. diff --git a/include/ITimer.h b/include/ITimer.h index 104225ee..aa32895f 100644 --- a/include/ITimer.h +++ b/include/ITimer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -25,6 +25,41 @@ public: */ virtual u32 getRealTime() const = 0; + enum EWeekday + { + EWD_SUNDAY=0, + EWD_MONDAY, + EWD_TUESDAY, + EWD_WEDNESDAY, + EWD_THURSDAY, + EWD_FRIDAY, + EWD_SATURDAY + }; + + struct RealTimeDate + { + // Hour of the day, from 0 to 23 + u32 Hour; + // Minute of the hour, from 0 to 59 + u32 Minute; + // Second of the minute, due to extra seconds from 0 to 61 + u32 Second; + // Year of the gregorian calender + s32 Year; + // Month of the year, from 1 to 12 + u32 Month; + // Day of the month, from 1 to 31 + u32 Day; + // Weekday for the current day + EWeekday Weekday; + // Day of the year, from 1 to 366 + u32 Yearday; + // Whether daylight saving is on + bool IsDST; + }; + + virtual RealTimeDate getRealTimeAndDate() const = 0; + //! Returns current virtual time in milliseconds. /** This value starts with 0 and can be manipulated using setTime(), stopTimer(), startTimer(), etc. This value depends on the set speed of diff --git a/include/ITriangleSelector.h b/include/ITriangleSelector.h index b47e6367..e3ba5b78 100644 --- a/include/ITriangleSelector.h +++ b/include/ITriangleSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -83,7 +83,7 @@ public: selector. If there is more than one scene node associated (e.g. for an IMetaTriangleSelector) this this function may be called multiple times to retrieve all triangles. - + Please note that unoptimized triangle selectors also may return triangles which are not in contact at all with the 3d line. \param triangles: Array where the resulting triangles will be written @@ -110,7 +110,7 @@ public: the associated scene node. \return The scene node associated with that triangle. */ - virtual const ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0; + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0; }; diff --git a/include/IVertexBuffer.h b/include/IVertexBuffer.h index c90a0f7e..7f93ced5 100644 --- a/include/IVertexBuffer.h +++ b/include/IVertexBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IVideoDriver.h b/include/IVideoDriver.h index 9044ae8b..4bef5ac4 100644 --- a/include/IVideoDriver.h +++ b/include/IVideoDriver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -222,6 +222,15 @@ namespace video TargetType(target), ColorMask(colorMask), BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst), BlendEnable(blendEnable) {} + bool operator!=(const IRenderTarget& other) const + { + return ((RenderTexture != other.RenderTexture) || + (TargetType != other.TargetType) || + (ColorMask != other.ColorMask) || + (BlendFuncSrc != other.BlendFuncSrc) || + (BlendFuncDst != other.BlendFuncDst) || + (BlendEnable != other.BlendEnable)); + } ITexture* RenderTexture; E_RENDER_TARGET TargetType:8; E_COLOR_PLANE ColorMask:8; @@ -284,6 +293,25 @@ namespace video \param flag When true the feature is disabled, otherwise it is enabled. */ virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0; + //! Get attributes of the actual video driver + /** The following names can be queried for the given types: + MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. + MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. + MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. + MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. + MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. + MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL + MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. + MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). + MaxTextureSize (int) Dimension that a texture may have, both in width and height. + MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. + MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. + Version (int) Version of the driver. Should be Major*100+Minor + ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. + AntiAlias (int) Number of Samples the driver uses for each pixel. 0 and 1 means anti aliasing is off, typical values are 2,4,8,16,32 + */ + virtual const io::IAttributes& getDriverAttributes() const=0; + //! Check if the driver was recently reset. /** For d3d devices you will need to recreate the RTTs if the driver was reset. Should be queried right after beginScene(). @@ -1421,4 +1449,3 @@ namespace video #endif - diff --git a/include/IVideoModeList.h b/include/IVideoModeList.h index 57ba857e..87123a48 100644 --- a/include/IVideoModeList.h +++ b/include/IVideoModeList.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IVolumeLightSceneNode.h b/include/IVolumeLightSceneNode.h index 36528a3d..cfe1aeff 100644 --- a/include/IVolumeLightSceneNode.h +++ b/include/IVolumeLightSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/include/IWriteFile.h b/include/IWriteFile.h index 82e2a815..dfb3fd95 100644 --- a/include/IWriteFile.h +++ b/include/IWriteFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IXMLReader.h b/include/IXMLReader.h index d0bec498..f8277e36 100644 --- a/include/IXMLReader.h +++ b/include/IXMLReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IXMLWriter.h b/include/IXMLWriter.h index d75e0fdd..9efc1fac 100644 --- a/include/IXMLWriter.h +++ b/include/IXMLWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index 7d8009ae..f3b5c842 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -7,12 +7,12 @@ //! Irrlicht SDK Version #define IRRLICHT_VERSION_MAJOR 1 -#define IRRLICHT_VERSION_MINOR 7 -#define IRRLICHT_VERSION_REVISION 1 +#define IRRLICHT_VERSION_MINOR 8 +#define IRRLICHT_VERSION_REVISION 0 // This flag will be defined only in SVN, the official release code will have // it undefined #define IRRLICHT_VERSION_SVN -beta -#define IRRLICHT_SDK_VERSION "1.7.1-beta" +#define IRRLICHT_SDK_VERSION "1.8.0-alpha" #include // TODO: Although included elsewhere this is required at least for mingw @@ -39,12 +39,24 @@ //! _IRR_COMPILE_WITH_IPHONE_DEVICE_ for UIKit windowing on iPhoneOS (aka embeded OSX) //! _IRR_COMPILE_WITH_FB_DEVICE_ for framebuffer systems +//! Passing defines to the compiler which have NO in front of the _IRR definename is an alternative +//! way which can be used to disable defines (instead of outcommenting them in this header). +//! So defines can be controlled from Makefiles or Projectfiles which allows building +//! different library versions without having to change the sources. +//! Example: NO_IRR_COMPILE_WITH_X11_ would disable X11 + //! Uncomment this line to compile with the SDL device //#define _IRR_COMPILE_WITH_SDL_DEVICE_ +#ifdef NO_IRR_COMPILE_WITH_SDL_DEVICE_ +#undef _IRR_COMPILE_WITH_SDL_DEVICE_ +#endif //! Comment this line to compile without the fallback console device. #define _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#ifdef NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#undef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ +#endif //! WIN32 for Windows32 //! WIN64 for Windows64 @@ -103,8 +115,13 @@ #define _IRR_COMPILE_WITH_X11_DEVICE_ #endif + //! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events. #define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#ifdef NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#endif + //! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht. #define _IRR_MATERIAL_MAX_TEXTURES_ 4 @@ -130,12 +147,22 @@ headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one. // #define _IRR_COMPILE_WITH_DIRECT3D_8_ #define _IRR_COMPILE_WITH_DIRECT3D_9_ +#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_8_ +#undef _IRR_COMPILE_WITH_DIRECT3D_8_ +#endif +#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_9_ +#undef _IRR_COMPILE_WITH_DIRECT3D_9_ +#endif + #endif //! Define _IRR_COMPILE_WITH_OPENGL_ to compile the Irrlicht engine with OpenGL. /** If you do not wish the engine to be compiled with OpenGL, comment this define out. */ #define _IRR_COMPILE_WITH_OPENGL_ +#ifdef NO_IRR_COMPILE_WITH_OPENGL_ +#undef _IRR_COMPILE_WITH_OPENGL_ +#endif //! Define _IRR_COMPILE_WITH_OGLES1_ to compile the Irrlicht engine with OpenGL-ES 1.x. /** If you do not wish the engine to be compiled with OpenGL-ES 1.x, comment @@ -159,16 +186,25 @@ if using this driver, to avoid problems with the ogl-es emulators. /** If you do not need the software driver, or want to use Burning's Video instead, comment this define out */ #define _IRR_COMPILE_WITH_SOFTWARE_ +#ifdef NO_IRR_COMPILE_WITH_SOFTWARE_ +#undef _IRR_COMPILE_WITH_SOFTWARE_ +#endif //! Define _IRR_COMPILE_WITH_BURNINGSVIDEO_ to compile the Irrlicht engine with Burning's video driver /** If you do not need this software driver, you can comment this define out. */ #define _IRR_COMPILE_WITH_BURNINGSVIDEO_ +#ifdef NO_IRR_COMPILE_WITH_BURNINGSVIDEO_ +#undef _IRR_COMPILE_WITH_BURNINGSVIDEO_ +#endif //! Define _IRR_COMPILE_WITH_X11_ to compile the Irrlicht engine with X11 support. /** If you do not wish the engine to be compiled with X11, comment this define out. */ // Only used in LinuxDevice. #define _IRR_COMPILE_WITH_X11_ +#ifdef NO_IRR_COMPILE_WITH_X11_ +#undef _IRR_COMPILE_WITH_X11_ +#endif //! Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL driver should use OpenGL extensions via function pointers. /** On some systems there is no support for the dynamic extension of OpenGL @@ -196,42 +232,71 @@ define out. */ #if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_) #define _IRR_LINUX_X11_VIDMODE_ //#define _IRR_LINUX_X11_RANDR_ -#define _IRR_LINUX_XCURSOR_ +#ifdef NO_IRR_LINUX_X11_VIDMODE_ +#undef _IRR_LINUX_X11_VIDMODE_ +#endif +#ifdef NO_IRR_LINUX_X11_RANDR_ +#undef _IRR_LINUX_X11_RANDR_ +#endif + +//! X11 has by default only monochrome cursors, but using the Xcursor library we can also get color cursor support. +//! If you have the need for custom color cursors on X11 then enable this and make sure you also link +//! to the Xcursor library in your Makefile/Projectfile. +//#define _IRR_LINUX_XCURSOR_ +#ifdef NO_IRR_LINUX_XCURSOR_ +#undef _IRR_LINUX_XCURSOR_ +#endif + #endif //! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI /** Disable this if you are using an external library to draw the GUI. If you disable this then you will not be able to use anything provided by the GUI Environment, including loading fonts. */ #define _IRR_COMPILE_WITH_GUI_ - +#ifdef NO_IRR_COMPILE_WITH_GUI_ +#undef _IRR_COMPILE_WITH_GUI_ +#endif //! Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine. /** This enables the engine to read/write from unicode filesystem. If you disable this feature, the engine behave as before (ansi). This is currently only supported for Windows based systems. */ //#define _IRR_WCHAR_FILESYSTEM +#ifdef NO_IRR_WCHAR_FILESYSTEM +#undef _IRR_WCHAR_FILESYSTEM +#endif //! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg. /** This enables the engine to read jpeg images. If you comment this out, the engine will no longer read .jpeg images. */ #define _IRR_COMPILE_WITH_LIBJPEG_ +#ifdef NO_IRR_COMPILE_WITH_LIBJPEG_ +#undef _IRR_COMPILE_WITH_LIBJPEG_ +#endif //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht. /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */ #define _IRR_USE_NON_SYSTEM_JPEG_LIB_ - +#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ +#undef _IRR_USE_NON_SYSTEM_JPEG_LIB_ +#endif //! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng. /** This enables the engine to read png images. If you comment this out, the engine will no longer read .png images. */ #define _IRR_COMPILE_WITH_LIBPNG_ +#ifdef NO_IRR_COMPILE_WITH_LIBPNG_ +#undef _IRR_COMPILE_WITH_LIBPNG_ +#endif //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht. /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system. This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */ #define _IRR_USE_NON_SYSTEM_LIB_PNG_ - +#ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_ +#undef _IRR_USE_NON_SYSTEM_LIB_PNG_ +#endif //! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9 /** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h, @@ -244,6 +309,9 @@ the file you want to debug into visual studio. That's it. You can now set breakp watch registers, variables etc. This works with ASM, HLSL, and both with pixel and vertex shaders. Note that the engine will run in D3D REF for this, which is a lot slower than HAL. */ #define _IRR_D3D_NO_SHADER_DEBUGGING +#ifdef NO_IRR_D3D_NO_SHADER_DEBUGGING +#undef _IRR_D3D_NO_SHADER_DEBUGGING +#endif //! Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs /** This enables support for ps_1_x shaders for recent DX SDKs. Otherwise, support @@ -251,6 +319,9 @@ for this shader model is not available anymore in SDKs after Oct2006. You need t distribute the OCT2006_d3dx9_31_x86.cab or OCT2006_d3dx9_31_x64.cab though, in order to provide the user with the proper DLL. That's why it's disabled by default. */ //#define _IRR_D3D_USE_LEGACY_HLSL_COMPILER +#ifdef NO_IRR_D3D_USE_LEGACY_HLSL_COMPILER +#undef _IRR_D3D_USE_LEGACY_HLSL_COMPILER +#endif //! Define _IRR_USE_NVIDIA_PERFHUD_ to opt-in to using the nVidia PerHUD tool /** Enable, by opting-in, to use the nVidia PerfHUD performance analysis driver @@ -287,75 +358,171 @@ tool . */ /** animated meshes. If you compile without this, you will be unable to load B3D, MS3D or X meshes */ #define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#ifdef NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#undef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ +#endif #ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ //! Define _IRR_COMPILE_WITH_B3D_LOADER_ if you want to use Blitz3D files #define _IRR_COMPILE_WITH_B3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_B3D_LOADER_ +#undef _IRR_COMPILE_WITH_B3D_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_MS3D_LOADER_ if you want to Milkshape files #define _IRR_COMPILE_WITH_MS3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MS3D_LOADER_ +#undef _IRR_COMPILE_WITH_MS3D_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_X_LOADER_ if you want to use Microsoft X files #define _IRR_COMPILE_WITH_X_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_X_LOADER_ +#undef _IRR_COMPILE_WITH_X_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_OGRE_LOADER_ if you want to load Ogre 3D files #define _IRR_COMPILE_WITH_OGRE_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_ +#undef _IRR_COMPILE_WITH_OGRE_LOADER_ #endif +#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ //! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files #define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files #define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#undef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files #define _IRR_COMPILE_WITH_MD2_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MD2_LOADER_ +#undef _IRR_COMPILE_WITH_MD2_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files #define _IRR_COMPILE_WITH_MD3_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MD3_LOADER_ +#undef _IRR_COMPILE_WITH_MD3_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files #define _IRR_COMPILE_WITH_3DS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_3DS_LOADER_ +#undef _IRR_COMPILE_WITH_3DS_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files #define _IRR_COMPILE_WITH_COLLADA_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_COLLADA_LOADER_ +#undef _IRR_COMPILE_WITH_COLLADA_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_CSM_LOADER_ if you want to load Cartography Shop files #define _IRR_COMPILE_WITH_CSM_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_CSM_LOADER_ +#undef _IRR_COMPILE_WITH_CSM_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_BSP_LOADER_ if you want to load Quake 3 BSP files #define _IRR_COMPILE_WITH_BSP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_BSP_LOADER_ +#undef _IRR_COMPILE_WITH_BSP_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_DMF_LOADER_ if you want to load DeleD files #define _IRR_COMPILE_WITH_DMF_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_DMF_LOADER_ +#undef _IRR_COMPILE_WITH_DMF_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_LMTS_LOADER_ if you want to load LMTools files #define _IRR_COMPILE_WITH_LMTS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LMTS_LOADER_ +#undef _IRR_COMPILE_WITH_LMTS_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_MY3D_LOADER_ if you want to load MY3D files #define _IRR_COMPILE_WITH_MY3D_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_MY3D_LOADER_ +#undef _IRR_COMPILE_WITH_MY3D_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_OBJ_LOADER_ if you want to load Wavefront OBJ files #define _IRR_COMPILE_WITH_OBJ_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OBJ_LOADER_ +#undef _IRR_COMPILE_WITH_OBJ_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_OCT_LOADER_ if you want to load FSRad OCT files #define _IRR_COMPILE_WITH_OCT_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_OCT_LOADER_ +#undef _IRR_COMPILE_WITH_OCT_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_LWO_LOADER_ if you want to load Lightwave3D files #define _IRR_COMPILE_WITH_LWO_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LWO_LOADER_ +#undef _IRR_COMPILE_WITH_LWO_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_STL_LOADER_ if you want to load stereolithography files #define _IRR_COMPILE_WITH_STL_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_STL_LOADER_ +#undef _IRR_COMPILE_WITH_STL_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_PLY_LOADER_ if you want to load Polygon (Stanford Triangle) files #define _IRR_COMPILE_WITH_PLY_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PLY_LOADER_ +#undef _IRR_COMPILE_WITH_PLY_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_IRR_WRITER_ if you want to write static .irrMesh files #define _IRR_COMPILE_WITH_IRR_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_IRR_WRITER_ +#undef _IRR_COMPILE_WITH_IRR_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_COLLADA_WRITER_ if you want to write Collada files #define _IRR_COMPILE_WITH_COLLADA_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_COLLADA_WRITER_ +#undef _IRR_COMPILE_WITH_COLLADA_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_STL_WRITER_ if you want to write .stl files #define _IRR_COMPILE_WITH_STL_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_STL_WRITER_ +#undef _IRR_COMPILE_WITH_STL_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_OBJ_WRITER_ if you want to write .obj files #define _IRR_COMPILE_WITH_OBJ_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_OBJ_WRITER_ +#undef _IRR_COMPILE_WITH_OBJ_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_PLY_WRITER_ if you want to write .ply files #define _IRR_COMPILE_WITH_PLY_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PLY_WRITER_ +#undef _IRR_COMPILE_WITH_PLY_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files //! Disabling this loader will also disable the built-in font #define _IRR_COMPILE_WITH_BMP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_BMP_LOADER_ +#undef _IRR_COMPILE_WITH_BMP_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files #define _IRR_COMPILE_WITH_JPG_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_JPG_LOADER_ +#undef _IRR_COMPILE_WITH_JPG_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_PCX_LOADER_ if you want to load .pcx files #define _IRR_COMPILE_WITH_PCX_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PCX_LOADER_ +#undef _IRR_COMPILE_WITH_PCX_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_PNG_LOADER_ if you want to load .png files #define _IRR_COMPILE_WITH_PNG_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PNG_LOADER_ +#undef _IRR_COMPILE_WITH_PNG_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_PPM_LOADER_ if you want to load .ppm/.pgm/.pbm files #define _IRR_COMPILE_WITH_PPM_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PPM_LOADER_ +#undef _IRR_COMPILE_WITH_PPM_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files #define _IRR_COMPILE_WITH_PSD_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_ +#undef _IRR_COMPILE_WITH_PSD_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files // Outcommented because // a) it doesn't compile on 64-bit currently @@ -363,72 +530,144 @@ B3D, MS3D or X meshes */ // is patented in the US by S3 and they do collect license fees when it's used in applications. // So if you are unfortunate enough to develop applications for US market and their broken patent system be careful. // #define _IRR_COMPILE_WITH_DDS_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_DDS_LOADER_ +#undef _IRR_COMPILE_WITH_DDS_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_ +#undef _IRR_COMPILE_WITH_TGA_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files #define _IRR_COMPILE_WITH_WAL_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_WAL_LOADER_ +#undef _IRR_COMPILE_WITH_WAL_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files #define _IRR_COMPILE_WITH_LMP_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_LMP_LOADER_ +#undef _IRR_COMPILE_WITH_LMP_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files #define _IRR_COMPILE_WITH_RGB_LOADER_ +#ifdef NO_IRR_COMPILE_WITH_RGB_LOADER_ +#undef _IRR_COMPILE_WITH_RGB_LOADER_ +#endif //! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files #define _IRR_COMPILE_WITH_BMP_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_BMP_WRITER_ +#undef _IRR_COMPILE_WITH_BMP_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_JPG_WRITER_ if you want to write .jpg files #define _IRR_COMPILE_WITH_JPG_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_JPG_WRITER_ +#undef _IRR_COMPILE_WITH_JPG_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_PCX_WRITER_ if you want to write .pcx files #define _IRR_COMPILE_WITH_PCX_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PCX_WRITER_ +#undef _IRR_COMPILE_WITH_PCX_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_PNG_WRITER_ if you want to write .png files #define _IRR_COMPILE_WITH_PNG_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PNG_WRITER_ +#undef _IRR_COMPILE_WITH_PNG_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_PPM_WRITER_ if you want to write .ppm files #define _IRR_COMPILE_WITH_PPM_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PPM_WRITER_ +#undef _IRR_COMPILE_WITH_PPM_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_PSD_WRITER_ if you want to write .psd files #define _IRR_COMPILE_WITH_PSD_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_PSD_WRITER_ +#undef _IRR_COMPILE_WITH_PSD_WRITER_ +#endif //! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files #define _IRR_COMPILE_WITH_TGA_WRITER_ +#ifdef NO_IRR_COMPILE_WITH_TGA_WRITER_ +#undef _IRR_COMPILE_WITH_TGA_WRITER_ +#endif //! Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives /** ZIP reading has several more options below to configure. */ #define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ +#endif #ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ //! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib. /** This enables the engine to read from compressed .zip archives. If you disable this feature, the engine can still read archives, but only uncompressed ones. */ #define _IRR_COMPILE_WITH_ZLIB_ +#ifdef NO_IRR_COMPILE_WITH_ZLIB_ +#undef _IRR_COMPILE_WITH_ZLIB_ +#endif //! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht. /** If this is commented out, Irrlicht will try to compile using the zlib installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is defined. */ #define _IRR_USE_NON_SYSTEM_ZLIB_ +#ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_ +#undef _IRR_USE_NON_SYSTEM_ZLIB_ +#endif //! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives #define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#undef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ +#endif //! Define _IRR_COMPILE_WITH_BZIP2_ if you want to support bzip2 compressed zip archives /** bzip2 is superior to the original zip file compression modes, but requires a certain amount of memory for decompression and adds several files to the library. */ #define _IRR_COMPILE_WITH_BZIP2_ +#ifdef NO_IRR_COMPILE_WITH_BZIP2_ +#undef _IRR_COMPILE_WITH_BZIP2_ +#endif //! Define _IRR_USE_NON_SYSTEM_BZLIB_ to let irrlicht use the bzlib which comes with irrlicht. /** If this is commented out, Irrlicht will try to compile using the bzlib installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is defined. */ #define _IRR_USE_NON_SYSTEM_BZLIB_ +#ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_ +#undef _IRR_USE_NON_SYSTEM_BZLIB_ +#endif //! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files. /** LZMA is a very efficient compression code, known from 7zip. Irrlicht currently only supports zip archives, though. */ #define _IRR_COMPILE_WITH_LZMA_ +#ifdef NO_IRR_COMPILE_WITH_LZMA_ +#undef _IRR_COMPILE_WITH_LZMA_ +#endif #endif //! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives #define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ +#endif //! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives #define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ +#endif //! Define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ if you want to open Nebula Device NPK archives #define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ +#endif //! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives #define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ +#endif //! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives #define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#ifdef NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#undef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ +#endif //! Set FPU settings /** Irrlicht should use approximate float and integer fpu techniques @@ -436,6 +675,9 @@ precision will be lower but speed higher. currently X86 only */ #if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_) //#define IRRLICHT_FAST_MATH + #ifdef NO_IRRLICHT_FAST_MATH + #undef IRRLICHT_FAST_MATH + #endif #endif // Some cleanup and standard stuff diff --git a/include/IrrlichtDevice.h b/include/IrrlichtDevice.h index 5c003b5a..ded21568 100644 --- a/include/IrrlichtDevice.h +++ b/include/IrrlichtDevice.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/Keycodes.h b/include/Keycodes.h index 2310f6d6..0d69ce03 100644 --- a/include/Keycodes.h +++ b/include/Keycodes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/S3DVertex.h b/include/S3DVertex.h index 19722014..6a8c6a32 100644 --- a/include/S3DVertex.h +++ b/include/S3DVertex.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SAnimatedMesh.h b/include/SAnimatedMesh.h index 4cf427af..46c84dbe 100644 --- a/include/SAnimatedMesh.h +++ b/include/SAnimatedMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SColor.h b/include/SColor.h index fec4fe16..61cc1596 100644 --- a/include/SColor.h +++ b/include/SColor.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SExposedVideoData.h b/include/SExposedVideoData.h index 81feccc3..76b525c0 100644 --- a/include/SExposedVideoData.h +++ b/include/SExposedVideoData.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SIrrCreationParameters.h b/include/SIrrCreationParameters.h index 8b9943a0..a8839488 100644 --- a/include/SIrrCreationParameters.h +++ b/include/SIrrCreationParameters.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -36,8 +36,13 @@ namespace irr HighPrecisionFPU(false), EventReceiver(0), WindowId(0), +#ifdef _DEBUG + LoggingLevel(ELL_DEBUG), +#else LoggingLevel(ELL_INFORMATION), +#endif DisplayAdapter(0), + UsePerformanceTimer(true), SDK_version_do_not_use(IRRLICHT_SDK_VERSION) { } @@ -66,6 +71,7 @@ namespace irr WindowId = other.WindowId; LoggingLevel = other.LoggingLevel; DisplayAdapter = other.DisplayAdapter; + UsePerformanceTimer = other.UsePerformanceTimer; return *this; } @@ -245,6 +251,13 @@ namespace irr /** So far only supported on D3D */ u32 DisplayAdapter; + //! Enables use of high performance timers on Windows platform. + /** When performance timers are not used, standard GetTickCount() + is used instead which usually has worse resolution, but also less + problems with speed stepping and other techniques. + */ + bool UsePerformanceTimer; + //! Don't use or change this parameter. /** Always set it to IRRLICHT_SDK_VERSION, which is done by default. This is needed for sdk version checks. */ diff --git a/include/SKeyMap.h b/include/SKeyMap.h index e6dd929b..c9c1847d 100644 --- a/include/SKeyMap.h +++ b/include/SKeyMap.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SLight.h b/include/SLight.h index c30312ed..8151b8c4 100644 --- a/include/SLight.h +++ b/include/SLight.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMaterial.h b/include/SMaterial.h index 8d4d3f09..d1b52ab6 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMaterialLayer.h b/include/SMaterialLayer.h index 77adfdce..63475c8d 100644 --- a/include/SMaterialLayer.h +++ b/include/SMaterialLayer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMesh.h b/include/SMesh.h index a5804d3f..97962128 100644 --- a/include/SMesh.h +++ b/include/SMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMeshBuffer.h b/include/SMeshBuffer.h index 2ae24d3f..8bf6fa42 100644 --- a/include/SMeshBuffer.h +++ b/include/SMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMeshBufferLightMap.h b/include/SMeshBufferLightMap.h index 2ae24d3f..8bf6fa42 100644 --- a/include/SMeshBufferLightMap.h +++ b/include/SMeshBufferLightMap.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SMeshBufferTangents.h b/include/SMeshBufferTangents.h index 2ae24d3f..8bf6fa42 100644 --- a/include/SMeshBufferTangents.h +++ b/include/SMeshBufferTangents.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SParticle.h b/include/SParticle.h index f3c534d9..62330300 100644 --- a/include/SParticle.h +++ b/include/SParticle.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SSharedMeshBuffer.h b/include/SSharedMeshBuffer.h index 260d81a4..4e76afd6 100644 --- a/include/SSharedMeshBuffer.h +++ b/include/SSharedMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SSkinMeshBuffer.h b/include/SSkinMeshBuffer.h index 88727cf3..eaa202d0 100644 --- a/include/SSkinMeshBuffer.h +++ b/include/SSkinMeshBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SVertexIndex.h b/include/SVertexIndex.h index 425a0410..67b9d188 100644 --- a/include/SVertexIndex.h +++ b/include/SVertexIndex.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Nikolaus Gebhardt +// Copyright (C) 2008-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SVertexManipulator.h b/include/SVertexManipulator.h index 097eb9c1..852fbff2 100644 --- a/include/SVertexManipulator.h +++ b/include/SVertexManipulator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Christian Stehno +// Copyright (C) 2009-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/SViewFrustum.h b/include/SViewFrustum.h index 6c97c26f..9b6fff01 100644 --- a/include/SViewFrustum.h +++ b/include/SViewFrustum.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -72,6 +72,18 @@ namespace scene //! returns the point which is on the far right bottom corner inside the the view frustum. core::vector3df getFarRightDown() const; + //! returns the point which is on the near left upper corner inside the the view frustum. + core::vector3df getNearLeftUp() const; + + //! returns the point which is on the near left bottom corner inside the the view frustum. + core::vector3df getNearLeftDown() const; + + //! returns the point which is on the near right top corner inside the the view frustum. + core::vector3df getNearRightUp() const; + + //! returns the point which is on the near right bottom corner inside the the view frustum. + core::vector3df getNearRightDown() const; + //! returns a bounding box enclosing the whole view frustum const core::aabbox3d &getBoundingBox() const; @@ -183,6 +195,46 @@ namespace scene return p; } + inline core::vector3df SViewFrustum::getNearLeftUp() const + { + core::vector3df p; + planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( + planes[scene::SViewFrustum::VF_TOP_PLANE], + planes[scene::SViewFrustum::VF_LEFT_PLANE], p); + + return p; + } + + inline core::vector3df SViewFrustum::getNearLeftDown() const + { + core::vector3df p; + planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( + planes[scene::SViewFrustum::VF_BOTTOM_PLANE], + planes[scene::SViewFrustum::VF_LEFT_PLANE], p); + + return p; + } + + inline core::vector3df SViewFrustum::getNearRightUp() const + { + core::vector3df p; + planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( + planes[scene::SViewFrustum::VF_TOP_PLANE], + planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); + + return p; + } + + inline core::vector3df SViewFrustum::getNearRightDown() const + { + core::vector3df p; + planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( + planes[scene::SViewFrustum::VF_BOTTOM_PLANE], + planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); + + return p; + } + inline const core::aabbox3d &SViewFrustum::getBoundingBox() const { return boundingBox; @@ -296,13 +348,13 @@ namespace scene { if (planes[i].classifyPointRelation(line.start) == core::ISREL3D_FRONT) { - line.start = line.start.getInterpolated(line.end, + line.start = line.start.getInterpolated(line.end, planes[i].getKnownIntersectionWithLine(line.start, line.end)); wasClipped = true; } if (planes[i].classifyPointRelation(line.end) == core::ISREL3D_FRONT) { - line.end = line.start.getInterpolated(line.end, + line.end = line.start.getInterpolated(line.end, planes[i].getKnownIntersectionWithLine(line.start, line.end)); wasClipped = true; } diff --git a/include/SceneParameters.h b/include/SceneParameters.h index 2dbe69f5..ed6a53f2 100644 --- a/include/SceneParameters.h +++ b/include/SceneParameters.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/aabbox3d.h b/include/aabbox3d.h index 5e9b18d3..5714cd98 100644 --- a/include/aabbox3d.h +++ b/include/aabbox3d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/coreutil.h b/include/coreutil.h index 5231418f..df15c407 100644 --- a/include/coreutil.h +++ b/include/coreutil.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -13,7 +13,7 @@ namespace irr namespace core { -/*! \file irrxml.h +/*! \file coreutil.h \brief File containing useful basic utility functions */ @@ -139,7 +139,8 @@ inline s32 isInSameDirectory ( const io::path& path, const io::path& file ) } // splits a path into components -static inline void splitFilename( const io::path &name, io::path *path,io::path* filename, io::path* extension,bool make_lower = false ) +static inline void splitFilename(const io::path &name, io::path* path=0, + io::path* filename=0, io::path* extension=0, bool make_lower=false) { s32 i = name.size(); s32 extpos = i; @@ -185,4 +186,3 @@ inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; } } // end namespace irr #endif - diff --git a/include/dimension2d.h b/include/dimension2d.h index 2448554a..6ee2914a 100644 --- a/include/dimension2d.h +++ b/include/dimension2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/driverChoice.h b/include/driverChoice.h index bde459e6..e76c6409 100644 --- a/include/driverChoice.h +++ b/include/driverChoice.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2010 Christian Stehno +// Copyright (C) 2009-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/fast_atof.h b/include/fast_atof.h index 7920c340..2a09188b 100644 --- a/include/fast_atof.h +++ b/include/fast_atof.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h diff --git a/include/heapsort.h b/include/heapsort.h index 9c2b3b7c..18c7694e 100644 --- a/include/heapsort.h +++ b/include/heapsort.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -53,9 +53,8 @@ inline void heapsort(T* array_, s32 size) for (i=((size-1)/2); i>=0; --i) heapsink(virtualArray, i+1, virtualSize-1); - // sort array - - for (i=size-1; i>=0; --i) + // sort array, leave out the last element (0) + for (i=size-1; i>0; --i) { T t = array_[0]; array_[0] = array_[i]; diff --git a/include/irrAllocator.h b/include/irrAllocator.h index fffd4409..7a87ab54 100644 --- a/include/irrAllocator.h +++ b/include/irrAllocator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h diff --git a/include/irrArray.h b/include/irrArray.h index 0ba7917a..ec6cc9ad 100644 --- a/include/irrArray.h +++ b/include/irrArray.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h diff --git a/include/irrList.h b/include/irrList.h index 333119b7..314e2b41 100644 --- a/include/irrList.h +++ b/include/irrList.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/irrMap.h b/include/irrMap.h index 5f50fbe8..e09f316c 100644 --- a/include/irrMap.h +++ b/include/irrMap.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 by Kat'Oun +// Copyright (C) 2006-2011 by Kat'Oun // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/irrMath.h b/include/irrMath.h index 0a5c8774..035bd673 100644 --- a/include/irrMath.h +++ b/include/irrMath.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/irrString.h b/include/irrString.h index 24e2ba33..104568e5 100644 --- a/include/irrString.h +++ b/include/irrString.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h diff --git a/include/irrTypes.h b/include/irrTypes.h index a9591b7a..46c85471 100644 --- a/include/irrTypes.h +++ b/include/irrTypes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/irrXML.h b/include/irrXML.h index fcb26835..eb44ff42 100644 --- a/include/irrXML.h +++ b/include/irrXML.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h @@ -120,7 +120,7 @@ The irrXML license is based on the zlib license. Basicly, this means you can do with irrXML whatever you want: - Copyright (C) 2002-2009 Nikolaus Gebhardt + Copyright (C) 2002-2011 Nikolaus Gebhardt This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -373,6 +373,7 @@ namespace io xmlChar() {} xmlChar(char in) : c(static_cast(in)) {} xmlChar(wchar_t in) : c(static_cast(in)) {} + explicit xmlChar(unsigned char in) : c(static_cast(in)) {} explicit xmlChar(unsigned short in) : c(static_cast(in)) {} explicit xmlChar(unsigned int in) : c(static_cast(in)) {} explicit xmlChar(unsigned long in) : c(static_cast(in)) {} diff --git a/include/irrlicht.h b/include/irrlicht.h index def65733..9303a930 100644 --- a/include/irrlicht.h +++ b/include/irrlicht.h @@ -1,6 +1,6 @@ /* irrlicht.h -- interface of the 'Irrlicht Engine' - Copyright (C) 2002-2009 Nikolaus Gebhardt + Copyright (C) 2002-2011 Nikolaus Gebhardt This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/include/line2d.h b/include/line2d.h index af6cd148..59031ae2 100644 --- a/include/line2d.h +++ b/include/line2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -90,6 +90,7 @@ class line2d if(equals(commonDenominator, 0.f)) { // The lines are either coincident or parallel + // if both numerators are 0, the lines are coincident if(equals(numeratorA, 0.f) && equals(numeratorB, 0.f)) { // Try and find a common endpoint @@ -97,10 +98,52 @@ class line2d out = start; else if(l.end == end || l.start == end) out = end; + // now check if the two segments are disjunct + else if (l.start.X>start.X && l.end.X>start.X && l.start.X>end.X && l.end.X>end.X) + return false; + else if (l.start.Y>start.Y && l.end.Y>start.Y && l.start.Y>end.Y && l.end.Y>end.Y) + return false; + else if (l.start.X maxp; + vector2d minp; + if ((start.X>l.start.X && start.X>l.end.X && start.X>end.X) || (start.Y>l.start.Y && start.Y>l.end.Y && start.Y>end.Y)) + maxp=start; + else if ((end.X>l.start.X && end.X>l.end.X && end.X>start.X) || (end.Y>l.start.Y && end.Y>l.end.Y && end.Y>start.Y)) + maxp=end; + else if ((l.start.X>start.X && l.start.X>l.end.X && l.start.X>end.X) || (l.start.Y>start.Y && l.start.Y>l.end.Y && l.start.Y>end.Y)) + maxp=l.start; + else + maxp=l.end; + if (maxp != start && ((start.X(); + if (start != maxp && start != minp) + out += start; + if (end != maxp && end != minp) + out += end; + if (l.start != maxp && l.start != minp) + out += l.start; + if (l.end != maxp && l.end != minp) + out += l.end; + out *= 0.5f; + } return true; // coincident } diff --git a/include/line3d.h b/include/line3d.h index f8141cc8..2340dc61 100644 --- a/include/line3d.h +++ b/include/line3d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/matrix4.h b/include/matrix4.h index fa303bee..9d1f8688 100644 --- a/include/matrix4.h +++ b/include/matrix4.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -296,7 +296,7 @@ namespace core CMatrix4& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f); //! Builds a matrix which transforms a normalized Device Coordinate to Device Coordinates. - /** Used to scale <-1,-1><1,1> to viewport, for example from von <-1,-1> <1,1> to the viewport <0,0><0,640> */ + /** Used to scale <-1,-1><1,1> to viewport, for example from <-1,-1> <1,1> to the viewport <0,0><0,640> */ CMatrix4& buildNDCToDCMatrix( const core::rect& area, f32 zScale); //! Creates a new matrix as interpolated matrix from two other ones. @@ -778,11 +778,11 @@ namespace core } //! Returns the absolute values of the scales of the matrix. - /** - Note that this always returns the absolute (positive) values. Unfortunately it - does not appear to be possible to extract any original negative values. The best - that we could do would be to arbitrarily make one scale negative if one or three - of them were negative. + /** + Note that this returns the absolute (positive) values unless only scale is set. + Unfortunately it does not appear to be possible to extract any original negative + values. The best that we could do would be to arbitrarily make one scale + negative if one or three of them were negative. FIXME - return the original values. */ template @@ -854,7 +854,23 @@ namespace core inline core::vector3d CMatrix4::getRotationDegrees() const { const CMatrix4 &mat = *this; - const core::vector3d scale = getScale(); + core::vector3d scale = getScale(); + // we need to check for negative scale on to axes, which would bring up wrong results + if (scale.Y<0 && scale.Z<0) + { + scale.Y =-scale.Y; + scale.Z =-scale.Z; + } + else if (scale.X<0 && scale.Z<0) + { + scale.X =-scale.X; + scale.Z =-scale.Z; + } + else if (scale.X<0 && scale.Y<0) + { + scale.X =-scale.X; + scale.Y =-scale.Y; + } const core::vector3d invScale(core::reciprocal(scale.X),core::reciprocal(scale.Y),core::reciprocal(scale.Z)); f64 Y = -asin(core::clamp(mat[2]*invScale.X, -1.0, 1.0)); @@ -882,8 +898,6 @@ namespace core } // fix values that get below zero - // before it would set (!) values to 360 - // that were above 360: if (X < 0.0) X += 360.0; if (Y < 0.0) Y += 360.0; if (Z < 0.0) Z += 360.0; diff --git a/include/path.h b/include/path.h index b9bc7763..a03c0898 100644 --- a/include/path.h +++ b/include/path.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/plane3d.h b/include/plane3d.h index becf50a3..1718f21b 100644 --- a/include/plane3d.h +++ b/include/plane3d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/position2d.h b/include/position2d.h index ecbfab94..b3396b87 100644 --- a/include/position2d.h +++ b/include/position2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/quaternion.h b/include/quaternion.h index cd17a8b0..100c8413 100644 --- a/include/quaternion.h +++ b/include/quaternion.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/rect.h b/include/rect.h index b268be40..0c3d98cf 100644 --- a/include/rect.h +++ b/include/rect.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/triangle3d.h b/include/triangle3d.h index 1d40cbde..289ebd67 100644 --- a/include/triangle3d.h +++ b/include/triangle3d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/vector2d.h b/include/vector2d.h index c25a65a6..8e0b1815 100644 --- a/include/vector2d.h +++ b/include/vector2d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/include/vector3d.h b/include/vector3d.h index a2a9d62c..800cac24 100644 --- a/include/vector3d.h +++ b/include/vector3d.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -394,6 +394,16 @@ namespace core array[3] = 0; } + //! Fills an array of 3 values with the vector data (usually floats). + /** Useful for setting in shader constants for example.*/ + void getAs3Values(T* array) const + { + array[0] = X; + array[1] = Y; + array[2] = Z; + } + + //! X coordinate of the vector T X; diff --git a/media/example.irr b/media/example.irr index 13539eaa..4035bd5b 100644 Binary files a/media/example.irr and b/media/example.irr differ diff --git a/media/yodan mdl - readme.txt b/media/yodan mdl - readme.txt index d88d75cd..53c72a3d 100644 --- a/media/yodan mdl - readme.txt +++ b/media/yodan mdl - readme.txt @@ -1,36 +1,53 @@ -Boba Fett Model for Half-Life -Copyright 1999 Doug Hillyer +Yodan the Silencer -Author: Doug "CHaoSMaN" Hillyer--All modeling and textures -E-Mail: dhillyer@bigfoot.com -ICQ: 707847 (Don't contact through ICQ without a good reason) -Webpage: http:// *UNDER CONSTRUCTION* E-mail me if you'll host my page. +Experiment 2 -Model Name: Boba Fett -Version: 1.0 -Relaese Date: 3/24/99 -Total Size: 448KB -Polygons: 700 -Vertices: 379 -Texture Size: 159KB (I'll take it down under 150KB in the next release) -Team Colors: No. Maybe in a future release if I figure out how to change the palette. -Animations: Standard DM Player Animations--I'm too lazy to make my own -Build Time: 30+ Hours? -Programs Used: 3D Studio MAX R2.5, Character Studio R2, Surface Suite 1.1, Photoshop 5 +Can I add elements to the construction of the Biped and also extra external bones? -Knows bugs: -Top of jet pack goes though his head in some animations. Not much I can do about it. No chrome texture. If anyone knows how to do this, let me know and I'll add it. Multiplayer BMP thinks it has team colors and doesn't display correctly. +Well, yes and no. -Description: -Here is one less model on the Cold Fusion Wish List (http://www.planethalflife.com/coldfusion/)! After more that 30 hours of modeling and texturing it's finaly done. Each and every polygon hand-built by me, except for the arms, which belong to the gordon model. I saw no reason to remodel something that was already made. All textures made to match the latest version of Boba Fett. The modifier stack in 3DSMAX had at least 40 modifiers and froze my computer numerous time. It's a little bit bulky at 700 polygons, but I can't do it with much less and still have all of the details that I want. I hope that everyone likes it. Please send me any comments or suggestions you may have. +I discovered that it is possible to add both extra links and extra bones without any detremental effects. However, with the exaggerated biped deformation, I came across a problem that hadn't been that obvious on Knute and Bolte. most weapons are rigid non-deformable objects, however the Egon reference model is actually physiqued to a humanoid biped the same way as the player model mesh is. This means that when you deform the biped, it will in turn deform the Egon. It is possible to adjust the Egon model to fit Yodan, but that would mean including the altered Egon gun with the model which would replace the standard one. It would then screw up on standard models, defeating the whole point. -If there is something wronge with the design or model, then let me know so that I can fix it in an upcoming release. +So, the Egon gun screws up on Yodan. Nothing I can do about it. I also didn't account for his spikes so one of them impales the pack aswell. Oh well! -I'm also taking requests or suggestions for models. +Beyond this, I feel the lupine legs and tail work quite well, though I realised that the legs are allready quite 'crouched' in the standing position which didn't leave much room for actual crouching =( However, the root Bip 01 bone is in the same place as the standard Human ones when standing and crouching. -Remember, this model is Copyrighted by me, Doug Hillyer. If you want to use this model or need one custom built for a MOD, then contact me. +I have totally re-animated all of the sequences, but largely based those animations on the Valve ones so no points for originality. However, I have made him fire most weapons, including the missile launcher one-handed, I felt it kind of suited him =) -Enjoy! +So I present to you, chunk the second of my planned three-chunk experiment with Halflife modelling. -Installation: -Put all files (bobafett.mdl, bobafett.bmp) in half-life\valve\models\player\bobafett directory \ No newline at end of file + +'Yodan the silencer' PPM for Half-Life + +to install: + +unzip the zipfile into the path: Sierra/half-life/valve/models/player +it will automatically create a folder called 'Yodan' and place the mdl and bmp files inside. + +skins: 1x255x255x255colour bmp. +Chrome: no +Team colours: no +triangles: 505 +animations: Custom + +Thanks to: + +Alexis for the constructive criticism. +Chris for the original name, 'Hugo the Silencer' from which Yodan is derived +Raxogg,DaBalrog and Spine[TDA3] for nagging me +White Dragon, Ian Waugh and Nsi among others, for being competent and friendly competition =) +White Dragon, Raxogg and Mist for testing the model for me. +George Lucas, Gene Roddenberry, Wolfgang Amadeus Motzart, Bruce Li and the Pixies for the background noise =) +The Spanish for their onions + +See chunk the first, 'Knute and Bolte' at all good PPM websites near you =) + +also available on my web-site + +http://dspace.dial.pipex.com/scarecrow + +or E-Mail me with questions, advice, complaints etc... + +Scarecrow@dial.pipex.com + +Please note - I don't have time to make clan models or to commit myself to a mod or TC unless you are offering large sums of cash =) \ No newline at end of file diff --git a/readme.txt b/readme.txt index 12d3138c..ce42760f 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ========================================================================== -The Irrlicht Engine SDK version 1.6 +The Irrlicht Engine SDK version 1.8 ========================================================================== Welcome the Irrlicht Engine SDK. @@ -80,10 +80,9 @@ The Irrlicht Engine SDK version 1.6 * gcc 3.4 * gcc 4.x * Visual Studio.NET 2003 (7.1) - * Visual Studio 2005 (8.0) - * Visual Studio 2008 (9.0) + * Visual Studio 2005(8.0)-2010(10.0) * Code::Blocks 1.0 (& gcc or visual studio toolkit) - * DevC++ 5.0 & gcc (project files included) + * DevC++ 5.0 & gcc (project files included, please use Code::Blocks instead) If you ever want to (re)compile the engine yourself (which means you don't want to use the precompiled version) you need the following: @@ -135,7 +134,7 @@ The Irrlicht Engine SDK version 1.6 The Irrlicht Engine License =========================== - Copyright (C) 2002-2009 Nikolaus Gebhardt + Copyright (C) 2002-2011 Nikolaus Gebhardt This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/scripts/doc/irrlicht/tut_head.html b/scripts/doc/irrlicht/tut_head.html index 2436b894..1cce74b6 100644 --- a/scripts/doc/irrlicht/tut_head.html +++ b/scripts/doc/irrlicht/tut_head.html @@ -7,7 +7,7 @@ - +

diff --git a/scripts/libIrrlicht1.spec b/scripts/libIrrlicht1.spec index c87d36c2..af5c80a2 100644 --- a/scripts/libIrrlicht1.spec +++ b/scripts/libIrrlicht1.spec @@ -1,4 +1,4 @@ -# Copyright (c) 2007 oc2pus +# Copyright (c) 2007-2011 oc2pus # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -11,7 +11,7 @@ # norootforbuild Name: libIrrlicht1 -Version: 1.6.0 +Version: 1.8.0 Release: 0.pm.1 Summary: The Irrlicht Engine SDK License: see readme.txt diff --git a/source/Irrlicht/BuiltInFont.h b/source/Irrlicht/BuiltInFont.h index 9da9d0af..ca3e295f 100644 --- a/source/Irrlicht/BuiltInFont.h +++ b/source/Irrlicht/BuiltInFont.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/C3DSMeshFileLoader.cpp b/source/Irrlicht/C3DSMeshFileLoader.cpp index 7d63a020..74453b04 100644 --- a/source/Irrlicht/C3DSMeshFileLoader.cpp +++ b/source/Irrlicht/C3DSMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/C3DSMeshFileLoader.h b/source/Irrlicht/C3DSMeshFileLoader.h index 20028d46..0f25b522 100644 --- a/source/Irrlicht/C3DSMeshFileLoader.h +++ b/source/Irrlicht/C3DSMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshHalfLife.cpp b/source/Irrlicht/CAnimatedMeshHalfLife.cpp index f1444146..0b81b3ac 100644 --- a/source/Irrlicht/CAnimatedMeshHalfLife.cpp +++ b/source/Irrlicht/CAnimatedMeshHalfLife.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Fabio Concas / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Fabio Concas / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -850,9 +850,9 @@ void STextureAtlas::addSource ( const c8 * name, video::IImage * image ) /*! */ -void STextureAtlas::getScale ( core::vector2df & scale ) +void STextureAtlas::getScale(core::vector2df& scale) { - for ( u32 i = atlas.size() - 1; i >= 0; --i) + for (s32 i = static_cast(atlas.size()) - 1; i >= 0; --i) { if ( atlas[i].name == "_merged_" ) { @@ -995,7 +995,6 @@ void STextureAtlas::create ( u32 border, E_TEXTURE_CLAMP texmode) master->setPixel ( atlas[i].pos.X + atlas[i].width + b, atlas[i].pos.Y + a, col[wrap[texmode][1]] ); } } - } addSource ( "_merged_", master ); @@ -1119,8 +1118,6 @@ SHalflifeHeader * CAnimatedMeshHalfLife::loadModel( io::IReadFile* file, const i } - - /*! */ f32 CAnimatedMeshHalfLife::SetController( s32 controllerIndex, f32 value ) diff --git a/source/Irrlicht/CAnimatedMeshHalfLife.h b/source/Irrlicht/CAnimatedMeshHalfLife.h index 4ef7b45c..e781255e 100644 --- a/source/Irrlicht/CAnimatedMeshHalfLife.h +++ b/source/Irrlicht/CAnimatedMeshHalfLife.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2010 Thomas Alten +// Copyright (C) 2002-2011 Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshMD2.cpp b/source/Irrlicht/CAnimatedMeshMD2.cpp index b821a9d4..16d4b345 100644 --- a/source/Irrlicht/CAnimatedMeshMD2.cpp +++ b/source/Irrlicht/CAnimatedMeshMD2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshMD2.h b/source/Irrlicht/CAnimatedMeshMD2.h index 861fc9e8..4ddad738 100644 --- a/source/Irrlicht/CAnimatedMeshMD2.h +++ b/source/Irrlicht/CAnimatedMeshMD2.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshMD3.cpp b/source/Irrlicht/CAnimatedMeshMD3.cpp index 6aa4478f..11187620 100644 --- a/source/Irrlicht/CAnimatedMeshMD3.cpp +++ b/source/Irrlicht/CAnimatedMeshMD3.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Fabio Concas / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Fabio Concas / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshMD3.h b/source/Irrlicht/CAnimatedMeshMD3.h index f5a74bd0..40e41b30 100644 --- a/source/Irrlicht/CAnimatedMeshMD3.h +++ b/source/Irrlicht/CAnimatedMeshMD3.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.cpp b/source/Irrlicht/CAnimatedMeshSceneNode.cpp index d033c444..55b12f2d 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.cpp +++ b/source/Irrlicht/CAnimatedMeshSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -32,20 +32,17 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, const core::vector3df& rotation, const core::vector3df& scale) : IAnimatedMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), - StartFrame(0), EndFrame(0), FramesPerSecond(0.f), + StartFrame(0), EndFrame(0), FramesPerSecond(0.025f), CurrentFrameNr(0.f), LastTimeMs(0), TransitionTime(0), Transiting(0.f), TransitingBlend(0.f), JointMode(EJUOR_NONE), JointsUsed(false), - Looping(true), ReadOnlyMaterials(false), RenderFromIdentity(0), - LoopCallBack(0), PassCount(0), Shadow(0), - MD3Special ( 0 ) + Looping(true), ReadOnlyMaterials(false), RenderFromIdentity(false), + LoopCallBack(0), PassCount(0), Shadow(0), MD3Special(0) { #ifdef _DEBUG setDebugName("CAnimatedMeshSceneNode"); #endif - FramesPerSecond = 25.f/1000.f; - setMesh(mesh); } @@ -54,7 +51,7 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode() { if (MD3Special) - MD3Special->drop (); + MD3Special->drop(); if (Mesh) Mesh->drop(); @@ -62,10 +59,6 @@ CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode() if (Shadow) Shadow->drop(); - //for (u32 i=0; idrop(); - if (LoopCallBack) LoopCallBack->drop(); } @@ -201,6 +194,10 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame() } else { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return 0; +#endif + // As multiple scene nodes may be sharing the same skinned mesh, we have to // re-animate it every frame to ensure that this node gets the mesh that it needs. @@ -559,27 +556,31 @@ u32 CAnimatedMeshSceneNode::getMaterialCount() const //! Creates shadow volume scene node as child of this node //! and returns a pointer to it. -IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode(const IMesh* shadowMesh, - s32 id, bool zfailmethod, f32 infinity) +IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode( + const IMesh* shadowMesh, s32 id, bool zfailmethod, f32 infinity) { if (!SceneManager->getVideoDriver()->queryFeature(video::EVDF_STENCIL_BUFFER)) return 0; - if (Shadow) - return Shadow; - if (!shadowMesh) shadowMesh = Mesh; // if null is given, use the mesh of node + if (Shadow) + Shadow->drop(); + Shadow = new CShadowVolumeSceneNode(shadowMesh, this, SceneManager, id, zfailmethod, infinity); return Shadow; } - //! Returns a pointer to a child node, which has the same transformation as //! the corresponding joint, if the mesh in this scene node is a skinned mesh. IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING); + return 0; +#endif + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) { os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); @@ -594,7 +595,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) if (number == -1) { - os::Printer::log("Joint with specified name not found in skinned mesh.", jointName, ELL_DEBUG); + os::Printer::log("Joint with specified name not found in skinned mesh", jointName, ELL_DEBUG); return 0; } @@ -604,14 +605,20 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) return 0; } - return getJointNode((u32)number); + return JointChildSceneNodes[number]; } + //! Returns a pointer to a child node, which has the same transformation as //! the corresponding joint, if the mesh in this scene node is a skinned mesh. IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID) { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING); + return 0; +#endif + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) { os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); @@ -632,6 +639,10 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID) //! Gets joint count. u32 CAnimatedMeshSceneNode::getJointCount() const { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return 0; +#endif + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) return 0; @@ -656,7 +667,6 @@ ISceneNode* CAnimatedMeshSceneNode::getXJointNode(const c8* jointName) return getJointNode(jointName); } - //! Removes a child from this scene node. //! Implemented here, to be able to remove the shadow properly, if there is one, //! or to remove attached childs. @@ -673,10 +683,12 @@ bool CAnimatedMeshSceneNode::removeChild(ISceneNode* child) if (JointsUsed) //stop weird bugs caused while changing parents as the joints are being created { for (u32 i=0; igetFrameCount() ); +// setAnimationSpeed(Mesh->getAnimationSpeed()); + setFrameLoop(0, Mesh->getFrameCount()); } // returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, // or the absolutetransformation if it's a normal scenenode -const SMD3QuaternionTag* CAnimatedMeshSceneNode::getMD3TagTransformation( const core::stringc & tagname) +const SMD3QuaternionTag* CAnimatedMeshSceneNode::getMD3TagTransformation(const core::stringc& tagname) { - return MD3Special ? MD3Special->AbsoluteTagList.get ( tagname ) : 0; + return MD3Special ? MD3Special->AbsoluteTagList.get(tagname) : 0; } @@ -887,134 +907,133 @@ void CAnimatedMeshSceneNode::updateAbsolutePosition() } } - //! Set the joint update mode (0-unused, 1-get joints only, 2-set joints only, 3-move and set) void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode) { checkJoints(); - - //if (mode<0) mode=0; - //if (mode>3) mode=3; - JointMode=mode; } - //! Sets the transition time in seconds (note: This needs to enable joints, and setJointmode maybe set to 2) //! you must call animateJoints(), or the mesh will not animate void CAnimatedMeshSceneNode::setTransitionTime(f32 time) { - if (time != 0.0f) - { - checkJoints(); + const u32 ttime = (u32)core::floor32(time*1000.0f); + if (TransitionTime==ttime) + return; + TransitionTime = ttime; + if (ttime != 0) setJointMode(EJUOR_CONTROL); - TransitionTime = (u32)core::floor32(time*1000.0f); - } + else + setJointMode(EJUOR_NONE); } //! render mesh ignoring its transformation. Used with ragdolls. (culling is unaffected) -void CAnimatedMeshSceneNode::setRenderFromIdentity( bool On ) +void CAnimatedMeshSceneNode::setRenderFromIdentity(bool enable) { - RenderFromIdentity=On; + RenderFromIdentity=enable; } //! updates the joint positions of this mesh void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions) { - checkJoints(); - +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return; +#endif if (Mesh && Mesh->getMeshType() == EAMT_SKINNED ) { - if (JointsUsed) + checkJoints(); + const f32 frame = getFrameNr(); //old? + + CSkinnedMesh* skinnedMesh=reinterpret_cast(Mesh); + + skinnedMesh->transferOnlyJointsHintsToMesh( JointChildSceneNodes ); + skinnedMesh->animateMesh(frame, 1.0f); + skinnedMesh->recoverJointsFromMesh( JointChildSceneNodes); + + //----------------------------------------- + // Transition + //----------------------------------------- + + if (Transiting != 0.f) { - f32 frame = getFrameNr(); //old? - - CSkinnedMesh* skinnedMesh=reinterpret_cast(Mesh); - - skinnedMesh->transferOnlyJointsHintsToMesh( JointChildSceneNodes ); - - skinnedMesh->animateMesh(frame, 1.0f); - - skinnedMesh->recoverJointsFromMesh( JointChildSceneNodes); - - //----------------------------------------- - // Transition - //----------------------------------------- - - if (Transiting != 0.f) + // Init additional matrices + if (PretransitingSave.size()setPosition( - core::lerp( - PretransitingSave[n].getTranslation(), - JointChildSceneNodes[n]->getPosition(), - TransitingBlend)); - - //------Rotation------ - - //Code is slow, needs to be fixed up - - const core::quaternion RotationStart(PretransitingSave[n].getRotationDegrees()*core::DEGTORAD); - const core::quaternion RotationEnd(JointChildSceneNodes[n]->getRotation()*core::DEGTORAD); - - core::quaternion QRotation; - QRotation.slerp(RotationStart, RotationEnd, TransitingBlend); - - core::vector3df tmpVector; - QRotation.toEuler(tmpVector); - tmpVector*=core::RADTODEG; //convert from radians back to degrees - JointChildSceneNodes[n]->setRotation( tmpVector ); - - //------Scale------ - - //JointChildSceneNodes[n]->setScale( - // core::lerp( - // PretransitingSave[n].getScale(), - // JointChildSceneNodes[n]->getScale(), - // TransitingBlend)); - } + for(u32 n=PretransitingSave.size(); nsetPosition( + core::lerp( + PretransitingSave[n].getTranslation(), + JointChildSceneNodes[n]->getPosition(), + TransitingBlend)); + + //------Rotation------ + + //Code is slow, needs to be fixed up + + const core::quaternion RotationStart(PretransitingSave[n].getRotationDegrees()*core::DEGTORAD); + const core::quaternion RotationEnd(JointChildSceneNodes[n]->getRotation()*core::DEGTORAD); + + core::quaternion QRotation; + QRotation.slerp(RotationStart, RotationEnd, TransitingBlend); + + core::vector3df tmpVector; + QRotation.toEuler(tmpVector); + tmpVector*=core::RADTODEG; //convert from radians back to degrees + JointChildSceneNodes[n]->setRotation( tmpVector ); + + //------Scale------ + + //JointChildSceneNodes[n]->setScale( + // core::lerp( + // PretransitingSave[n].getScale(), + // JointChildSceneNodes[n]->getScale(), + // TransitingBlend)); + } + } + + if (CalculateAbsolutePositions) + { + //---slow--- + for (u32 n=0;ngetParent()==this) { - if (JointChildSceneNodes[n]->getParent()==this) - { - JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option - } + JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option } } } } } - /*! */ void CAnimatedMeshSceneNode::checkJoints() { +#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ + return; +#endif + if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) return; if (!JointsUsed) { - //Create joints for SkinnedMesh + for (u32 i=0; icreateJoints(JointChildSceneNodes, this, SceneManager); + //Create joints for SkinnedMesh + ((CSkinnedMesh*)Mesh)->addJoints(JointChildSceneNodes, this, SceneManager); ((CSkinnedMesh*)Mesh)->recoverJointsFromMesh(JointChildSceneNodes); JointsUsed=true; @@ -1022,7 +1041,6 @@ void CAnimatedMeshSceneNode::checkJoints() } } - /*! */ void CAnimatedMeshSceneNode::beginTransition() @@ -1039,7 +1057,6 @@ void CAnimatedMeshSceneNode::beginTransition() PretransitingSave.push_back(core::matrix4()); } - //Copy the position of joints for (u32 n=0;ngetRelativeTransformation(); @@ -1054,14 +1071,16 @@ void CAnimatedMeshSceneNode::beginTransition() */ ISceneNode* CAnimatedMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) { - if (!newParent) newParent = Parent; - if (!newManager) newManager = SceneManager; + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; - CAnimatedMeshSceneNode * newNode = + CAnimatedMeshSceneNode* newNode = new CAnimatedMeshSceneNode(Mesh, NULL, newManager, ID, RelativeTranslation, RelativeRotation, RelativeScale); - if ( newParent ) + if (newParent) { newNode->setParent(newParent); // not in constructor because virtual overload for updateAbsolutePosition won't be called newNode->drop(); @@ -1097,4 +1116,3 @@ ISceneNode* CAnimatedMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* } // end namespace scene } // end namespace irr - diff --git a/source/Irrlicht/CAnimatedMeshSceneNode.h b/source/Irrlicht/CAnimatedMeshSceneNode.h index 34050d17..0e6a8a80 100644 --- a/source/Irrlicht/CAnimatedMeshSceneNode.h +++ b/source/Irrlicht/CAnimatedMeshSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CAttributeImpl.h b/source/Irrlicht/CAttributeImpl.h index 49e95476..129d35a5 100644 --- a/source/Irrlicht/CAttributeImpl.h +++ b/source/Irrlicht/CAttributeImpl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -1630,7 +1630,7 @@ public: virtual bool getBool() { if (IsStringW) - return Value.equals_ignore_case(L"true"); + return ValueW.equals_ignore_case(L"true"); else return Value.equals_ignore_case("true"); } diff --git a/source/Irrlicht/CAttributes.cpp b/source/Irrlicht/CAttributes.cpp index 712d9910..9123caae 100644 --- a/source/Irrlicht/CAttributes.cpp +++ b/source/Irrlicht/CAttributes.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -230,7 +230,7 @@ void CAttributes::setAttribute(s32 index, const core::array& valu //! Returns attribute index from name, -1 if not found -s32 CAttributes::findAttribute(const c8* attributeName) +s32 CAttributes::findAttribute(const c8* attributeName) const { for (u32 i=0; iName == attributeName) @@ -240,7 +240,7 @@ s32 CAttributes::findAttribute(const c8* attributeName) } -IAttribute* CAttributes::getAttributeP(const c8* attributeName) +IAttribute* CAttributes::getAttributeP(const c8* attributeName) const { for (u32 i=0; iName == attributeName) @@ -294,7 +294,7 @@ void CAttributes::setAttribute(const c8* attributeName, s32 value) //! \param attributeName: Name of the attribute to get. //! \return Returns value of the attribute previously set by setAttribute() as integer //! or 0 if attribute is not set. -s32 CAttributes::getAttributeAsInt(const c8* attributeName) +s32 CAttributes::getAttributeAsInt(const c8* attributeName) const { IAttribute* att = getAttributeP(attributeName); if (att) @@ -614,7 +614,7 @@ bool CAttributes::getAttributeAsBool(s32 index) //! Gets an attribute as integer value //! \param index: Index value, must be between 0 and getAttributeCount()-1. -s32 CAttributes::getAttributeAsInt(s32 index) +s32 CAttributes::getAttributeAsInt(s32 index) const { if ((u32)index < Attributes.size()) return Attributes[index]->getInt(); diff --git a/source/Irrlicht/CAttributes.h b/source/Irrlicht/CAttributes.h index f1e80dfe..818bdf34 100644 --- a/source/Irrlicht/CAttributes.h +++ b/source/Irrlicht/CAttributes.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -54,7 +54,7 @@ public: virtual bool existsAttribute(const c8* attributeName); //! Returns attribute index from name, -1 if not found - virtual s32 findAttribute(const c8* attributeName); + virtual s32 findAttribute(const c8* attributeName) const; //! Removes all attributes virtual void clear(); @@ -84,11 +84,11 @@ public: //! Gets an attribute as integer value //! \param attributeName: Name of the attribute to get. //! \return Returns value of the attribute previously set by setAttribute() - virtual s32 getAttributeAsInt(const c8* attributeName); + virtual s32 getAttributeAsInt(const c8* attributeName) const; //! Gets an attribute as integer value //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual s32 getAttributeAsInt(s32 index); + virtual s32 getAttributeAsInt(s32 index) const; //! Sets an attribute as integer value virtual void setAttribute(s32 index, s32 value); @@ -649,7 +649,7 @@ protected: core::array Attributes; - IAttribute* getAttributeP(const c8* attributeName); + IAttribute* getAttributeP(const c8* attributeName) const; video::IVideoDriver* Driver; }; diff --git a/source/Irrlicht/CB3DMeshFileLoader.cpp b/source/Irrlicht/CB3DMeshFileLoader.cpp index 842e28cc..732ddd83 100644 --- a/source/Irrlicht/CB3DMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Luke Hoschke +// Copyright (C) 2006-2011 Luke Hoschke // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -55,6 +55,7 @@ IAnimatedMesh* CB3DMeshFileLoader::createMesh(io::IReadFile* f) B3DFile = f; AnimatedMesh = new scene::CSkinnedMesh(); ShowWarning = true; // If true a warning is issued if too many textures are used + VerticesStart=0; if ( load() ) { @@ -198,6 +199,7 @@ bool CB3DMeshFileLoader::readChunkNODE(CSkinnedMesh::SJoint *inJoint) } else if ( strncmp( B3dStack.getLast().name, "MESH", 4 ) == 0 ) { + VerticesStart=BaseVertices.size(); if (!readChunkMESH(joint)) return false; } @@ -236,12 +238,10 @@ bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint) os::Printer::log("read ChunkMESH"); #endif - const s32 vertices_Start=BaseVertices.size(); //B3Ds have Vertex ID's local within the mesh I don't want this - - s32 brush_id; - B3DFile->read(&brush_id, sizeof(brush_id)); + s32 brushID; + B3DFile->read(&brushID, sizeof(brushID)); #ifdef __BIG_ENDIAN__ - brush_id = os::Byteswap::byteswap(brush_id); + brushID = os::Byteswap::byteswap(brushID); #endif NormalsInFile=false; @@ -266,13 +266,13 @@ bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint) { scene::SSkinMeshBuffer *meshBuffer = AnimatedMesh->addMeshBuffer(); - if (brush_id!=-1) + if (brushID!=-1) { - loadTextures(Materials[brush_id]); - meshBuffer->Material=Materials[brush_id].Material; + loadTextures(Materials[brushID]); + meshBuffer->Material=Materials[brushID].Material; } - if(readChunkTRIS(meshBuffer,AnimatedMesh->getMeshBuffers().size()-1, vertices_Start)==false) + if(readChunkTRIS(meshBuffer,AnimatedMesh->getMeshBuffers().size()-1, VerticesStart)==false) return false; if (!NormalsInFile) @@ -293,7 +293,7 @@ bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint) for ( i = 0; i<(s32)meshBuffer->getVertexCount(); ++i ) { meshBuffer->getVertex(i)->Normal.normalize(); - BaseVertices[vertices_Start+i].Normal=meshBuffer->getVertex(i)->Normal; + BaseVertices[VerticesStart+i].Normal=meshBuffer->getVertex(i)->Normal; } } } @@ -562,6 +562,7 @@ bool CB3DMeshFileLoader::readChunkBONE(CSkinnedMesh::SJoint *inJoint) globalVertexID = os::Byteswap::byteswap(globalVertexID); strength = os::Byteswap::byteswap(strength); #endif + globalVertexID += VerticesStart; if (AnimatedVertices_VertexID[globalVertexID]==-1) { diff --git a/source/Irrlicht/CB3DMeshFileLoader.h b/source/Irrlicht/CB3DMeshFileLoader.h index bc70dd9f..4e67dfb2 100644 --- a/source/Irrlicht/CB3DMeshFileLoader.h +++ b/source/Irrlicht/CB3DMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Luke Hoschke +// Copyright (C) 2006-2011 Luke Hoschke // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -123,6 +123,10 @@ private: CSkinnedMesh* AnimatedMesh; io::IReadFile* B3DFile; + //B3Ds have Vertex ID's local within the mesh I don't want this + // Variable needs to be class member due to recursion in calls + u32 VerticesStart; + bool NormalsInFile; bool HasVertexColors; bool ShowWarning; diff --git a/source/Irrlicht/CBSPMeshFileLoader.cpp b/source/Irrlicht/CBSPMeshFileLoader.cpp index 21196ec6..18bf879c 100644 --- a/source/Irrlicht/CBSPMeshFileLoader.cpp +++ b/source/Irrlicht/CBSPMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBSPMeshFileLoader.h b/source/Irrlicht/CBSPMeshFileLoader.h index 42c44bf0..13ae121d 100644 --- a/source/Irrlicht/CBSPMeshFileLoader.h +++ b/source/Irrlicht/CBSPMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBillboardSceneNode.cpp b/source/Irrlicht/CBillboardSceneNode.cpp index 2980834e..14cf0573 100644 --- a/source/Irrlicht/CBillboardSceneNode.cpp +++ b/source/Irrlicht/CBillboardSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBillboardSceneNode.h b/source/Irrlicht/CBillboardSceneNode.h index ae705269..3c559cf7 100644 --- a/source/Irrlicht/CBillboardSceneNode.h +++ b/source/Irrlicht/CBillboardSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBlit.h b/source/Irrlicht/CBlit.h index d65b83e1..5bd51d2e 100644 --- a/source/Irrlicht/CBlit.h +++ b/source/Irrlicht/CBlit.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBoneSceneNode.cpp b/source/Irrlicht/CBoneSceneNode.cpp index e19bf6d7..1fec6ba9 100644 --- a/source/Irrlicht/CBoneSceneNode.cpp +++ b/source/Irrlicht/CBoneSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBoneSceneNode.h b/source/Irrlicht/CBoneSceneNode.h index f6528e70..107660cc 100644 --- a/source/Irrlicht/CBoneSceneNode.h +++ b/source/Irrlicht/CBoneSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CBurningShader_Raster_Reference.cpp b/source/Irrlicht/CBurningShader_Raster_Reference.cpp index 8b50b4ee..6aadebfa 100644 --- a/source/Irrlicht/CBurningShader_Raster_Reference.cpp +++ b/source/Irrlicht/CBurningShader_Raster_Reference.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CCSMLoader.cpp b/source/Irrlicht/CCSMLoader.cpp index c9f373eb..c3c70aeb 100644 --- a/source/Irrlicht/CCSMLoader.cpp +++ b/source/Irrlicht/CCSMLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CCSMLoader.h b/source/Irrlicht/CCSMLoader.h index fc6b0e03..6fc749f8 100644 --- a/source/Irrlicht/CCSMLoader.h +++ b/source/Irrlicht/CCSMLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CCameraSceneNode.cpp b/source/Irrlicht/CCameraSceneNode.cpp index 00259edb..2a545e14 100644 --- a/source/Irrlicht/CCameraSceneNode.cpp +++ b/source/Irrlicht/CCameraSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CCameraSceneNode.h b/source/Irrlicht/CCameraSceneNode.h index 6beee2dc..dcf68fb2 100644 --- a/source/Irrlicht/CCameraSceneNode.h +++ b/source/Irrlicht/CCameraSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CColladaFileLoader.cpp b/source/Irrlicht/CColladaFileLoader.cpp index d1fb19de..a9c6f04f 100644 --- a/source/Irrlicht/CColladaFileLoader.cpp +++ b/source/Irrlicht/CColladaFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -1568,7 +1568,8 @@ const SColladaMaterial* CColladaFileLoader::findMaterial(const core::stringc& ma { // found the effect, instantiate by copying into the material Materials[mat].Mat = Effects[effect].Mat; - Materials[mat].Mat.setTexture(0, getTextureFromImage(Effects[effect].Textures[0])); + if (Effects[effect].Textures.size()) + Materials[mat].Mat.setTexture(0, getTextureFromImage(Effects[effect].Textures[0])); Materials[mat].Transparency = Effects[effect].Transparency; // and indicate the material is instantiated by removing the effect ref Materials[mat].InstanceEffectId = ""; diff --git a/source/Irrlicht/CColladaFileLoader.h b/source/Irrlicht/CColladaFileLoader.h index d38f13ed..944449d7 100644 --- a/source/Irrlicht/CColladaFileLoader.h +++ b/source/Irrlicht/CColladaFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CColladaMeshWriter.cpp b/source/Irrlicht/CColladaMeshWriter.cpp index 0e3ba009..e2b5ecdc 100644 --- a/source/Irrlicht/CColladaMeshWriter.cpp +++ b/source/Irrlicht/CColladaMeshWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CColladaMeshWriter.h b/source/Irrlicht/CColladaMeshWriter.h index 694c73e4..74c0eae6 100644 --- a/source/Irrlicht/CColladaMeshWriter.h +++ b/source/Irrlicht/CColladaMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CColorConverter.cpp b/source/Irrlicht/CColorConverter.cpp index 3435d77c..de72f189 100644 --- a/source/Irrlicht/CColorConverter.cpp +++ b/source/Irrlicht/CColorConverter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CColorConverter.h b/source/Irrlicht/CColorConverter.h index 580b5395..f5862b2c 100644 --- a/source/Irrlicht/CColorConverter.h +++ b/source/Irrlicht/CColorConverter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CCubeSceneNode.cpp b/source/Irrlicht/CCubeSceneNode.cpp index c22dc8b7..6d1d97cc 100644 --- a/source/Irrlicht/CCubeSceneNode.cpp +++ b/source/Irrlicht/CCubeSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -69,8 +69,6 @@ void CCubeSceneNode::render() // overwrite half transparency if (DebugDataVisible & scene::EDS_HALF_TRANSPARENCY) mat.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR; - else - driver->setMaterial(Mesh->getMeshBuffer(0)->getMaterial()); driver->setMaterial(mat); driver->drawMeshBuffer(Mesh->getMeshBuffer(0)); diff --git a/source/Irrlicht/CCubeSceneNode.h b/source/Irrlicht/CCubeSceneNode.h index 33aa15ff..956c7bab 100644 --- a/source/Irrlicht/CCubeSceneNode.h +++ b/source/Irrlicht/CCubeSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8Driver.cpp b/source/Irrlicht/CD3D8Driver.cpp index c2770107..94ec1bd2 100644 --- a/source/Irrlicht/CD3D8Driver.cpp +++ b/source/Irrlicht/CD3D8Driver.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -391,6 +391,17 @@ bool CD3D8Driver::initDriver(const core::dimension2d& screenSize, MaxTextureUnits = core::min_((u32)Caps.MaxSimultaneousTextures, MATERIAL_MAX_TEXTURES); MaxUserClipPlanes = (u32)Caps.MaxUserClipPlanes; + DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); + DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex); + DriverAttributes->setAttribute("MaxTextureSize", (s32)core::min_(Caps.MaxTextureHeight,Caps.MaxTextureWidth)); + DriverAttributes->setAttribute("MaxTextureLODBias", 16.f); + DriverAttributes->setAttribute("Version", 800); + DriverAttributes->setAttribute("ShaderLanguageVersion", (s32)Caps.VertexShaderVersion*100); + DriverAttributes->setAttribute("AntiAlias", antiAlias); + // set the renderstates setRenderStates3DMode(); @@ -951,8 +962,8 @@ void CD3D8Driver::draw2D3DVertexPrimitiveList(const void* vertices, case scene::EPT_LINE_LOOP: { pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, - primitiveCount, indexList, indexType, vertices, stride); - u16 tmpIndices[] = {0, primitiveCount}; + primitiveCount - 1, indexList, indexType, vertices, stride); + u16 tmpIndices[] = {primitiveCount - 1, 0}; pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, 1, tmpIndices, indexType, vertices, stride); } @@ -1578,7 +1589,8 @@ void CD3D8Driver::setBasicRenderStates(const SMaterial& material, const SMateria if (resetAllRenderstates || lastmaterial.TextureLayer[st].BilinearFilter != material.TextureLayer[st].BilinearFilter || lastmaterial.TextureLayer[st].TrilinearFilter != material.TextureLayer[st].TrilinearFilter || - lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter ) + lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter || + lastmaterial.UseMipMaps != material.UseMipMaps) { if (material.TextureLayer[st].BilinearFilter || material.TextureLayer[st].TrilinearFilter || material.TextureLayer[st].AnisotropicFilter>1) { diff --git a/source/Irrlicht/CD3D8Driver.h b/source/Irrlicht/CD3D8Driver.h index 84be6cf9..5b4d64ae 100644 --- a/source/Irrlicht/CD3D8Driver.h +++ b/source/Irrlicht/CD3D8Driver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8MaterialRenderer.h b/source/Irrlicht/CD3D8MaterialRenderer.h index 24798012..059d592c 100644 --- a/source/Irrlicht/CD3D8MaterialRenderer.h +++ b/source/Irrlicht/CD3D8MaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -258,7 +258,7 @@ public: pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); - pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); } diff --git a/source/Irrlicht/CD3D8NormalMapRenderer.cpp b/source/Irrlicht/CD3D8NormalMapRenderer.cpp index 5f03131c..3d79e007 100644 --- a/source/Irrlicht/CD3D8NormalMapRenderer.cpp +++ b/source/Irrlicht/CD3D8NormalMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8NormalMapRenderer.h b/source/Irrlicht/CD3D8NormalMapRenderer.h index c4eb5265..edc53fdb 100644 --- a/source/Irrlicht/CD3D8NormalMapRenderer.h +++ b/source/Irrlicht/CD3D8NormalMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp b/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp index abe64a7e..46fd60ac 100644 --- a/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp +++ b/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8ParallaxMapRenderer.h b/source/Irrlicht/CD3D8ParallaxMapRenderer.h index 38f8f52d..0aa379e4 100644 --- a/source/Irrlicht/CD3D8ParallaxMapRenderer.h +++ b/source/Irrlicht/CD3D8ParallaxMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp b/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp index 00d34b37..6f449838 100644 --- a/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp +++ b/source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8ShaderMaterialRenderer.h b/source/Irrlicht/CD3D8ShaderMaterialRenderer.h index a50573d3..5642d0f2 100644 --- a/source/Irrlicht/CD3D8ShaderMaterialRenderer.h +++ b/source/Irrlicht/CD3D8ShaderMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D8Texture.cpp b/source/Irrlicht/CD3D8Texture.cpp index c0ae62b3..4b281a2f 100644 --- a/source/Irrlicht/CD3D8Texture.cpp +++ b/source/Irrlicht/CD3D8Texture.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -205,7 +205,7 @@ bool CD3D8Texture::copyTexture(video::IImage* image) //! lock function -void* CD3D8Texture::lock(bool readOnly, u32 mipmapLevel) +void* CD3D8Texture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) { if (!Texture) return 0; @@ -215,7 +215,7 @@ void* CD3D8Texture::lock(bool readOnly, u32 mipmapLevel) D3DLOCKED_RECT rect; if(!IsRenderTarget) { - hr = Texture->LockRect(mipmapLevel, &rect, 0, readOnly?D3DLOCK_READONLY:0); + hr = Texture->LockRect(mipmapLevel, &rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); if (FAILED(hr)) { os::Printer::log("Could not lock DIRECT3D9 Texture.", ELL_ERROR); diff --git a/source/Irrlicht/CD3D8Texture.h b/source/Irrlicht/CD3D8Texture.h index 25ae8eeb..6a68b41b 100644 --- a/source/Irrlicht/CD3D8Texture.h +++ b/source/Irrlicht/CD3D8Texture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -38,7 +38,7 @@ public: virtual ~CD3D8Texture(); //! lock function - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0); + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); //! unlock function virtual void unlock(); diff --git a/source/Irrlicht/CD3D9Driver.cpp b/source/Irrlicht/CD3D9Driver.cpp index 4304539a..3dc43d39 100644 --- a/source/Irrlicht/CD3D9Driver.cpp +++ b/source/Irrlicht/CD3D9Driver.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -32,7 +32,7 @@ CD3D9Driver::CD3D9Driver(const core::dimension2d& screenSize, HWND window, D3DLibrary(0), pID3D(0), pID3DDevice(0), PrevRenderTarget(0), WindowId(0), SceneSourceRect(0), LastVertexType((video::E_VERTEX_TYPE)-1), VendorID(0), - MaxTextureUnits(0), MaxUserClipPlanes(0), + MaxTextureUnits(0), MaxUserClipPlanes(0), MaxMRTs(1), NumSetMRTs(1), MaxLightDistance(0.f), LastSetLight(-1), Cached2DModeSignature(0), ColorFormat(ECF_A8R8G8B8), DeviceLost(false), Fullscreen(fullscreen), DriverWasReset(true), OcclusionQuerySupport(false), @@ -430,6 +430,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, MaxTextureUnits = core::min_((u32)Caps.MaxSimultaneousTextures, MATERIAL_MAX_TEXTURES); MaxUserClipPlanes = (u32)Caps.MaxUserClipPlanes; + MaxMRTs = (s32)Caps.NumSimultaneousRTs; OcclusionQuerySupport=(pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, NULL) == S_OK); if (VendorID==0x10DE)//NVidia @@ -443,6 +444,19 @@ bool CD3D9Driver::initDriver(const core::dimension2d& screenSize, D3DFMT_X8R8G8B8, 0,D3DRTYPE_SURFACE, (D3DFORMAT)MAKEFOURCC('A','2','M','1')) == S_OK); #endif + + DriverAttributes->setAttribute("MaxTextures", (s32)MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", (s32)Caps.MaxSimultaneousTextures); + DriverAttributes->setAttribute("MaxAnisotropy", (s32)Caps.MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", (s32)Caps.MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxMultipleRenderTargets", (s32)Caps.NumSimultaneousRTs); + DriverAttributes->setAttribute("MaxIndices", (s32)Caps.MaxVertexIndex); + DriverAttributes->setAttribute("MaxTextureSize", (s32)core::min_(Caps.MaxTextureHeight,Caps.MaxTextureWidth)); + DriverAttributes->setAttribute("MaxTextureLODBias", 16); + DriverAttributes->setAttribute("Version", 901); + DriverAttributes->setAttribute("ShaderLanguageVersion", (s32)Caps.VertexShaderVersion*100); + DriverAttributes->setAttribute("AntiAlias", AntiAliasing); + // set the renderstates setRenderStates3DMode(); @@ -775,6 +789,11 @@ bool CD3D9Driver::setRenderTarget(video::ITexture* texture, bool ret = true; + for(u32 i = 1; i < NumSetMRTs; i++) + { + // First texture handled elsewhere + pID3DDevice->SetRenderTarget(i, NULL); + } if (tex == 0) { if (PrevRenderTarget) @@ -848,7 +867,7 @@ bool CD3D9Driver::setRenderTarget(const core::array& targe if (targets.size()==0) return setRenderTarget(0, clearBackBuffer, clearZBuffer, color); - u32 maxMultipleRTTs = core::min_(4u, targets.size()); + u32 maxMultipleRTTs = core::min_(MaxMRTs, targets.size()); for (u32 i = 0; i < maxMultipleRTTs; ++i) { @@ -912,6 +931,7 @@ bool CD3D9Driver::setRenderTarget(const core::array& targe // set new render target + // In d3d9 we have at most 4 MRTs, so the following is enough D3DRENDERSTATETYPE colorWrite[4]={D3DRS_COLORWRITEENABLE, D3DRS_COLORWRITEENABLE1, D3DRS_COLORWRITEENABLE2, D3DRS_COLORWRITEENABLE3}; for (u32 i = 0; i < maxMultipleRTTs; ++i) { @@ -930,6 +950,11 @@ bool CD3D9Driver::setRenderTarget(const core::array& targe pID3DDevice->SetRenderState(colorWrite[i], flag); } } + for(u32 i = maxMultipleRTTs; i < NumSetMRTs; i++) + { + pID3DDevice->SetRenderTarget(i, NULL); + } + NumSetMRTs=maxMultipleRTTs; CurrentRendertargetSize = tex->getSize(); @@ -961,23 +986,22 @@ void CD3D9Driver::setViewPort(const core::rect& area) core::rect vp = area; core::rect rendert(0,0, getCurrentRenderTargetSize().Width, getCurrentRenderTargetSize().Height); vp.clipAgainst(rendert); - - D3DVIEWPORT9 viewPort; - viewPort.X = vp.UpperLeftCorner.X; - viewPort.Y = vp.UpperLeftCorner.Y; - viewPort.Width = vp.getWidth(); - viewPort.Height = vp.getHeight(); - viewPort.MinZ = 0.0f; - viewPort.MaxZ = 1.0f; - - HRESULT hr = D3DERR_INVALIDCALL; if (vp.getHeight()>0 && vp.getWidth()>0) - hr = pID3DDevice->SetViewport(&viewPort); + { + D3DVIEWPORT9 viewPort; + viewPort.X = vp.UpperLeftCorner.X; + viewPort.Y = vp.UpperLeftCorner.Y; + viewPort.Width = vp.getWidth(); + viewPort.Height = vp.getHeight(); + viewPort.MinZ = 0.0f; + viewPort.MaxZ = 1.0f; - if (FAILED(hr)) - os::Printer::log("Failed setting the viewport.", ELL_WARNING); - - ViewPort = vp; + HRESULT hr = pID3DDevice->SetViewport(&viewPort); + if (FAILED(hr)) + os::Printer::log("Failed setting the viewport.", ELL_WARNING); + else + ViewPort = vp; + } } @@ -998,58 +1022,55 @@ bool CD3D9Driver::updateVertexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer) const u32 vertexCount=mb->getVertexCount(); const E_VERTEX_TYPE vType=mb->getVertexType(); const u32 vertexSize = getVertexPitchFromType(vType); + const u32 bufSize = vertexSize * vertexCount; - void* pLockedBuffer = 0; - - if (!hwBuffer->vertexBuffer || vertexSize * vertexCount > hwBuffer->vertexBufferSize) + if (!hwBuffer->vertexBuffer || (bufSize > hwBuffer->vertexBufferSize)) { - DWORD flags = 0; + if (hwBuffer->vertexBuffer) + { + hwBuffer->vertexBuffer->Release(); + hwBuffer->vertexBuffer=0; + } - u32 vertexSize; DWORD FVF; - // Get the vertex sizes and cvf switch (vType) { case EVT_STANDARD: - vertexSize = sizeof(S3DVertex); FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1; break; case EVT_2TCOORDS: - vertexSize = sizeof(S3DVertex2TCoords); FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2; break; case EVT_TANGENTS: - vertexSize = sizeof(S3DVertexTangents); FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX3; break; default: return false; } - flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY + DWORD flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY if(hwBuffer->Mapped_Vertex != scene::EHM_STATIC) flags |= D3DUSAGE_DYNAMIC; - pID3DDevice->CreateVertexBuffer(vertexCount * vertexSize, flags, FVF, D3DPOOL_DEFAULT, &hwBuffer->vertexBuffer, NULL); - - if(!hwBuffer->vertexBuffer) + if (FAILED(pID3DDevice->CreateVertexBuffer(bufSize, flags, FVF, D3DPOOL_DEFAULT, &hwBuffer->vertexBuffer, NULL))) return false; + hwBuffer->vertexBufferSize = bufSize; flags = 0; // SIO2: Reset flags before Lock if(hwBuffer->Mapped_Vertex != scene::EHM_STATIC) flags = D3DLOCK_DISCARD; - hwBuffer->vertexBuffer->Lock(0, vertexCount * vertexSize, (void**)&pLockedBuffer, flags); - memcpy(pLockedBuffer, vertices, vertexCount * vertexSize); + void* lockedBuffer = 0; + hwBuffer->vertexBuffer->Lock(0, bufSize, (void**)&lockedBuffer, flags); + memcpy(lockedBuffer, vertices, bufSize); hwBuffer->vertexBuffer->Unlock(); - - hwBuffer->vertexBufferSize = vertexCount * vertexSize; } else { - hwBuffer->vertexBuffer->Lock(0, vertexCount * vertexSize, (void**)&pLockedBuffer, D3DLOCK_DISCARD); - memcpy(pLockedBuffer, vertices, vertexCount * vertexSize); + void* lockedBuffer = 0; + hwBuffer->vertexBuffer->Lock(0, bufSize, (void**)&lockedBuffer, D3DLOCK_DISCARD); + memcpy(lockedBuffer, vertices, bufSize); hwBuffer->vertexBuffer->Unlock(); } @@ -1069,13 +1090,13 @@ bool CD3D9Driver::updateIndexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer) D3DFORMAT indexType=D3DFMT_UNKNOWN; switch (mb->getIndexType()) { - case (EIT_16BIT): + case EIT_16BIT: { indexType=D3DFMT_INDEX16; indexSize = 2; break; } - case (EIT_32BIT): + case EIT_32BIT: { indexType=D3DFMT_INDEX32; indexSize = 4; @@ -1083,37 +1104,41 @@ bool CD3D9Driver::updateIndexHardwareBuffer(SHWBufferLink_d3d9 *hwBuffer) } } - if (!hwBuffer->indexBuffer || indexSize * indexCount > hwBuffer->indexBufferSize) + const u32 bufSize = indexSize * indexCount; + if (!hwBuffer->indexBuffer || (bufSize > hwBuffer->indexBufferSize)) { - DWORD flags = 0; + if (hwBuffer->indexBuffer) + { + hwBuffer->indexBuffer->Release(); + hwBuffer->indexBuffer=0; + } - flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY - if(hwBuffer->Mapped_Index != scene::EHM_STATIC) + DWORD flags = D3DUSAGE_WRITEONLY; // SIO2: Default to D3DUSAGE_WRITEONLY + if (hwBuffer->Mapped_Index != scene::EHM_STATIC) flags |= D3DUSAGE_DYNAMIC; // SIO2: Add DYNAMIC flag for dynamic buffer data - if(FAILED(pID3DDevice->CreateIndexBuffer( indexCount * indexSize, flags, indexType, D3DPOOL_DEFAULT, &hwBuffer->indexBuffer, NULL))) + if (FAILED(pID3DDevice->CreateIndexBuffer(bufSize, flags, indexType, D3DPOOL_DEFAULT, &hwBuffer->indexBuffer, NULL))) return false; - void* pIndices = 0; - flags = 0; // SIO2: Reset flags before Lock - if(hwBuffer->Mapped_Index != scene::EHM_STATIC) + if (hwBuffer->Mapped_Index != scene::EHM_STATIC) flags = D3DLOCK_DISCARD; - if(FAILED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&pIndices, flags))) + void* lockedBuffer = 0; + if (FAILED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&lockedBuffer, flags))) return false; - memcpy(pIndices, indices, indexCount * indexSize); + memcpy(lockedBuffer, indices, bufSize); hwBuffer->indexBuffer->Unlock(); - hwBuffer->indexBufferSize = indexCount * indexSize; + hwBuffer->indexBufferSize = bufSize; } else { - void* pIndices = 0; - if( SUCCEEDED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&pIndices, D3DLOCK_DISCARD))) + void* lockedBuffer = 0; + if( SUCCEEDED(hwBuffer->indexBuffer->Lock( 0, 0, (void**)&lockedBuffer, D3DLOCK_DISCARD))) { - memcpy(pIndices, indices, indexCount * indexSize); + memcpy(lockedBuffer, indices, bufSize); hwBuffer->indexBuffer->Unlock(); } } @@ -1133,7 +1158,6 @@ bool CD3D9Driver::updateHardwareBuffer(SHWBufferLink *hwBuffer) if (hwBuffer->ChangedID_Vertex != hwBuffer->MeshBuffer->getChangedID_Vertex() || !((SHWBufferLink_d3d9*)hwBuffer)->vertexBuffer) { - hwBuffer->ChangedID_Vertex = hwBuffer->MeshBuffer->getChangedID_Vertex(); if (!updateVertexHardwareBuffer((SHWBufferLink_d3d9*)hwBuffer)) @@ -1146,7 +1170,6 @@ bool CD3D9Driver::updateHardwareBuffer(SHWBufferLink *hwBuffer) if (hwBuffer->ChangedID_Index != hwBuffer->MeshBuffer->getChangedID_Index() || !((SHWBufferLink_d3d9*)hwBuffer)->indexBuffer) { - hwBuffer->ChangedID_Index = hwBuffer->MeshBuffer->getChangedID_Index(); if (!updateIndexHardwareBuffer((SHWBufferLink_d3d9*)hwBuffer)) @@ -1191,7 +1214,8 @@ CD3D9Driver::SHWBufferLink *CD3D9Driver::createHardwareBuffer(const scene::IMesh void CD3D9Driver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer) { - if (!_HWBuffer) return; + if (!_HWBuffer) + return; SHWBufferLink_d3d9 *HWBuffer=(SHWBufferLink_d3d9*)_HWBuffer; if (HWBuffer->indexBuffer) @@ -1225,8 +1249,10 @@ void CD3D9Driver::drawHardwareBuffer(SHWBufferLink *_HWBuffer) const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; const E_VERTEX_TYPE vType = mb->getVertexType(); const u32 stride = getVertexPitchFromType(vType); - if (HWBuffer->vertexBuffer) pID3DDevice->SetStreamSource(0, HWBuffer->vertexBuffer, 0, stride); - if (HWBuffer->indexBuffer) pID3DDevice->SetIndices(HWBuffer->indexBuffer); + if (HWBuffer->vertexBuffer) + pID3DDevice->SetStreamSource(0, HWBuffer->vertexBuffer, 0, stride); + if (HWBuffer->indexBuffer) + pID3DDevice->SetIndices(HWBuffer->indexBuffer); drawVertexPrimitiveList(0, mb->getVertexCount(), 0, mb->getIndexCount()/3, mb->getVertexType(), scene::EPT_TRIANGLES, mb->getIndexType()); @@ -1463,9 +1489,9 @@ void CD3D9Driver::draw2D3DVertexPrimitiveList(const void* vertices, else { pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINESTRIP, 0, vertexCount, - primitiveCount, indexList, indexType, vertices, stride); + primitiveCount - 1, indexList, indexType, vertices, stride); - u16 tmpIndices[] = {0, primitiveCount}; + u16 tmpIndices[] = {primitiveCount - 1, 0}; pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_LINELIST, 0, vertexCount, 1, tmpIndices, indexType, vertices, stride); @@ -1552,12 +1578,12 @@ void CD3D9Driver::draw2DImage(const video::ITexture* texture, s16 indices[6] = {0,1,2,0,2,3}; + setActiveTexture(0, const_cast(texture)); + setRenderStates2DMode(useColor[0].getAlpha()<255 || useColor[1].getAlpha()<255 || useColor[2].getAlpha()<255 || useColor[3].getAlpha()<255, true, useAlphaChannelOfTexture); - setActiveTexture(0, const_cast(texture)); - setVertexShader(EVT_STANDARD); if (clipRect) @@ -2280,7 +2306,8 @@ void CD3D9Driver::setBasicRenderStates(const SMaterial& material, const SMateria if (resetAllRenderstates || lastmaterial.TextureLayer[st].BilinearFilter != material.TextureLayer[st].BilinearFilter || lastmaterial.TextureLayer[st].TrilinearFilter != material.TextureLayer[st].TrilinearFilter || - lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter) + lastmaterial.TextureLayer[st].AnisotropicFilter != material.TextureLayer[st].AnisotropicFilter || + lastmaterial.UseMipMaps != material.UseMipMaps) { if (material.TextureLayer[st].BilinearFilter || material.TextureLayer[st].TrilinearFilter || material.TextureLayer[st].AnisotropicFilter) { diff --git a/source/Irrlicht/CD3D9Driver.h b/source/Irrlicht/CD3D9Driver.h index 4845cc96..d29bf138 100644 --- a/source/Irrlicht/CD3D9Driver.h +++ b/source/Irrlicht/CD3D9Driver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -442,6 +442,8 @@ namespace video u32 MaxTextureUnits; u32 MaxUserClipPlanes; + u32 MaxMRTs; + u32 NumSetMRTs; f32 MaxLightDistance; s32 LastSetLight; diff --git a/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp b/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp index bb8ea807..7c2978e5 100644 --- a/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp +++ b/source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9HLSLMaterialRenderer.h b/source/Irrlicht/CD3D9HLSLMaterialRenderer.h index 91744739..db45033a 100644 --- a/source/Irrlicht/CD3D9HLSLMaterialRenderer.h +++ b/source/Irrlicht/CD3D9HLSLMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9MaterialRenderer.h b/source/Irrlicht/CD3D9MaterialRenderer.h index 284ac8ff..bc87b471 100644 --- a/source/Irrlicht/CD3D9MaterialRenderer.h +++ b/source/Irrlicht/CD3D9MaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -289,7 +289,7 @@ public: pID3DDevice->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); - pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); + pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); } @@ -578,23 +578,22 @@ public: { if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) { - pID3DDevice->SetTextureStageState (0, D3DTSS_COLOROP, D3DTOP_MODULATE); - pID3DDevice->SetTextureStageState (0, D3DTSS_COLORARG1, D3DTA_TEXTURE); - pID3DDevice->SetTextureStageState (0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); - pID3DDevice->SetTextureStageState (0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); + pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE); pID3DDevice->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE); pID3DDevice->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT); - pID3DDevice->SetTransform( D3DTS_TEXTURE1, &SphereMapMatrixD3D9 ); - pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); - pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); - pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &SphereMapMatrixD3D9 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); - pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); + pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); } services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); @@ -602,9 +601,9 @@ public: virtual void OnUnsetMaterial() { - pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); - pID3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 1); - pID3DDevice->SetTransform( D3DTS_TEXTURE1, &UnitMatrixD3D9 ); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 1); + pID3DDevice->SetTransform(D3DTS_TEXTURE1, &UnitMatrixD3D9); } //! Returns if the material is transparent. The scene managment needs to know this diff --git a/source/Irrlicht/CD3D9NormalMapRenderer.cpp b/source/Irrlicht/CD3D9NormalMapRenderer.cpp index c175d931..5ced0b54 100644 --- a/source/Irrlicht/CD3D9NormalMapRenderer.cpp +++ b/source/Irrlicht/CD3D9NormalMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9NormalMapRenderer.h b/source/Irrlicht/CD3D9NormalMapRenderer.h index 432ec552..103d5b22 100644 --- a/source/Irrlicht/CD3D9NormalMapRenderer.h +++ b/source/Irrlicht/CD3D9NormalMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp b/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp index 5ca4b622..faf8a443 100644 --- a/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp +++ b/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9ParallaxMapRenderer.h b/source/Irrlicht/CD3D9ParallaxMapRenderer.h index a62373d7..55925680 100644 --- a/source/Irrlicht/CD3D9ParallaxMapRenderer.h +++ b/source/Irrlicht/CD3D9ParallaxMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp b/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp index 4647c894..81cf5595 100644 --- a/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp +++ b/source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9ShaderMaterialRenderer.h b/source/Irrlicht/CD3D9ShaderMaterialRenderer.h index 66354de5..f04f7f76 100644 --- a/source/Irrlicht/CD3D9ShaderMaterialRenderer.h +++ b/source/Irrlicht/CD3D9ShaderMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CD3D9Texture.cpp b/source/Irrlicht/CD3D9Texture.cpp index ec72c34b..aff46232 100644 --- a/source/Irrlicht/CD3D9Texture.cpp +++ b/source/Irrlicht/CD3D9Texture.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -383,7 +383,7 @@ bool CD3D9Texture::copyTexture(IImage * image) //! lock function -void* CD3D9Texture::lock(bool readOnly, u32 mipmapLevel) +void* CD3D9Texture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) { if (!Texture) return 0; @@ -393,7 +393,7 @@ void* CD3D9Texture::lock(bool readOnly, u32 mipmapLevel) D3DLOCKED_RECT rect; if(!IsRenderTarget) { - hr = Texture->LockRect(mipmapLevel, &rect, 0, readOnly?D3DLOCK_READONLY:0); + hr = Texture->LockRect(mipmapLevel, &rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); if (FAILED(hr)) { os::Printer::log("Could not lock DIRECT3D9 Texture.", ELL_ERROR); @@ -429,7 +429,7 @@ void* CD3D9Texture::lock(bool readOnly, u32 mipmapLevel) os::Printer::log("Could not lock DIRECT3D9 Texture", "Data copy failed.", ELL_ERROR); return 0; } - hr = RTTSurface->LockRect(&rect, 0, readOnly?D3DLOCK_READONLY:0); + hr = RTTSurface->LockRect(&rect, 0, (mode==ETLM_READ_ONLY)?D3DLOCK_READONLY:0); if(FAILED(hr)) { os::Printer::log("Could not lock DIRECT3D9 Texture", "LockRect failed.", ELL_ERROR); diff --git a/source/Irrlicht/CD3D9Texture.h b/source/Irrlicht/CD3D9Texture.h index 19927f1c..3c8ca4e5 100644 --- a/source/Irrlicht/CD3D9Texture.h +++ b/source/Irrlicht/CD3D9Texture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -42,7 +42,7 @@ public: virtual ~CD3D9Texture(); //! lock function - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0); + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); //! unlock function virtual void unlock(); diff --git a/source/Irrlicht/CDMFLoader.cpp b/source/Irrlicht/CDMFLoader.cpp index 260befc9..c8491cb8 100644 --- a/source/Irrlicht/CDMFLoader.cpp +++ b/source/Irrlicht/CDMFLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CDMFLoader.h b/source/Irrlicht/CDMFLoader.h index 4727befe..4d0c866f 100644 --- a/source/Irrlicht/CDMFLoader.h +++ b/source/Irrlicht/CDMFLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CDefaultGUIElementFactory.cpp b/source/Irrlicht/CDefaultGUIElementFactory.cpp index 07cc11d3..8ea59d13 100644 --- a/source/Irrlicht/CDefaultGUIElementFactory.cpp +++ b/source/Irrlicht/CDefaultGUIElementFactory.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDefaultGUIElementFactory.h b/source/Irrlicht/CDefaultGUIElementFactory.h index 5a8b1423..28241d15 100644 --- a/source/Irrlicht/CDefaultGUIElementFactory.h +++ b/source/Irrlicht/CDefaultGUIElementFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp index ef913f6a..f3a879fe 100644 --- a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp +++ b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h index d9f59c1d..6c749830 100644 --- a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h +++ b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDefaultSceneNodeFactory.cpp b/source/Irrlicht/CDefaultSceneNodeFactory.cpp index 48256f21..1debd65d 100644 --- a/source/Irrlicht/CDefaultSceneNodeFactory.cpp +++ b/source/Irrlicht/CDefaultSceneNodeFactory.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -49,6 +49,7 @@ CDefaultSceneNodeFactory::CDefaultSceneNodeFactory(ISceneManager* mgr) SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_BILLBOARD, "billBoard")); SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_ANIMATED_MESH, "animatedMesh")); SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_PARTICLE_SYSTEM, "particleSystem")); + SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_VOLUME_LIGHT, "volumeLight")); // SupportedSceneNodeTypes.push_back(SSceneNodeTypePair(ESNT_MD3_SCENE_NODE, "md3")); // legacy, for version <= 1.4.x irr files @@ -108,6 +109,8 @@ ISceneNode* CDefaultSceneNodeFactory::addSceneNode(ESCENE_NODE_TYPE type, IScene core::vector3df(), core::vector3df(1,1,1), true); case ESNT_PARTICLE_SYSTEM: return Manager->addParticleSystemSceneNode(true, parent); + case ESNT_VOLUME_LIGHT: + return (ISceneNode*)Manager->addVolumeLightSceneNode(parent); default: break; } diff --git a/source/Irrlicht/CDefaultSceneNodeFactory.h b/source/Irrlicht/CDefaultSceneNodeFactory.h index a3bad9c0..079204f5 100644 --- a/source/Irrlicht/CDefaultSceneNodeFactory.h +++ b/source/Irrlicht/CDefaultSceneNodeFactory.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDepthBuffer.cpp b/source/Irrlicht/CDepthBuffer.cpp index 994401ab..509810bf 100644 --- a/source/Irrlicht/CDepthBuffer.cpp +++ b/source/Irrlicht/CDepthBuffer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDepthBuffer.h b/source/Irrlicht/CDepthBuffer.h index 2db2c842..31f81f18 100644 --- a/source/Irrlicht/CDepthBuffer.h +++ b/source/Irrlicht/CDepthBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDummyTransformationSceneNode.cpp b/source/Irrlicht/CDummyTransformationSceneNode.cpp index dc020720..d279a783 100644 --- a/source/Irrlicht/CDummyTransformationSceneNode.cpp +++ b/source/Irrlicht/CDummyTransformationSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CDummyTransformationSceneNode.h b/source/Irrlicht/CDummyTransformationSceneNode.h index 379a4857..94650bc5 100644 --- a/source/Irrlicht/CDummyTransformationSceneNode.h +++ b/source/Irrlicht/CDummyTransformationSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CEmptySceneNode.cpp b/source/Irrlicht/CEmptySceneNode.cpp index eb583e31..98b4e0ae 100644 --- a/source/Irrlicht/CEmptySceneNode.cpp +++ b/source/Irrlicht/CEmptySceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CEmptySceneNode.h b/source/Irrlicht/CEmptySceneNode.h index 9f5c33b0..e15d9026 100644 --- a/source/Irrlicht/CEmptySceneNode.h +++ b/source/Irrlicht/CEmptySceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CFPSCounter.cpp b/source/Irrlicht/CFPSCounter.cpp index 2466f75c..ad5b7c59 100644 --- a/source/Irrlicht/CFPSCounter.cpp +++ b/source/Irrlicht/CFPSCounter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CFPSCounter.h b/source/Irrlicht/CFPSCounter.h index 358ee6df..1e107423 100644 --- a/source/Irrlicht/CFPSCounter.h +++ b/source/Irrlicht/CFPSCounter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CFileList.cpp b/source/Irrlicht/CFileList.cpp index b82dda96..48e19d47 100644 --- a/source/Irrlicht/CFileList.cpp +++ b/source/Irrlicht/CFileList.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -128,18 +128,19 @@ u32 CFileList::getFileOffset(u32 index) const s32 CFileList::findFile(const io::path& filename, bool isDirectory = false) const { SFileListEntry entry; + // we only need FullName to be set for the search entry.FullName = filename; entry.IsDirectory = isDirectory; - // swap + // exchange entry.FullName.replace('\\', '/'); // remove trailing slash - if (entry.Name.lastChar() == '/') + if (entry.FullName.lastChar() == '/') { entry.IsDirectory = true; - entry.Name[ entry.Name.size()-1] = 0; - entry.Name.validate(); + entry.FullName[entry.FullName.size()-1] = 0; + entry.FullName.validate(); } if (IgnoreCase) @@ -151,12 +152,14 @@ s32 CFileList::findFile(const io::path& filename, bool isDirectory = false) cons return Files.binary_search(entry); } + //! Returns the base path of the file list const io::path& CFileList::getPath() const { return Path; } + } // end namespace irr } // end namespace io diff --git a/source/Irrlicht/CFileList.h b/source/Irrlicht/CFileList.h index ef6e6027..94423fa6 100644 --- a/source/Irrlicht/CFileList.h +++ b/source/Irrlicht/CFileList.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CFileSystem.cpp b/source/Irrlicht/CFileSystem.cpp index 42d759dd..0cbaa209 100644 --- a/source/Irrlicht/CFileSystem.cpp +++ b/source/Irrlicht/CFileSystem.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -21,6 +21,7 @@ #include "CAttributes.h" #include "CMemoryFile.h" #include "CLimitReadFile.h" +#include "irrList.h" #if defined (_IRR_WINDOWS_API_) #if !defined ( _WIN32_WCE ) @@ -206,7 +207,11 @@ bool CFileSystem::addFileArchive(const io::path& filename, bool ignoreCase, // check if the archive was already loaded for (i = 0; i < FileArchives.size(); ++i) { - if (getAbsolutePath(filename) == FileArchives[i]->getFileList()->getPath()) + // TODO: This should go into a path normalization method + // We need to check for directory names with trailing slash and without + const core::stringc absPath = getAbsolutePath(filename); + const core::stringc arcPath = FileArchives[i]->getFileList()->getPath(); + if ((absPath == arcPath) || ((absPath+"/") == arcPath)) { if (password.size()) FileArchives[i]->Password=password; @@ -588,7 +593,43 @@ io::path& CFileSystem::flattenFilename(io::path& directory, const io::path& root } -//! Creates a list of files and directories in the current working directory +//! Get the relative filename, relative to the given directory +path CFileSystem::getRelativeFilename(const path& filename, const path& directory) const +{ + io::path path, file, ext; + core::splitFilename(getAbsolutePath(filename), &path, &file, &ext); + io::path path2(getAbsolutePath(directory)); + core::list list1, list2; + path.split(list1, "/\\", 2); + path2.split(list2, "/\\", 2); + u32 i=0; + core::list::ConstIterator it1,it2; + it1=list1.begin(); + it2=list2.begin(); + for (; idraw(Text.c_str(), rect, - skin->getColor(IsEnabled ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), true, true, &AbsoluteClippingRect); } diff --git a/source/Irrlicht/CGUIButton.h b/source/Irrlicht/CGUIButton.h index 2a1119cf..c3a3336e 100644 --- a/source/Irrlicht/CGUIButton.h +++ b/source/Irrlicht/CGUIButton.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUICheckBox.cpp b/source/Irrlicht/CGUICheckBox.cpp index f543fe99..92bc5d3c 100644 --- a/source/Irrlicht/CGUICheckBox.cpp +++ b/source/Irrlicht/CGUICheckBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -34,7 +34,7 @@ CGUICheckBox::CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIEleme //! called if an event happened. bool CGUICheckBox::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) { @@ -127,36 +127,42 @@ void CGUICheckBox::draw() return; IGUISkin* skin = Environment->getSkin(); - - core::rect rect = AbsoluteRect; - - s32 height = skin->getSize(EGDS_CHECK_BOX_WIDTH); - - core::rect checkRect(AbsoluteRect.UpperLeftCorner.X, - ((AbsoluteRect.getHeight() - height) / 2) + AbsoluteRect.UpperLeftCorner.Y, - 0, 0); - - checkRect.LowerRightCorner.X = checkRect.UpperLeftCorner.X + height; - checkRect.LowerRightCorner.Y = checkRect.UpperLeftCorner.Y + height; - - skin->draw3DSunkenPane(this, skin->getColor(Pressed || !IsEnabled ? EGDC_3D_FACE : EGDC_ACTIVE_CAPTION), - false, true, checkRect, &AbsoluteClippingRect); - - if (Checked && Environment->getSkin()) - Environment->getSkin()->drawIcon(this, EGDI_CHECK_BOX_CHECKED, checkRect.getCenter(), - checkTime, os::Timer::getTime(), false, &AbsoluteClippingRect); - - if (Text.size()) + if (skin) { - checkRect = AbsoluteRect; - checkRect.UpperLeftCorner.X += height + 5; + const core::rect rect = AbsoluteRect; + const s32 height = skin->getSize(EGDS_CHECK_BOX_WIDTH); - IGUIFont* font = skin->getFont(); - if (font) - font->draw(Text.c_str(), checkRect, - skin->getColor(IsEnabled ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &AbsoluteClippingRect); + core::rect checkRect(AbsoluteRect.UpperLeftCorner.X, + ((AbsoluteRect.getHeight() - height) / 2) + AbsoluteRect.UpperLeftCorner.Y, + 0, 0); + + checkRect.LowerRightCorner.X = checkRect.UpperLeftCorner.X + height; + checkRect.LowerRightCorner.Y = checkRect.UpperLeftCorner.Y + height; + + EGUI_DEFAULT_COLOR col = EGDC_GRAY_EDITABLE; + if ( isEnabled() ) + col = Pressed ? EGDC_FOCUSED_EDITABLE : EGDC_EDITABLE; + skin->draw3DSunkenPane(this, skin->getColor(col), + false, true, checkRect, &AbsoluteClippingRect); + + if (Checked) + { + skin->drawIcon(this, EGDI_CHECK_BOX_CHECKED, checkRect.getCenter(), + checkTime, os::Timer::getTime(), false, &AbsoluteClippingRect); + } + if (Text.size()) + { + checkRect = AbsoluteRect; + checkRect.UpperLeftCorner.X += height + 5; + + IGUIFont* font = skin->getFont(); + if (font) + { + font->draw(Text.c_str(), checkRect, + skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &AbsoluteClippingRect); + } + } } - IGUIElement::draw(); } diff --git a/source/Irrlicht/CGUICheckBox.h b/source/Irrlicht/CGUICheckBox.h index ced97bf0..9c7a09df 100644 --- a/source/Irrlicht/CGUICheckBox.h +++ b/source/Irrlicht/CGUICheckBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIColorSelectDialog.cpp b/source/Irrlicht/CGUIColorSelectDialog.cpp index 2306d57a..8ad64cb8 100644 --- a/source/Irrlicht/CGUIColorSelectDialog.cpp +++ b/source/Irrlicht/CGUIColorSelectDialog.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -273,7 +273,7 @@ void CGUIColorSelectDialog::buildColorRing( const core::dimension2d & dim, { const u32 alpha = (u32) ( (rTest - 0.5f ) * ( 255.f / 0.05f ) ); rgb.setAlpha(alpha); - } + } else if ( rTest >= 0.95f ) { const u32 alpha = (u32) ( (rTest - 0.95f ) * ( 255.f / 0.05f ) ); @@ -312,7 +312,7 @@ void CGUIColorSelectDialog::buildColorRing( const core::dimension2d & dim, //! called if an event happened. bool CGUIColorSelectDialog::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) { diff --git a/source/Irrlicht/CGUIColorSelectDialog.h b/source/Irrlicht/CGUIColorSelectDialog.h index 4920eb64..0edde5cf 100644 --- a/source/Irrlicht/CGUIColorSelectDialog.h +++ b/source/Irrlicht/CGUIColorSelectDialog.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIComboBox.cpp b/source/Irrlicht/CGUIComboBox.cpp index 6e113066..3ab01eca 100644 --- a/source/Irrlicht/CGUIComboBox.cpp +++ b/source/Irrlicht/CGUIComboBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -182,7 +182,7 @@ void CGUIComboBox::setSelected(s32 idx) //! called if an event happened. bool CGUIComboBox::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) { @@ -377,8 +377,8 @@ void CGUIComboBox::draw() SelectedText->setDrawBackground(false); SelectedText->setOverrideColor(skin->getColor(EGDC_GRAY_TEXT)); } - ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); - ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL)); + ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL)); + ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL)); core::rect frameRect(AbsoluteRect); diff --git a/source/Irrlicht/CGUIComboBox.h b/source/Irrlicht/CGUIComboBox.h index f56c552f..1c656d8d 100644 --- a/source/Irrlicht/CGUIComboBox.h +++ b/source/Irrlicht/CGUIComboBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIContextMenu.cpp b/source/Irrlicht/CGUIContextMenu.cpp index 935fff4d..dc6618f1 100644 --- a/source/Irrlicht/CGUIContextMenu.cpp +++ b/source/Irrlicht/CGUIContextMenu.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -276,7 +276,7 @@ void CGUIContextMenu::removeAllItems() //! called if an event happened. bool CGUIContextMenu::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -288,15 +288,24 @@ bool CGUIContextMenu::OnEvent(const SEvent& event) if (event.GUIEvent.Caller == this && !isMyChild(event.GUIEvent.Element) && AllowFocus) { // set event parent of submenus - setEventParent(EventParent ? EventParent : Parent); + IGUIElement * p = EventParent ? EventParent : Parent; + setEventParent(p); - if ( CloseHandling & ECMC_HIDE ) + SEvent event; + event.EventType = EET_GUI_EVENT; + event.GUIEvent.Caller = this; + event.GUIEvent.Element = 0; + event.GUIEvent.EventType = EGET_ELEMENT_CLOSED; + if ( !p->OnEvent(event) ) { - setVisible(false); - } - if ( CloseHandling & ECMC_REMOVE ) - { - remove(); + if ( CloseHandling & ECMC_HIDE ) + { + setVisible(false); + } + if ( CloseHandling & ECMC_REMOVE ) + { + remove(); + } } return false; @@ -417,11 +426,16 @@ u32 CGUIContextMenu::sendClick(const core::position2d& p) //! returns true, if an element was highligted bool CGUIContextMenu::highlight(const core::position2d& p, bool canOpenSubMenu) { + if (!isEnabled()) + { + return false; + } + // get number of open submenu s32 openmenu = -1; s32 i; for (i=0; i<(s32)Items.size(); ++i) - if (Items[i].SubMenu && Items[i].SubMenu->isVisible()) + if (Items[i].Enabled && Items[i].SubMenu && Items[i].SubMenu->isVisible()) { openmenu = i; break; @@ -430,7 +444,7 @@ bool CGUIContextMenu::highlight(const core::position2d& p, bool canOpenSubM // delegate highlight operation to submenu if (openmenu != -1) { - if (Items[openmenu].SubMenu->highlight(p, canOpenSubMenu)) + if (Items[openmenu].Enabled && Items[openmenu].SubMenu->highlight(p, canOpenSubMenu)) { HighLighted = openmenu; ChangeTime = os::Timer::getTime(); @@ -440,7 +454,8 @@ bool CGUIContextMenu::highlight(const core::position2d& p, bool canOpenSubM // highlight myself for (i=0; i<(s32)Items.size(); ++i) - if (getHRect(Items[i], AbsoluteRect).isPointInside(p)) + { + if (Items[i].Enabled && getHRect(Items[i], AbsoluteRect).isPointInside(p)) { HighLighted = i; ChangeTime = os::Timer::getTime(); @@ -456,6 +471,7 @@ bool CGUIContextMenu::highlight(const core::position2d& p, bool canOpenSubM } return true; } + } HighLighted = openmenu; return false; diff --git a/source/Irrlicht/CGUIContextMenu.h b/source/Irrlicht/CGUIContextMenu.h index e78e64d0..80786231 100644 --- a/source/Irrlicht/CGUIContextMenu.h +++ b/source/Irrlicht/CGUIContextMenu.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp index f5b81b2b..756100c3 100644 --- a/source/Irrlicht/CGUIEditBox.cpp +++ b/source/Irrlicht/CGUIEditBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -207,7 +207,7 @@ void CGUIEditBox::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT ver //! called if an event happened. bool CGUIEditBox::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -290,7 +290,7 @@ bool CGUIEditBox::processKey(const SEvent& event) sc = Text.subString(realmbgn, realmend - realmbgn).c_str(); Operator->copyToClipboard(sc.c_str()); - if (IsEnabled) + if (isEnabled()) { // delete core::stringw s; @@ -306,7 +306,7 @@ bool CGUIEditBox::processKey(const SEvent& event) } break; case KEY_KEY_V: - if ( !IsEnabled ) + if ( !isEnabled() ) break; // paste from the clipboard @@ -562,7 +562,7 @@ bool CGUIEditBox::processKey(const SEvent& event) break; case KEY_BACK: - if ( !this->IsEnabled ) + if ( !isEnabled() ) break; if (Text.size()) @@ -602,7 +602,7 @@ bool CGUIEditBox::processKey(const SEvent& event) } break; case KEY_DELETE: - if ( !this->IsEnabled ) + if ( !isEnabled() ) break; if (Text.size() != 0) @@ -708,7 +708,10 @@ void CGUIEditBox::draw() if (Border) { - skin->draw3DSunkenPane(this, skin->getColor(EGDC_WINDOW), + EGUI_DEFAULT_COLOR col = EGDC_GRAY_EDITABLE; + if ( isEnabled() ) + col = focus ? EGDC_FOCUSED_EDITABLE : EGDC_EDITABLE; + skin->draw3DSunkenPane(this, skin->getColor(col), false, true, FrameRect, &AbsoluteClippingRect); FrameRect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X)+1; @@ -757,7 +760,7 @@ void CGUIEditBox::draw() if (Text.size()) { - if (!IsEnabled && !OverrideColorEnabled) + if (!isEnabled() && !OverrideColorEnabled) { OverrideColorEnabled = true; OverrideColor = skin->getColor(EGDC_GRAY_TEXT); @@ -1053,7 +1056,7 @@ s32 CGUIEditBox::getCursorPos(s32 x, s32 y) if (x < CurrentTextRect.UpperLeftCorner.X) x = CurrentTextRect.UpperLeftCorner.X; - s32 idx = font->getCharacterFromPos(Text.c_str(), x - CurrentTextRect.UpperLeftCorner.X); + s32 idx = txtLine ? font->getCharacterFromPos(txtLine->c_str(), x - CurrentTextRect.UpperLeftCorner.X) : -1; // click was on or left of the line if (idx != -1) @@ -1270,7 +1273,7 @@ s32 CGUIEditBox::getLineFromPos(s32 pos) void CGUIEditBox::inputChar(wchar_t c) { - if (!IsEnabled) + if (!isEnabled()) return; if (c != 0) diff --git a/source/Irrlicht/CGUIEditBox.h b/source/Irrlicht/CGUIEditBox.h index 2a400f8e..39ae7498 100644 --- a/source/Irrlicht/CGUIEditBox.h +++ b/source/Irrlicht/CGUIEditBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index af7f0701..feec4bf6 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -1,5 +1,5 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -54,7 +54,7 @@ const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE = L"type"; //! constructor CGUIEnvironment::CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op) -: IGUIElement(EGUIET_ELEMENT, 0, 0, 0, core::rect(core::position2d(0,0), driver ? core::dimension2d(driver->getScreenSize()) : core::dimension2d(0,0))), +: IGUIElement(EGUIET_ROOT, 0, 0, 0, core::rect(core::position2d(0,0), driver ? core::dimension2d(driver->getScreenSize()) : core::dimension2d(0,0))), Driver(driver), Hovered(0), HoveredNoSubelement(0), Focus(0), LastHoveredMousePos(0,0), CurrentSkin(0), FileSystem(fs), UserReceiver(0), Operator(op) { @@ -699,6 +699,7 @@ IGUIElement* CGUIEnvironment::addGUIElement(const c8* elementName, IGUIElement* for (u32 i=0; iaddGUIElement(elementName, parent); + return node; } @@ -1481,6 +1482,21 @@ IGUIFont* CGUIEnvironment::addFont(const io::path& name, IGUIFont* font) return font; } +//! remove loaded font +void CGUIEnvironment::removeFont(IGUIFont* font) +{ + if ( !font ) + return; + for ( u32 i=0; idrop(); + Fonts.erase(i); + return; + } + } +} //! returns default font IGUIFont* CGUIEnvironment::getBuiltInFont() const diff --git a/source/Irrlicht/CGUIEnvironment.h b/source/Irrlicht/CGUIEnvironment.h index 16ca8ea6..e7944bb9 100644 --- a/source/Irrlicht/CGUIEnvironment.h +++ b/source/Irrlicht/CGUIEnvironment.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -80,6 +80,9 @@ public: //! add an externally loaded font virtual IGUIFont* addFont(const io::path& name, IGUIFont* font); + //! remove loaded font + virtual void removeFont(IGUIFont* font); + //! returns default font virtual IGUIFont* getBuiltInFont() const; diff --git a/source/Irrlicht/CGUIFileOpenDialog.cpp b/source/Irrlicht/CGUIFileOpenDialog.cpp index 2f22387d..164c9500 100644 --- a/source/Irrlicht/CGUIFileOpenDialog.cpp +++ b/source/Irrlicht/CGUIFileOpenDialog.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -145,7 +145,7 @@ const io::path& CGUIFileOpenDialog::getDirectoryName() //! called if an event happened. bool CGUIFileOpenDialog::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) { diff --git a/source/Irrlicht/CGUIFileOpenDialog.h b/source/Irrlicht/CGUIFileOpenDialog.h index 8aa4c7c2..9461c0b7 100644 --- a/source/Irrlicht/CGUIFileOpenDialog.h +++ b/source/Irrlicht/CGUIFileOpenDialog.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIFont.cpp b/source/Irrlicht/CGUIFont.cpp index 4919bddb..0e2a5253 100644 --- a/source/Irrlicht/CGUIFont.cpp +++ b/source/Irrlicht/CGUIFont.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -470,7 +470,7 @@ void CGUIFont::draw(const core::stringw& text, const core::rect& position, if (!Driver) return; - core::dimension2d textDimension; // NOTE: don't make this u32 or the >> later on can fail when the dimension widht is < position width + core::dimension2d textDimension; // NOTE: don't make this u32 or the >> later on can fail when the dimension width is < position width core::position2d offset = position.UpperLeftCorner; if (hcenter || vcenter || clip) diff --git a/source/Irrlicht/CGUIFont.h b/source/Irrlicht/CGUIFont.h index e9a8d30e..73427f3f 100644 --- a/source/Irrlicht/CGUIFont.h +++ b/source/Irrlicht/CGUIFont.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIImage.cpp b/source/Irrlicht/CGUIImage.cpp index 0bf3dd89..126a5d4a 100644 --- a/source/Irrlicht/CGUIImage.cpp +++ b/source/Irrlicht/CGUIImage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -49,6 +49,11 @@ void CGUIImage::setImage(video::ITexture* image) Texture->grab(); } +//! Gets the image texture +video::ITexture* CGUIImage::getImage() const +{ + return Texture; +} //! sets the color of the image void CGUIImage::setColor(video::SColor color) @@ -56,6 +61,11 @@ void CGUIImage::setColor(video::SColor color) Color = color; } +//! Gets the color of the image +video::SColor CGUIImage::getColor() const +{ + return Color; +} //! draws the element and its children void CGUIImage::draw() diff --git a/source/Irrlicht/CGUIImage.h b/source/Irrlicht/CGUIImage.h index f0a9d699..bf81de3f 100644 --- a/source/Irrlicht/CGUIImage.h +++ b/source/Irrlicht/CGUIImage.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -28,6 +28,9 @@ namespace gui //! sets an image virtual void setImage(video::ITexture* image); + //! Gets the image texture + virtual video::ITexture* getImage() const; + //! sets the color of the image virtual void setColor(video::SColor color); @@ -40,6 +43,9 @@ namespace gui //! sets if the image should use its alpha channel to draw itself virtual void setUseAlphaChannel(bool use); + //! Gets the color of the image + virtual video::SColor getColor() const; + //! Returns true if the image is scaled to fit, false if not virtual bool isImageScaled() const; diff --git a/source/Irrlicht/CGUIInOutFader.cpp b/source/Irrlicht/CGUIInOutFader.cpp index bf513ad2..f5226289 100644 --- a/source/Irrlicht/CGUIInOutFader.cpp +++ b/source/Irrlicht/CGUIInOutFader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIInOutFader.h b/source/Irrlicht/CGUIInOutFader.h index 6e9ba3e8..e97d31bf 100644 --- a/source/Irrlicht/CGUIInOutFader.h +++ b/source/Irrlicht/CGUIInOutFader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIListBox.cpp b/source/Irrlicht/CGUIListBox.cpp index ac5f3e7a..4d8e07f3 100644 --- a/source/Irrlicht/CGUIListBox.cpp +++ b/source/Irrlicht/CGUIListBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -162,7 +162,7 @@ void CGUIListBox::recalculateItemHeight() } TotalItemHeight = ItemHeight * Items.size(); - ScrollBar->setMax(TotalItemHeight - AbsoluteRect.getHeight()); + ScrollBar->setMax( core::max_(0, TotalItemHeight - AbsoluteRect.getHeight()) ); s32 minItemHeight = ItemHeight > 0 ? ItemHeight : 1; ScrollBar->setSmallStep ( minItemHeight ); ScrollBar->setLargeStep ( 2*minItemHeight ); @@ -213,7 +213,7 @@ void CGUIListBox::setSelected(const wchar_t *item) //! called if an event happened. bool CGUIListBox::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) { diff --git a/source/Irrlicht/CGUIListBox.h b/source/Irrlicht/CGUIListBox.h index 2aaa0811..ac1e101b 100644 --- a/source/Irrlicht/CGUIListBox.h +++ b/source/Irrlicht/CGUIListBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIMenu.cpp b/source/Irrlicht/CGUIMenu.cpp index 76c37268..ee92a91a 100644 --- a/source/Irrlicht/CGUIMenu.cpp +++ b/source/Irrlicht/CGUIMenu.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -100,7 +100,7 @@ void CGUIMenu::draw() //! called if an event happened. bool CGUIMenu::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) diff --git a/source/Irrlicht/CGUIMenu.h b/source/Irrlicht/CGUIMenu.h index c7168f76..01509ef3 100644 --- a/source/Irrlicht/CGUIMenu.h +++ b/source/Irrlicht/CGUIMenu.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIMeshViewer.cpp b/source/Irrlicht/CGUIMeshViewer.cpp index b7f11919..3a901320 100644 --- a/source/Irrlicht/CGUIMeshViewer.cpp +++ b/source/Irrlicht/CGUIMeshViewer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIMeshViewer.h b/source/Irrlicht/CGUIMeshViewer.h index cf6d148c..60e7ad6c 100644 --- a/source/Irrlicht/CGUIMeshViewer.h +++ b/source/Irrlicht/CGUIMeshViewer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIMessageBox.cpp b/source/Irrlicht/CGUIMessageBox.cpp index f30acef4..76148a7c 100644 --- a/source/Irrlicht/CGUIMessageBox.cpp +++ b/source/Irrlicht/CGUIMessageBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -254,7 +254,7 @@ void CGUIMessageBox::refreshControls() //! called if an event happened. bool CGUIMessageBox::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { SEvent outevent; outevent.EventType = EET_GUI_EVENT; diff --git a/source/Irrlicht/CGUIMessageBox.h b/source/Irrlicht/CGUIMessageBox.h index 3885c8c8..7c43b771 100644 --- a/source/Irrlicht/CGUIMessageBox.h +++ b/source/Irrlicht/CGUIMessageBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIModalScreen.cpp b/source/Irrlicht/CGUIModalScreen.cpp index bcdf6452..895471ed 100644 --- a/source/Irrlicht/CGUIModalScreen.cpp +++ b/source/Irrlicht/CGUIModalScreen.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -77,7 +77,7 @@ bool CGUIModalScreen::isPointInside(const core::position2d& point) const //! called if an event happened. bool CGUIModalScreen::OnEvent(const SEvent& event) { - if (!IsEnabled || !isVisible() ) + if (!isEnabled() || !isVisible() ) return IGUIElement::OnEvent(event); switch(event.EventType) @@ -88,14 +88,27 @@ bool CGUIModalScreen::OnEvent(const SEvent& event) case EGET_ELEMENT_FOCUSED: if ( !canTakeFocus(event.GUIEvent.Caller)) { - Environment->setFocus(this); + if ( !Children.empty() ) + Environment->setFocus(*(Children.begin())); + else + Environment->setFocus(this); } IGUIElement::OnEvent(event); return false; case EGET_ELEMENT_FOCUS_LOST: if ( !canTakeFocus(event.GUIEvent.Element)) { - MouseDownTime = os::Timer::getTime(); + if ( isMyChild(event.GUIEvent.Caller) ) + { + if ( !Children.empty() ) + Environment->setFocus(*(Children.begin())); + else + Environment->setFocus(this); + } + else + { + MouseDownTime = os::Timer::getTime(); + } return true; } else @@ -118,7 +131,7 @@ bool CGUIModalScreen::OnEvent(const SEvent& event) break; } - IGUIElement::OnEvent(event); + IGUIElement::OnEvent(event); // anyone knows why events are passed on here? Causes p.e. problems when this is child of a CGUIWindow. return true; // absorb everything else } diff --git a/source/Irrlicht/CGUIModalScreen.h b/source/Irrlicht/CGUIModalScreen.h index cac27d6c..c934aa4e 100644 --- a/source/Irrlicht/CGUIModalScreen.h +++ b/source/Irrlicht/CGUIModalScreen.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIScrollBar.cpp b/source/Irrlicht/CGUIScrollBar.cpp index b2986cea..b61708a4 100644 --- a/source/Irrlicht/CGUIScrollBar.cpp +++ b/source/Irrlicht/CGUIScrollBar.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -59,7 +59,7 @@ CGUIScrollBar::~CGUIScrollBar() //! called if an event happened. bool CGUIScrollBar::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -280,7 +280,7 @@ void CGUIScrollBar::draw() return; - video::SColor iconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + video::SColor iconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); if ( iconColor != CurrentIconColor ) { refreshControls(); @@ -406,7 +406,9 @@ s32 CGUIScrollBar::getMax() const //! sets the maximum value of the scrollbar. void CGUIScrollBar::setMax(s32 max) { - Max = core::max_ ( max, Min ); + Max = max; + if ( Min > Max ) + Min = Max; bool enable = core::isnotzero ( range() ); UpButton->setEnabled(enable); @@ -424,7 +426,10 @@ s32 CGUIScrollBar::getMin() const //! sets the minimum value of the scrollbar. void CGUIScrollBar::setMin(s32 min) { - Min = core::min_ ( min, Max ); + Min = min; + if ( Max < Min ) + Max = Min; + bool enable = core::isnotzero ( range() ); UpButton->setEnabled(enable); @@ -451,7 +456,7 @@ void CGUIScrollBar::refreshControls() if (skin) { sprites = skin->getSpriteBank(); - CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); } if (Horizontal) diff --git a/source/Irrlicht/CGUIScrollBar.h b/source/Irrlicht/CGUIScrollBar.h index 26a4b6f1..850137a8 100644 --- a/source/Irrlicht/CGUIScrollBar.h +++ b/source/Irrlicht/CGUIScrollBar.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUISkin.cpp b/source/Irrlicht/CGUISkin.cpp index 395691d6..db827eea 100644 --- a/source/Irrlicht/CGUISkin.cpp +++ b/source/Irrlicht/CGUISkin.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -7,6 +7,7 @@ #include "IGUIFont.h" #include "IGUISpriteBank.h" +#include "IGUIElement.h" #include "IVideoDriver.h" #include "IAttributes.h" @@ -24,27 +25,32 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver) if ((Type == EGST_WINDOWS_CLASSIC) || (Type == EGST_WINDOWS_METALLIC)) { - Colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,50); - Colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,130); - Colors[EGDC_3D_FACE] = video::SColor(101,210,210,210); - Colors[EGDC_3D_HIGH_LIGHT] = video::SColor(101,255,255,255); - Colors[EGDC_3D_LIGHT] = video::SColor(101,210,210,210); - Colors[EGDC_ACTIVE_BORDER] = video::SColor(101,16,14,115); - Colors[EGDC_ACTIVE_CAPTION] = video::SColor(255,255,255,255); - Colors[EGDC_APP_WORKSPACE] = video::SColor(101,100,100,100); - Colors[EGDC_BUTTON_TEXT] = video::SColor(240,10,10,10); - Colors[EGDC_GRAY_TEXT] = video::SColor(240,130,130,130); - Colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,107); - Colors[EGDC_HIGH_LIGHT_TEXT] = video::SColor(240,255,255,255); - Colors[EGDC_INACTIVE_BORDER] = video::SColor(101,165,165,165); - Colors[EGDC_INACTIVE_CAPTION] = video::SColor(255,30,30,30); - Colors[EGDC_TOOLTIP] = video::SColor(200,0,0,0); - Colors[EGDC_TOOLTIP_BACKGROUND]= video::SColor(200,255,255,225); - Colors[EGDC_SCROLLBAR] = video::SColor(101,230,230,230); - Colors[EGDC_WINDOW] = video::SColor(101,255,255,255); - Colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10); - Colors[EGDC_ICON] = video::SColor(200,255,255,255); - Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107); + Colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,50); + Colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,130); + Colors[EGDC_3D_FACE] = video::SColor(101,210,210,210); + Colors[EGDC_3D_HIGH_LIGHT] = video::SColor(101,255,255,255); + Colors[EGDC_3D_LIGHT] = video::SColor(101,210,210,210); + Colors[EGDC_ACTIVE_BORDER] = video::SColor(101,16,14,115); + Colors[EGDC_ACTIVE_CAPTION] = video::SColor(255,255,255,255); + Colors[EGDC_APP_WORKSPACE] = video::SColor(101,100,100,100); + Colors[EGDC_BUTTON_TEXT] = video::SColor(240,10,10,10); + Colors[EGDC_GRAY_TEXT] = video::SColor(240,130,130,130); + Colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,107); + Colors[EGDC_HIGH_LIGHT_TEXT] = video::SColor(240,255,255,255); + Colors[EGDC_INACTIVE_BORDER] = video::SColor(101,165,165,165); + Colors[EGDC_INACTIVE_CAPTION] = video::SColor(255,30,30,30); + Colors[EGDC_TOOLTIP] = video::SColor(200,0,0,0); + Colors[EGDC_TOOLTIP_BACKGROUND] = video::SColor(200,255,255,225); + Colors[EGDC_SCROLLBAR] = video::SColor(101,230,230,230); + Colors[EGDC_WINDOW] = video::SColor(101,255,255,255); + Colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10); + Colors[EGDC_ICON] = video::SColor(200,255,255,255); + Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107); + Colors[EGDC_GRAY_WINDOW_SYMBOL] = video::SColor(240,100,100,100); + Colors[EGDC_EDITABLE] = video::SColor(101,255,255,255); + Colors[EGDC_GRAY_EDITABLE] = video::SColor(101,200,200,200); + Colors[EGDC_FOCUSED_EDITABLE] = video::SColor(101,230,230,255); + Sizes[EGDS_SCROLLBAR_SIZE] = 14; Sizes[EGDS_MENU_HEIGHT] = 30; @@ -64,28 +70,32 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver) else { //0x80a6a8af - Colors[EGDC_3D_DARK_SHADOW] = 0x60767982; - //Colors[EGDC_3D_FACE] = 0xc0c9ccd4; // tab background - Colors[EGDC_3D_FACE] = 0xc0cbd2d9; // tab background - Colors[EGDC_3D_SHADOW] = 0x50e4e8f1; // tab background, and left-top highlight - Colors[EGDC_3D_HIGH_LIGHT] = 0x40c7ccdc; - Colors[EGDC_3D_LIGHT] = 0x802e313a; - Colors[EGDC_ACTIVE_BORDER] = 0x80404040; // window title - Colors[EGDC_ACTIVE_CAPTION] = 0xffd0d0d0; - Colors[EGDC_APP_WORKSPACE] = 0xc0646464; // unused - Colors[EGDC_BUTTON_TEXT] = 0xd0161616; - Colors[EGDC_GRAY_TEXT] = 0x3c141414; - Colors[EGDC_HIGH_LIGHT] = 0x6c606060; - Colors[EGDC_HIGH_LIGHT_TEXT]= 0xd0e0e0e0; - Colors[EGDC_INACTIVE_BORDER]= 0xf0a5a5a5; - Colors[EGDC_INACTIVE_CAPTION]= 0xffd2d2d2; - Colors[EGDC_TOOLTIP] = 0xf00f2033; - Colors[EGDC_TOOLTIP_BACKGROUND]=0xc0cbd2d9; - Colors[EGDC_SCROLLBAR] = 0xf0e0e0e0; - Colors[EGDC_WINDOW] = 0xf0f0f0f0; - Colors[EGDC_WINDOW_SYMBOL] = 0xd0161616; - Colors[EGDC_ICON] = 0xd0161616; - Colors[EGDC_ICON_HIGH_LIGHT]= 0xd0606060; + Colors[EGDC_3D_DARK_SHADOW] = 0x60767982; + //Colors[EGDC_3D_FACE] = 0xc0c9ccd4; // tab background + Colors[EGDC_3D_FACE] = 0xc0cbd2d9; // tab background + Colors[EGDC_3D_SHADOW] = 0x50e4e8f1; // tab background, and left-top highlight + Colors[EGDC_3D_HIGH_LIGHT] = 0x40c7ccdc; + Colors[EGDC_3D_LIGHT] = 0x802e313a; + Colors[EGDC_ACTIVE_BORDER] = 0x80404040; // window title + Colors[EGDC_ACTIVE_CAPTION] = 0xffd0d0d0; + Colors[EGDC_APP_WORKSPACE] = 0xc0646464; // unused + Colors[EGDC_BUTTON_TEXT] = 0xd0161616; + Colors[EGDC_GRAY_TEXT] = 0x3c141414; + Colors[EGDC_HIGH_LIGHT] = 0x6c606060; + Colors[EGDC_HIGH_LIGHT_TEXT] = 0xd0e0e0e0; + Colors[EGDC_INACTIVE_BORDER] = 0xf0a5a5a5; + Colors[EGDC_INACTIVE_CAPTION] = 0xffd2d2d2; + Colors[EGDC_TOOLTIP] = 0xf00f2033; + Colors[EGDC_TOOLTIP_BACKGROUND] = 0xc0cbd2d9; + Colors[EGDC_SCROLLBAR] = 0xf0e0e0e0; + Colors[EGDC_WINDOW] = 0xf0f0f0f0; + Colors[EGDC_WINDOW_SYMBOL] = 0xd0161616; + Colors[EGDC_ICON] = 0xd0161616; + Colors[EGDC_ICON_HIGH_LIGHT] = 0xd0606060; + Colors[EGDC_GRAY_WINDOW_SYMBOL] = 0x3c101010; + Colors[EGDC_EDITABLE] = 0xf0ffffff; + Colors[EGDC_GRAY_EDITABLE] = 0xf0cccccc; + Colors[EGDC_FOCUSED_EDITABLE] = 0xf0fffff0; Sizes[EGDS_SCROLLBAR_SIZE] = 14; Sizes[EGDS_MENU_HEIGHT] = 48; @@ -909,9 +919,9 @@ void CGUISkin::drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, if (!SpriteBank) return; - // TODO: we need another state for disabled elements (can't add now because it's an interface change) + bool gray = element && !element->isEnabled(); SpriteBank->draw2DSprite(Icons[icon], position, clip, - Colors[EGDC_WINDOW_SYMBOL], starttime, currenttime, loop, true); + Colors[gray? EGDC_GRAY_WINDOW_SYMBOL : EGDC_WINDOW_SYMBOL], starttime, currenttime, loop, true); } diff --git a/source/Irrlicht/CGUISkin.h b/source/Irrlicht/CGUISkin.h index 7921fa8e..c9c29fdf 100644 --- a/source/Irrlicht/CGUISkin.h +++ b/source/Irrlicht/CGUISkin.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUISpinBox.cpp b/source/Irrlicht/CGUISpinBox.cpp index e31506ac..add98fec 100644 --- a/source/Irrlicht/CGUISpinBox.cpp +++ b/source/Irrlicht/CGUISpinBox.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Michael Zeilfelder +// Copyright (C) 2006-2011 Michael Zeilfelder // This file uses the licence of the Irrlicht Engine. #include "CGUISpinBox.h" @@ -86,7 +86,7 @@ void CGUISpinBox::refreshSprites() if (sb) { IGUISkin * skin = Environment->getSkin(); - CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); ButtonSpinDown->setSpriteBank(sb); ButtonSpinDown->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); ButtonSpinDown->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_SMALL_CURSOR_DOWN), CurrentIconColor); @@ -246,13 +246,26 @@ bool CGUISpinBox::OnEvent(const SEvent& event) } +void CGUISpinBox::draw() +{ + if ( !isVisible() ) + return; + + IGUISkin* skin = Environment->getSkin(); + if (!skin) + return; + + video::SColor iconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + if ( iconColor != CurrentIconColor ) + { + refreshSprites(); + } + + IGUISpinBox::draw(); +} + void CGUISpinBox::verifyValueRange() { - // TODO: This should be called in "draw" similar to the way it's done in CGUIWindow. - // But guess I can't in bugfix-release as overloading draw would break binary compitibility. - // So added here to allow users at least to manually force the element to having new skin-colors. - refreshSprites(); - f32 val = getValue(); if ( val+core::ROUNDING_ERROR_f32 < RangeMin ) val = RangeMin; diff --git a/source/Irrlicht/CGUISpinBox.h b/source/Irrlicht/CGUISpinBox.h index 28840167..50d98ecd 100644 --- a/source/Irrlicht/CGUISpinBox.h +++ b/source/Irrlicht/CGUISpinBox.h @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2009 Michael Zeilfelder +// Copyright (C) 2006-2011 Michael Zeilfelder // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -62,6 +62,9 @@ namespace gui //! called if an event happened. virtual bool OnEvent(const SEvent& event); + //! Draws the element and its children. + virtual void draw(); + //! Sets the new caption of the element virtual void setText(const wchar_t* text); diff --git a/source/Irrlicht/CGUISpriteBank.cpp b/source/Irrlicht/CGUISpriteBank.cpp index c6f3819c..5db453bb 100644 --- a/source/Irrlicht/CGUISpriteBank.cpp +++ b/source/Irrlicht/CGUISpriteBank.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUISpriteBank.h b/source/Irrlicht/CGUISpriteBank.h index a0b4d225..e57c62c5 100644 --- a/source/Irrlicht/CGUISpriteBank.h +++ b/source/Irrlicht/CGUISpriteBank.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIStaticText.cpp b/source/Irrlicht/CGUIStaticText.cpp index a5e086f7..56f78bb9 100644 --- a/source/Irrlicht/CGUIStaticText.cpp +++ b/source/Irrlicht/CGUIStaticText.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -32,6 +32,7 @@ CGUIStaticText::CGUIStaticText(const wchar_t* text, bool border, #endif Text = text; + RestrainTextInside = true; if (environment && environment->getSkin()) { BGColor = environment->getSkin()->getColor(gui::EGDC_3D_FACE); @@ -101,8 +102,8 @@ void CGUIStaticText::draw() } font->draw(Text.c_str(), frameRect, - OverrideColorEnabled ? OverrideColor : skin->getColor(IsEnabled ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), - HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER, &AbsoluteClippingRect); + OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER, (RestrainTextInside ? &AbsoluteClippingRect : NULL)); } else { @@ -130,8 +131,8 @@ void CGUIStaticText::draw() } font->draw(BrokenText[i].c_str(), r, - OverrideColorEnabled ? OverrideColor : skin->getColor(IsEnabled ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), - HAlign == EGUIA_CENTER, false, &AbsoluteClippingRect); + OverrideColorEnabled ? OverrideColor : skin->getColor(isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), + HAlign == EGUIA_CENTER, false, (RestrainTextInside ? &AbsoluteClippingRect : NULL)); r.LowerRightCorner.Y += height; r.UpperLeftCorner.Y += height; @@ -199,6 +200,18 @@ void CGUIStaticText::setDrawBorder(bool draw) } +void CGUIStaticText::setTextRestrainedInside(bool restrainTextInside) +{ + RestrainTextInside = restrainTextInside; +} + + +bool CGUIStaticText::isTextRestrainedInside() const +{ + return RestrainTextInside; +} + + void CGUIStaticText::setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) { HAlign = horizontal; @@ -296,15 +309,15 @@ void CGUIStaticText::breakText() if (word.size()) { // here comes the next whitespace, look if - // we can break the last word to the next line. - s32 whitelgth = font->getDimension(whitespace.c_str()).Width; - s32 worldlgth = font->getDimension(word.c_str()).Width; + // we must break the last word to the next line. + const s32 whitelgth = font->getDimension(whitespace.c_str()).Width; + const s32 wordlgth = font->getDimension(word.c_str()).Width; - if (length + worldlgth + whitelgth > elWidth) + if (length && (length + wordlgth + whitelgth > elWidth)) { // break to next line - length = worldlgth; BrokenText.push_back(line); + length = wordlgth; line = word; } else @@ -312,7 +325,7 @@ void CGUIStaticText::breakText() // add word to line line += whitespace; line += word; - length += whitelgth + worldlgth; + length += whitelgth + wordlgth; } word = L""; @@ -430,10 +443,11 @@ void CGUIStaticText::serializeAttributes(io::IAttributes* out, io::SAttributeRea out->addBool ("Border", Border); out->addBool ("OverrideColorEnabled",OverrideColorEnabled); out->addBool ("OverrideBGColorEnabled",OverrideBGColorEnabled); - out->addBool ("WordWrap", WordWrap); + out->addBool ("WordWrap", WordWrap); out->addBool ("Background", Background); + out->addBool ("RestrainTextInside", RestrainTextInside); out->addColor ("OverrideColor", OverrideColor); - out->addColor ("BGColor", BGColor); + out->addColor ("BGColor", BGColor); out->addEnum ("HTextAlign", HAlign, GUIAlignmentNames); out->addEnum ("VTextAlign", VAlign, GUIAlignmentNames); @@ -451,6 +465,7 @@ void CGUIStaticText::deserializeAttributes(io::IAttributes* in, io::SAttributeRe OverrideBGColorEnabled = in->getAttributeAsBool("OverrideBGColorEnabled"); setWordWrap(in->getAttributeAsBool("WordWrap")); Background = in->getAttributeAsBool("Background"); + RestrainTextInside = in->getAttributeAsBool("RestrainTextInside"); OverrideColor = in->getAttributeAsColor("OverrideColor"); BGColor = in->getAttributeAsColor("BGColor"); diff --git a/source/Irrlicht/CGUIStaticText.h b/source/Irrlicht/CGUIStaticText.h index b2cd8ef5..c22eecd9 100644 --- a/source/Irrlicht/CGUIStaticText.h +++ b/source/Irrlicht/CGUIStaticText.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -61,6 +61,12 @@ namespace gui //! Checks if an override color is enabled virtual bool isOverrideColorEnabled() const; + //! Set whether the text in this label should be clipped if it goes outside bounds + virtual void setTextRestrainedInside(bool restrainedInside); + + //! Checks if the text in this label should be clipped if it goes outside bounds + virtual bool isTextRestrainedInside() const; + //! Enables or disables word wrap for using the static text as //! multiline text control. virtual void setWordWrap(bool enable); @@ -97,6 +103,7 @@ namespace gui bool OverrideBGColorEnabled; bool WordWrap; bool Background; + bool RestrainTextInside; video::SColor OverrideColor, BGColor; gui::IGUIFont* OverrideFont; diff --git a/source/Irrlicht/CGUITabControl.cpp b/source/Irrlicht/CGUITabControl.cpp index 380cbb61..2544a8f6 100644 --- a/source/Irrlicht/CGUITabControl.cpp +++ b/source/Irrlicht/CGUITabControl.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -174,7 +174,6 @@ CGUITabControl::CGUITabControl(IGUIEnvironment* environment, setDebugName("CGUITabControl"); #endif - video::SColor color(255,255,255,255); IGUISkin* skin = Environment->getSkin(); IGUISpriteBank* sprites = 0; @@ -183,7 +182,6 @@ CGUITabControl::CGUITabControl(IGUIEnvironment* environment, if (skin) { sprites = skin->getSpriteBank(); - color = skin->getColor(EGDC_WINDOW_SYMBOL); TabHeight = skin->getSize(gui::EGDS_BUTTON_HEIGHT) + 2; } @@ -192,8 +190,6 @@ CGUITabControl::CGUITabControl(IGUIEnvironment* environment, if (UpButton) { UpButton->setSpriteBank(sprites); - UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), color); - UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), color); UpButton->setVisible(false); UpButton->setSubElement(true); UpButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); @@ -206,8 +202,6 @@ CGUITabControl::CGUITabControl(IGUIEnvironment* environment, if (DownButton) { DownButton->setSpriteBank(sprites); - DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), color); - DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), color); DownButton->setVisible(false); DownButton->setSubElement(true); DownButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); @@ -216,9 +210,9 @@ CGUITabControl::CGUITabControl(IGUIEnvironment* environment, } setTabVerticalAlignment(EGUIA_UPPERLEFT); + refreshSprites(); } - //! destructor CGUITabControl::~CGUITabControl() { @@ -235,6 +229,27 @@ CGUITabControl::~CGUITabControl() DownButton->drop(); } +void CGUITabControl::refreshSprites() +{ + video::SColor color(255,255,255,255); + IGUISkin* skin = Environment->getSkin(); + if (skin) + { + color = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); + } + + if (UpButton) + { + UpButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_LEFT), color); + UpButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_LEFT), color); + } + + if (DownButton) + { + DownButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_RIGHT), color); + DownButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_RIGHT), color); + } +} //! Adds a tab IGUITab* CGUITabControl::addTab(const wchar_t* caption, s32 id) @@ -243,25 +258,7 @@ IGUITab* CGUITabControl::addTab(const wchar_t* caption, s32 id) if (!skin) return 0; - core::rect r; - if ( VerticalAlignment == EGUIA_UPPERLEFT ) - { - r.UpperLeftCorner.X = 1; - r.UpperLeftCorner.Y = TabHeight; - - r.LowerRightCorner.X = AbsoluteRect.getWidth()-1; - r.LowerRightCorner.Y = AbsoluteRect.getHeight()-1; - } - else - { - r.UpperLeftCorner.X = 1; - r.UpperLeftCorner.Y = 1; - - r.LowerRightCorner.X = AbsoluteRect.getWidth()-1; - r.LowerRightCorner.Y = AbsoluteRect.getHeight()-TabHeight; - } - - CGUITab* tab = new CGUITab(Tabs.size(), Environment, this, r, id); + CGUITab* tab = new CGUITab(Tabs.size(), Environment, this, calcTabPos(), id); tab->setText(caption); tab->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); @@ -339,7 +336,7 @@ IGUITab* CGUITabControl::getTab(s32 idx) const //! called if an event happened. bool CGUITabControl::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -529,6 +526,40 @@ bool CGUITabControl::selectTab(core::position2d p) } +core::rect CGUITabControl::calcTabPos() +{ + core::rect r; + r.UpperLeftCorner.X = 0; + r.LowerRightCorner.X = AbsoluteRect.getWidth(); + if ( Border ) + { + ++r.UpperLeftCorner.X; + --r.LowerRightCorner.X; + } + + if ( VerticalAlignment == EGUIA_UPPERLEFT ) + { + r.UpperLeftCorner.Y = TabHeight+2; + r.LowerRightCorner.Y = AbsoluteRect.getHeight()-1; + if ( Border ) + { + --r.LowerRightCorner.Y; + } + } + else + { + r.UpperLeftCorner.Y = 0; + r.LowerRightCorner.Y = AbsoluteRect.getHeight()-(TabHeight+2); + if ( Border ) + { + ++r.UpperLeftCorner.Y; + } + } + + return r; +} + + //! draws the element and its children void CGUITabControl::draw() { @@ -692,6 +723,7 @@ void CGUITabControl::draw() UpButton->setEnabled(needLeftScroll); if ( DownButton ) DownButton->setEnabled(needRightScroll); + refreshSprites(); IGUIElement::draw(); } @@ -770,7 +802,6 @@ void CGUITabControl::recalculateScrollBar() bringToFront( DownButton ); } - //! Set the alignment of the tabs void CGUITabControl::setTabVerticalAlignment( EGUI_ALIGNMENT alignment ) { @@ -778,6 +809,12 @@ void CGUITabControl::setTabVerticalAlignment( EGUI_ALIGNMENT alignment ) recalculateScrollButtonPlacement(); recalculateScrollBar(); + + core::rect r(calcTabPos()); + for ( u32 i=0; isetRelativePosition(r); + } } void CGUITabControl::recalculateScrollButtonPlacement() @@ -857,7 +894,7 @@ bool CGUITabControl::setActiveTab(s32 idx) } -bool CGUITabControl::setActiveTab(IGUIElement *tab) +bool CGUITabControl::setActiveTab(IGUITab *tab) { for (s32 i=0; i<(s32)Tabs.size(); ++i) if (Tabs[i] == tab) diff --git a/source/Irrlicht/CGUITabControl.h b/source/Irrlicht/CGUITabControl.h index 78c1845f..15be4368 100644 --- a/source/Irrlicht/CGUITabControl.h +++ b/source/Irrlicht/CGUITabControl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -107,7 +107,7 @@ namespace gui virtual bool setActiveTab(s32 idx); //! Brings a tab to front. - virtual bool setActiveTab(IGUIElement *tab); + virtual bool setActiveTab(IGUITab *tab); //! Returns which tab is currently active virtual s32 getActiveTab() const; @@ -161,9 +161,11 @@ namespace gui void scrollRight(); bool needScrollControl( s32 startIndex=0, bool withScrollControl=false ); s32 calcTabWidth(s32 pos, IGUIFont* font, const wchar_t* text, bool withScrollControl ); + core::rect calcTabPos(); void recalculateScrollButtonPlacement(); void recalculateScrollBar(); + void refreshSprites(); core::array Tabs; s32 ActiveTab; diff --git a/source/Irrlicht/CGUITable.cpp b/source/Irrlicht/CGUITable.cpp index f24da7ca..84fcc9c6 100644 --- a/source/Irrlicht/CGUITable.cpp +++ b/source/Irrlicht/CGUITable.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -457,7 +457,7 @@ void CGUITable::checkScrollbars() { clientClip.LowerRightCorner.Y -= scrollBarSize; HorizontalScrollBar->setVisible(true); - HorizontalScrollBar->setMax(TotalItemWidth - clientClip.getWidth()); + HorizontalScrollBar->setMax(core::max_(0,TotalItemWidth - clientClip.getWidth())); } // needs vertical scroll be visible? @@ -465,7 +465,7 @@ void CGUITable::checkScrollbars() { clientClip.LowerRightCorner.X -= scrollBarSize; VerticalScrollBar->setVisible(true); - VerticalScrollBar->setMax(TotalItemHeight - clientClip.getHeight()); + VerticalScrollBar->setMax(core::max_(0,TotalItemHeight - clientClip.getHeight())); // check horizontal again because we have now smaller clientClip if ( !HorizontalScrollBar->isVisible() ) @@ -474,7 +474,7 @@ void CGUITable::checkScrollbars() { clientClip.LowerRightCorner.Y -= scrollBarSize; HorizontalScrollBar->setVisible(true); - HorizontalScrollBar->setMax(TotalItemWidth - clientClip.getWidth()); + HorizontalScrollBar->setMax(core::max_(0,TotalItemWidth - clientClip.getWidth())); } } } @@ -535,7 +535,7 @@ void CGUITable::refreshControls() //! called if an event happened. bool CGUITable::OnEvent(const SEvent &event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -567,7 +567,7 @@ bool CGUITable::OnEvent(const SEvent &event) break; case EET_MOUSE_INPUT_EVENT: { - if ( !IsEnabled ) + if ( !isEnabled() ) return false; core::position2d p(event.MouseInput.X, event.MouseInput.Y); @@ -945,13 +945,13 @@ void CGUITable::draw() // draw item text if ((s32)i == Selected) { - font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, skin->getColor(IsEnabled ? EGDC_HIGH_LIGHT_TEXT : EGDC_GRAY_TEXT), false, true, &clientClip); + font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, skin->getColor(isEnabled() ? EGDC_HIGH_LIGHT_TEXT : EGDC_GRAY_TEXT), false, true, &clientClip); } else { if ( !Rows[i].Items[j].IsOverrideColor ) // skin-colors can change Rows[i].Items[j].Color = skin->getColor(EGDC_BUTTON_TEXT); - font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, IsEnabled ? Rows[i].Items[j].Color : skin->getColor(EGDC_GRAY_TEXT), false, true, &clientClip); + font->draw(Rows[i].Items[j].BrokenText.c_str(), textRect, isEnabled() ? Rows[i].Items[j].Color : skin->getColor(EGDC_GRAY_TEXT), false, true, &clientClip); } pos += Columns[j].Width; @@ -987,7 +987,7 @@ void CGUITable::draw() // draw header column text columnrect.UpperLeftCorner.X += CellWidthPadding; - font->draw(text, columnrect, skin->getColor( IsEnabled ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &tableRect); + font->draw(text, columnrect, skin->getColor( isEnabled() ? EGDC_BUTTON_TEXT : EGDC_GRAY_TEXT), false, true, &tableRect); // draw icon for active column tab if ( (s32)i == ActiveTab ) diff --git a/source/Irrlicht/CGUITable.h b/source/Irrlicht/CGUITable.h index c31ebd4c..7e67dcde 100644 --- a/source/Irrlicht/CGUITable.h +++ b/source/Irrlicht/CGUITable.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUIToolBar.cpp b/source/Irrlicht/CGUIToolBar.cpp index d2b9a54a..110d60d1 100644 --- a/source/Irrlicht/CGUIToolBar.cpp +++ b/source/Irrlicht/CGUIToolBar.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -67,7 +67,7 @@ CGUIToolBar::CGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 //! called if an event happened. bool CGUIToolBar::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN) @@ -128,11 +128,11 @@ IGUIButton* CGUIToolBar::addButton(s32 id, const wchar_t* text,const wchar_t* to rectangle.LowerRightCorner.X = rectangle.UpperLeftCorner.X + size.Width + 8; rectangle.LowerRightCorner.Y = rectangle.UpperLeftCorner.Y + size.Height + 6; } - + if ( text ) { IGUISkin* skin = Environment->getSkin(); - IGUIFont * font = skin->getFont(EGDF_BUTTON); + IGUIFont * font = skin->getFont(EGDF_BUTTON); if ( font ) { core::dimension2d dim = font->getDimension(text); diff --git a/source/Irrlicht/CGUIToolBar.h b/source/Irrlicht/CGUIToolBar.h index 3f6eaf96..807c21d5 100644 --- a/source/Irrlicht/CGUIToolBar.h +++ b/source/Irrlicht/CGUIToolBar.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGUITreeView.cpp b/source/Irrlicht/CGUITreeView.cpp index 121510f4..ef609e81 100644 --- a/source/Irrlicht/CGUITreeView.cpp +++ b/source/Irrlicht/CGUITreeView.cpp @@ -460,6 +460,7 @@ CGUITreeView::CGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, !clip ); ScrollBarV->drop(); + ScrollBarV->setSubElement(true); ScrollBarV->setPos( 0 ); ScrollBarV->grab(); } @@ -471,6 +472,7 @@ CGUITreeView::CGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, !clip ); ScrollBarH->drop(); + ScrollBarH->setSubElement(true); ScrollBarH->setPos( 0 ); ScrollBarH->grab(); } @@ -581,107 +583,109 @@ void CGUITreeView::recalculateItemHeight() } if ( ScrollBarV ) - ScrollBarV->setMax( TotalItemHeight - AbsoluteRect.getHeight() ); + ScrollBarV->setMax( core::max_(0,TotalItemHeight - AbsoluteRect.getHeight()) ); if ( ScrollBarH ) - ScrollBarH->setMax( TotalItemWidth - AbsoluteRect.getWidth() ); + ScrollBarH->setMax( core::max_(0, TotalItemWidth - AbsoluteRect.getWidth()) ); } //! called if an event happened. bool CGUITreeView::OnEvent( const SEvent &event ) { - switch( event.EventType ) + if ( isEnabled() ) { - case EET_GUI_EVENT: - switch( event.GUIEvent.EventType ) + switch( event.EventType ) { - case gui::EGET_SCROLL_BAR_CHANGED: - if( event.GUIEvent.Caller == ScrollBarV || event.GUIEvent.Caller == ScrollBarH ) + case EET_GUI_EVENT: + switch( event.GUIEvent.EventType ) { - //s32 pos = ( ( gui::IGUIScrollBar* )event.GUIEvent.Caller )->getPos(); - return true; - } - break; - case gui::EGET_ELEMENT_FOCUS_LOST: - { - Selecting = false; - return false; - } - break; - default: - break; - } - break; - case EET_MOUSE_INPUT_EVENT: - { - core::position2d p( event.MouseInput.X, event.MouseInput.Y ); - - switch( event.MouseInput.Event ) - { - case EMIE_MOUSE_WHEEL: - if ( ScrollBarV ) - ScrollBarV->setPos( ScrollBarV->getPos() + (s32)event.MouseInput.Wheel * -10 ); - return true; - break; - - case EMIE_LMOUSE_PRESSED_DOWN: - - if (Environment->hasFocus(this) && !AbsoluteClippingRect.isPointInside(p) ) + case gui::EGET_SCROLL_BAR_CHANGED: + if( event.GUIEvent.Caller == ScrollBarV || event.GUIEvent.Caller == ScrollBarH ) { - Environment->removeFocus(this); + //s32 pos = ( ( gui::IGUIScrollBar* )event.GUIEvent.Caller )->getPos(); + return true; + } + break; + case gui::EGET_ELEMENT_FOCUS_LOST: + { + Selecting = false; return false; } - - if( Environment->hasFocus( this ) && - ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || - ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) - ) - ) - { - return true; - } - - Selecting = true; - Environment->setFocus( this ); - return true; - break; - - case EMIE_LMOUSE_LEFT_UP: - if( Environment->hasFocus( this ) && - ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || - ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) - ) - ) - { - return true; - } - - Selecting = false; - Environment->removeFocus( this ); - mouseAction( event.MouseInput.X, event.MouseInput.Y ); - return true; - break; - - case EMIE_MOUSE_MOVED: - if( Selecting ) - { - if( getAbsolutePosition().isPointInside( p ) ) - { - mouseAction( event.MouseInput.X, event.MouseInput.Y, true ); - return true; - } - } break; default: break; } - } - break; - default: - break; - } + break; + case EET_MOUSE_INPUT_EVENT: + { + core::position2d p( event.MouseInput.X, event.MouseInput.Y ); + switch( event.MouseInput.Event ) + { + case EMIE_MOUSE_WHEEL: + if ( ScrollBarV ) + ScrollBarV->setPos( ScrollBarV->getPos() + (s32)event.MouseInput.Wheel * -10 ); + return true; + break; + + case EMIE_LMOUSE_PRESSED_DOWN: + + if (Environment->hasFocus(this) && !AbsoluteClippingRect.isPointInside(p) ) + { + Environment->removeFocus(this); + return false; + } + + if( Environment->hasFocus( this ) && + ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || + ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) + ) + ) + { + return true; + } + + Selecting = true; + Environment->setFocus( this ); + return true; + break; + + case EMIE_LMOUSE_LEFT_UP: + if( Environment->hasFocus( this ) && + ( ( ScrollBarV && ScrollBarV->getAbsolutePosition().isPointInside( p ) && ScrollBarV->OnEvent( event ) ) || + ( ScrollBarH && ScrollBarH->getAbsolutePosition().isPointInside( p ) && ScrollBarH->OnEvent( event ) ) + ) + ) + { + return true; + } + + Selecting = false; + Environment->removeFocus( this ); + mouseAction( event.MouseInput.X, event.MouseInput.Y ); + return true; + break; + + case EMIE_MOUSE_MOVED: + if( Selecting ) + { + if( getAbsolutePosition().isPointInside( p ) ) + { + mouseAction( event.MouseInput.X, event.MouseInput.Y, true ); + return true; + } + } + break; + default: + break; + } + } + break; + default: + break; + } + } return Parent ? Parent->OnEvent( event ) : false; } @@ -940,6 +944,10 @@ void CGUITreeView::draw() if( Font ) { + EGUI_DEFAULT_COLOR textCol = EGDC_GRAY_TEXT; + if ( isEnabled() ) + textCol = ( node == Selected ) ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT; + s32 iconWidth = 0; for( s32 n = 0; n < 2; ++n ) { @@ -966,13 +974,13 @@ void CGUITreeView::draw() && ( ( ImageLeftOfIcon && n == 1 ) || ( !ImageLeftOfIcon && n == 0 ) ) ) { - IconFont->draw( node->getIcon(), textRect, skin->getColor( ( node == Selected ) ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT ), false, true, &clientClip ); + IconFont->draw( node->getIcon(), textRect, skin->getColor(textCol), false, true, &clientClip ); iconWidth += IconFont->getDimension( node->getIcon() ).Width + 3; textRect.UpperLeftCorner.X += IconFont->getDimension( node->getIcon() ).Width + 3; } } - Font->draw( node->getText(), textRect, skin->getColor( ( node == Selected ) ? EGDC_HIGH_LIGHT_TEXT : EGDC_BUTTON_TEXT ), false, true, &clientClip ); + Font->draw( node->getText(), textRect, skin->getColor(textCol), false, true, &clientClip ); textRect.UpperLeftCorner.X -= iconWidth; } diff --git a/source/Irrlicht/CGUIWindow.cpp b/source/Irrlicht/CGUIWindow.cpp index 5391f9c1..af9c273c 100644 --- a/source/Irrlicht/CGUIWindow.cpp +++ b/source/Irrlicht/CGUIWindow.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -99,7 +99,7 @@ void CGUIWindow::refreshSprites() if ( !sprites ) return; - CurrentIconColor = skin->getColor(EGDC_WINDOW_SYMBOL); + CurrentIconColor = skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL); if (sprites) { @@ -120,7 +120,7 @@ void CGUIWindow::refreshSprites() //! called if an event happened. bool CGUIWindow::OnEvent(const SEvent& event) { - if (IsEnabled) + if (isEnabled()) { switch(event.EventType) @@ -236,7 +236,7 @@ void CGUIWindow::draw() // update each time because the skin is allowed to change this always. updateClientRect(); - if ( CurrentIconColor != skin->getColor(EGDC_WINDOW_SYMBOL) ) + if ( CurrentIconColor != skin->getColor(isEnabled() ? EGDC_WINDOW_SYMBOL : EGDC_GRAY_WINDOW_SYMBOL) ) refreshSprites(); core::rect rect = AbsoluteRect; diff --git a/source/Irrlicht/CGUIWindow.h b/source/Irrlicht/CGUIWindow.h index 009a7fd8..e99c7ddf 100644 --- a/source/Irrlicht/CGUIWindow.h +++ b/source/Irrlicht/CGUIWindow.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGeometryCreator.cpp b/source/Irrlicht/CGeometryCreator.cpp index 394b2a57..84682bbb 100644 --- a/source/Irrlicht/CGeometryCreator.cpp +++ b/source/Irrlicht/CGeometryCreator.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CGeometryCreator.h b/source/Irrlicht/CGeometryCreator.h index fd648414..55e0a2a7 100644 --- a/source/Irrlicht/CGeometryCreator.h +++ b/source/Irrlicht/CGeometryCreator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImage.cpp b/source/Irrlicht/CImage.cpp index ee8845da..4e8b4e4e 100644 --- a/source/Irrlicht/CImage.cpp +++ b/source/Irrlicht/CImage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -52,7 +52,10 @@ void CImage::initData() Pitch = BytesPerPixel * Size.Width; if (!Data) + { + DeleteMemory=true; Data = new u8[Size.Height * Pitch]; + } } diff --git a/source/Irrlicht/CImage.h b/source/Irrlicht/CImage.h index 7382ec1a..6645a29e 100644 --- a/source/Irrlicht/CImage.h +++ b/source/Irrlicht/CImage.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -100,7 +100,7 @@ public: //! copies this surface into another, scaling it to fit, appyling a box filter virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false); - //! fills the surface with black or white + //! fills the surface with given color virtual void fill(const SColor &color); //! draws a rectangle diff --git a/source/Irrlicht/CImageLoaderBMP.cpp b/source/Irrlicht/CImageLoaderBMP.cpp index b12cdc05..4a680944 100644 --- a/source/Irrlicht/CImageLoaderBMP.cpp +++ b/source/Irrlicht/CImageLoaderBMP.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderBMP.h b/source/Irrlicht/CImageLoaderBMP.h index b1d34835..352472dd 100644 --- a/source/Irrlicht/CImageLoaderBMP.h +++ b/source/Irrlicht/CImageLoaderBMP.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderDDS.cpp b/source/Irrlicht/CImageLoaderDDS.cpp index eb0de066..8cd4c429 100644 --- a/source/Irrlicht/CImageLoaderDDS.cpp +++ b/source/Irrlicht/CImageLoaderDDS.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Thomas Alten +// Copyright (C) 2002-2011 Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderDDS.h b/source/Irrlicht/CImageLoaderDDS.h index a24380f9..c085a2ab 100644 --- a/source/Irrlicht/CImageLoaderDDS.h +++ b/source/Irrlicht/CImageLoaderDDS.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Thomas Alten +// Copyright (C) 2002-2011 Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderJPG.cpp b/source/Irrlicht/CImageLoaderJPG.cpp index cddf8a2a..87faacf2 100644 --- a/source/Irrlicht/CImageLoaderJPG.cpp +++ b/source/Irrlicht/CImageLoaderJPG.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderJPG.h b/source/Irrlicht/CImageLoaderJPG.h index f15d173e..57140342 100644 --- a/source/Irrlicht/CImageLoaderJPG.h +++ b/source/Irrlicht/CImageLoaderJPG.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPCX.cpp b/source/Irrlicht/CImageLoaderPCX.cpp index 1ebf54e6..1285a048 100644 --- a/source/Irrlicht/CImageLoaderPCX.cpp +++ b/source/Irrlicht/CImageLoaderPCX.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPCX.h b/source/Irrlicht/CImageLoaderPCX.h index 985e4901..638a25e1 100644 --- a/source/Irrlicht/CImageLoaderPCX.h +++ b/source/Irrlicht/CImageLoaderPCX.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPNG.cpp b/source/Irrlicht/CImageLoaderPNG.cpp index acd85b3f..a47483b2 100644 --- a/source/Irrlicht/CImageLoaderPNG.cpp +++ b/source/Irrlicht/CImageLoaderPNG.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPNG.h b/source/Irrlicht/CImageLoaderPNG.h index da3c54f8..7797e4da 100644 --- a/source/Irrlicht/CImageLoaderPNG.h +++ b/source/Irrlicht/CImageLoaderPNG.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPPM.cpp b/source/Irrlicht/CImageLoaderPPM.cpp index a5d12745..4424e290 100644 --- a/source/Irrlicht/CImageLoaderPPM.cpp +++ b/source/Irrlicht/CImageLoaderPPM.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPPM.h b/source/Irrlicht/CImageLoaderPPM.h index 1086be08..26dfefcf 100644 --- a/source/Irrlicht/CImageLoaderPPM.h +++ b/source/Irrlicht/CImageLoaderPPM.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPSD.cpp b/source/Irrlicht/CImageLoaderPSD.cpp index feb5680c..d1773a46 100644 --- a/source/Irrlicht/CImageLoaderPSD.cpp +++ b/source/Irrlicht/CImageLoaderPSD.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderPSD.h b/source/Irrlicht/CImageLoaderPSD.h index 31ee679b..de1dccd1 100644 --- a/source/Irrlicht/CImageLoaderPSD.h +++ b/source/Irrlicht/CImageLoaderPSD.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderRGB.cpp b/source/Irrlicht/CImageLoaderRGB.cpp index 1462c5aa..4ff2f59d 100644 --- a/source/Irrlicht/CImageLoaderRGB.cpp +++ b/source/Irrlicht/CImageLoaderRGB.cpp @@ -1,4 +1,4 @@ -//! Copyright (C) 2009 Gary Conway +//! Copyright (C) 2009-2011 Gary Conway //! This file is part of the "Irrlicht Engine". //! For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderRGB.h b/source/Irrlicht/CImageLoaderRGB.h index aca38d5d..87197cb7 100644 --- a/source/Irrlicht/CImageLoaderRGB.h +++ b/source/Irrlicht/CImageLoaderRGB.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gary Conway +// Copyright (C) 2009-2011 Gary Conway // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderTGA.cpp b/source/Irrlicht/CImageLoaderTGA.cpp index 3b4304de..8662febe 100644 --- a/source/Irrlicht/CImageLoaderTGA.cpp +++ b/source/Irrlicht/CImageLoaderTGA.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderTGA.h b/source/Irrlicht/CImageLoaderTGA.h index 02700a5e..bc65e4c3 100644 --- a/source/Irrlicht/CImageLoaderTGA.h +++ b/source/Irrlicht/CImageLoaderTGA.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderWAL.cpp b/source/Irrlicht/CImageLoaderWAL.cpp index 5b03ab51..ba9903a8 100644 --- a/source/Irrlicht/CImageLoaderWAL.cpp +++ b/source/Irrlicht/CImageLoaderWAL.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2004 Murphy McCauley -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageLoaderWAL.h b/source/Irrlicht/CImageLoaderWAL.h index 23924325..fd013c23 100644 --- a/source/Irrlicht/CImageLoaderWAL.h +++ b/source/Irrlicht/CImageLoaderWAL.h @@ -1,5 +1,5 @@ // Copyright (C) 2004 Murphy McCauley -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h /* diff --git a/source/Irrlicht/CImageWriterBMP.cpp b/source/Irrlicht/CImageWriterBMP.cpp index 730809f3..b97c2de5 100644 --- a/source/Irrlicht/CImageWriterBMP.cpp +++ b/source/Irrlicht/CImageWriterBMP.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterBMP.h b/source/Irrlicht/CImageWriterBMP.h index 9a5a79fb..2c99b314 100644 --- a/source/Irrlicht/CImageWriterBMP.h +++ b/source/Irrlicht/CImageWriterBMP.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterJPG.cpp b/source/Irrlicht/CImageWriterJPG.cpp index 2c94641b..bbf41826 100644 --- a/source/Irrlicht/CImageWriterJPG.cpp +++ b/source/Irrlicht/CImageWriterJPG.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterJPG.h b/source/Irrlicht/CImageWriterJPG.h index ec6e2fac..d580f831 100644 --- a/source/Irrlicht/CImageWriterJPG.h +++ b/source/Irrlicht/CImageWriterJPG.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPCX.cpp b/source/Irrlicht/CImageWriterPCX.cpp index 57f73139..86622588 100644 --- a/source/Irrlicht/CImageWriterPCX.cpp +++ b/source/Irrlicht/CImageWriterPCX.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPCX.h b/source/Irrlicht/CImageWriterPCX.h index 63233210..b129a174 100644 --- a/source/Irrlicht/CImageWriterPCX.h +++ b/source/Irrlicht/CImageWriterPCX.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPNG.cpp b/source/Irrlicht/CImageWriterPNG.cpp index 8edaded1..941fb919 100644 --- a/source/Irrlicht/CImageWriterPNG.cpp +++ b/source/Irrlicht/CImageWriterPNG.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPNG.h b/source/Irrlicht/CImageWriterPNG.h index a0e9766a..85b6e38c 100644 --- a/source/Irrlicht/CImageWriterPNG.h +++ b/source/Irrlicht/CImageWriterPNG.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPPM.cpp b/source/Irrlicht/CImageWriterPPM.cpp index 7aeb57f0..97d299e4 100644 --- a/source/Irrlicht/CImageWriterPPM.cpp +++ b/source/Irrlicht/CImageWriterPPM.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPPM.h b/source/Irrlicht/CImageWriterPPM.h index 03b4804e..595ed606 100644 --- a/source/Irrlicht/CImageWriterPPM.h +++ b/source/Irrlicht/CImageWriterPPM.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPSD.cpp b/source/Irrlicht/CImageWriterPSD.cpp index 43ecb918..241ae008 100644 --- a/source/Irrlicht/CImageWriterPSD.cpp +++ b/source/Irrlicht/CImageWriterPSD.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterPSD.h b/source/Irrlicht/CImageWriterPSD.h index 5943e5fe..f34148a1 100644 --- a/source/Irrlicht/CImageWriterPSD.h +++ b/source/Irrlicht/CImageWriterPSD.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CImageWriterTGA.cpp b/source/Irrlicht/CImageWriterTGA.cpp index 4f4cae63..a684ecdc 100644 --- a/source/Irrlicht/CImageWriterTGA.cpp +++ b/source/Irrlicht/CImageWriterTGA.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -133,7 +133,7 @@ bool CImageWriterTGA::writeImage(io::IWriteFile *file, IImage *image,u32 param) if (file->write(&imageFooter, sizeof(imageFooter)) < (s32)sizeof(imageFooter)) return false; - return imageHeader.ImageHeight < y; + return imageHeader.ImageHeight <= y; } } // namespace video diff --git a/source/Irrlicht/CImageWriterTGA.h b/source/Irrlicht/CImageWriterTGA.h index 924c7da9..285e7ceb 100644 --- a/source/Irrlicht/CImageWriterTGA.h +++ b/source/Irrlicht/CImageWriterTGA.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceConsole.cpp b/source/Irrlicht/CIrrDeviceConsole.cpp index 81f1192e..b4181954 100644 --- a/source/Irrlicht/CIrrDeviceConsole.cpp +++ b/source/Irrlicht/CIrrDeviceConsole.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceConsole.h b/source/Irrlicht/CIrrDeviceConsole.h index c7ec31b9..4cb10dea 100644 --- a/source/Irrlicht/CIrrDeviceConsole.h +++ b/source/Irrlicht/CIrrDeviceConsole.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceFB.cpp b/source/Irrlicht/CIrrDeviceFB.cpp index ea9c57d7..b680be26 100644 --- a/source/Irrlicht/CIrrDeviceFB.cpp +++ b/source/Irrlicht/CIrrDeviceFB.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2002-2007 Nikolaus Gebhardt -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceFB.h b/source/Irrlicht/CIrrDeviceFB.h index c04f6ac6..cd8d5a61 100644 --- a/source/Irrlicht/CIrrDeviceFB.h +++ b/source/Irrlicht/CIrrDeviceFB.h @@ -1,5 +1,5 @@ // Copyright (C) 2002-2007 Nikolaus Gebhardt -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 66b6125a..885dc450 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -140,7 +140,11 @@ CIrrDeviceLinux::~CIrrDeviceLinux() if (StdHints) XFree(StdHints); // Disable cursor (it is drop'ed in stub) - CursorControl->setVisible(false); + if (CursorControl) + { + CursorControl->setVisible(false); + static_cast(CursorControl)->clearCursors(); + } if (display) { #ifdef _IRR_COMPILE_WITH_OPENGL_ @@ -1038,7 +1042,7 @@ bool CIrrDeviceLinux::run() irrevent.EventType = irr::EET_KEY_INPUT_EVENT; irrevent.KeyInput.PressedDown = (event.type == KeyPress); // mbtowc(&irrevent.KeyInput.Char, buf, sizeof(buf)); - irrevent.KeyInput.Char = ((wchar_t*)(buf))[0]; + irrevent.KeyInput.Char = (reinterpret_cast(buf))[0]; irrevent.KeyInput.Control = (event.xkey.state & ControlMask) != 0; irrevent.KeyInput.Shift = (event.xkey.state & ShiftMask) != 0; postEventFromUser(irrevent); @@ -1960,7 +1964,7 @@ Cursor CIrrDeviceLinux::TextureToMonochromeCursor(irr::video::ITexture * tex, co u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; - const u8* data = (const u8*)tex->lock(true, 0); + const u8* data = (const u8*)tex->lock(video::ETLM_READ_ONLY, 0); data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) { @@ -2036,7 +2040,7 @@ Cursor CIrrDeviceLinux::TextureToARGBCursor(irr::video::ITexture * tex, const co u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; XcursorPixel* target = image->pixels; - const u8* data = (const u8*)tex->lock(true, 0); + const u8* data = (const u8*)tex->lock(ETLM_READ_ONLY, 0); data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) { @@ -2113,6 +2117,12 @@ CIrrDeviceLinux::CCursorControl::CCursorControl(CIrrDeviceLinux* dev, bool null) } CIrrDeviceLinux::CCursorControl::~CCursorControl() +{ + // Do not clearCursors here as the display is already closed + // TODO (cutealien): droping cursorcontrol earlier might work, not sure about reason why that's done in stub currently. +} + +void CIrrDeviceLinux::CCursorControl::clearCursors() { for ( u32 i=0; i < Cursors.size(); ++i ) { @@ -2123,7 +2133,6 @@ CIrrDeviceLinux::CCursorControl::~CCursorControl() } } - #ifdef _IRR_COMPILE_WITH_X11_ void CIrrDeviceLinux::CCursorControl::initCursors() { diff --git a/source/Irrlicht/CIrrDeviceLinux.h b/source/Irrlicht/CIrrDeviceLinux.h index c6ea3cda..54b57026 100644 --- a/source/Irrlicht/CIrrDeviceLinux.h +++ b/source/Irrlicht/CIrrDeviceLinux.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -294,6 +294,7 @@ namespace irr #ifdef _IRR_COMPILE_WITH_X11_ void update(); + void clearCursors(); #endif private: diff --git a/source/Irrlicht/CIrrDeviceSDL.cpp b/source/Irrlicht/CIrrDeviceSDL.cpp index 8fd70174..45af2e06 100644 --- a/source/Irrlicht/CIrrDeviceSDL.cpp +++ b/source/Irrlicht/CIrrDeviceSDL.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceSDL.h b/source/Irrlicht/CIrrDeviceSDL.h index 31b77d14..acffde08 100644 --- a/source/Irrlicht/CIrrDeviceSDL.h +++ b/source/Irrlicht/CIrrDeviceSDL.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // This device code is based on the original SDL device implementation diff --git a/source/Irrlicht/CIrrDeviceStub.cpp b/source/Irrlicht/CIrrDeviceStub.cpp index c7c16eaf..f074ae21 100644 --- a/source/Irrlicht/CIrrDeviceStub.cpp +++ b/source/Irrlicht/CIrrDeviceStub.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -22,7 +22,7 @@ CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params) FileSystem(0), InputReceivingSceneManager(0), CreationParams(params), Close(false) { - Timer = new CTimer(); + Timer = new CTimer(params.UsePerformanceTimer); if (os::Printer::Logger) { os::Printer::Logger->grab(); diff --git a/source/Irrlicht/CIrrDeviceStub.h b/source/Irrlicht/CIrrDeviceStub.h index 862ddaaf..7814ccc6 100644 --- a/source/Irrlicht/CIrrDeviceStub.h +++ b/source/Irrlicht/CIrrDeviceStub.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceWin32.cpp b/source/Irrlicht/CIrrDeviceWin32.cpp index 9878ae61..a2dc0231 100644 --- a/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/source/Irrlicht/CIrrDeviceWin32.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -594,7 +594,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) // CreationParams.WindowSize.Width = realWidth; // CreationParams.WindowSize.Height = realHeight; - ShowWindow(HWnd, SW_SHOW); + ShowWindow(HWnd, SW_SHOWNORMAL); UpdateWindow(HWnd); // fix ugly ATI driver bugs. Thanks to ariaci @@ -638,8 +638,11 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) EnvMap.push_back(em); // set this as active window - SetActiveWindow(HWnd); - SetForegroundWindow(HWnd); + if ( HWnd ) + { + SetActiveWindow(HWnd); + SetForegroundWindow(HWnd); + } // get the codepage used for keyboard input KEYBOARD_INPUT_HKL = GetKeyboardLayout(0); @@ -1618,7 +1621,7 @@ HCURSOR CIrrDeviceWin32::TextureToCursor(HWND hwnd, irr::video::ITexture * tex, u32 bytesPerPixel = video::IImage::getBitsPerPixelFromFormat(format) / 8; u32 bytesLeftGap = sourceRect.UpperLeftCorner.X * bytesPerPixel; u32 bytesRightGap = tex->getPitch() - sourceRect.LowerRightCorner.X * bytesPerPixel; - const u8* data = (const u8*)tex->lock(true, 0); + const u8* data = (const u8*)tex->lock(video::ETLM_READ_ONLY, 0); data += sourceRect.UpperLeftCorner.Y*tex->getPitch(); for ( s32 y = 0; y < sourceRect.getHeight(); ++y ) { diff --git a/source/Irrlicht/CIrrDeviceWin32.h b/source/Irrlicht/CIrrDeviceWin32.h index 637e0ecb..fc8a9a01 100644 --- a/source/Irrlicht/CIrrDeviceWin32.h +++ b/source/Irrlicht/CIrrDeviceWin32.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceWinCE.cpp b/source/Irrlicht/CIrrDeviceWinCE.cpp index 27a5abcd..d74c484c 100644 --- a/source/Irrlicht/CIrrDeviceWinCE.cpp +++ b/source/Irrlicht/CIrrDeviceWinCE.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrDeviceWinCE.h b/source/Irrlicht/CIrrDeviceWinCE.h index d4cad915..afbd2ee1 100644 --- a/source/Irrlicht/CIrrDeviceWinCE.h +++ b/source/Irrlicht/CIrrDeviceWinCE.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrMeshFileLoader.cpp b/source/Irrlicht/CIrrMeshFileLoader.cpp index db88ccfe..b2ecb2ce 100644 --- a/source/Irrlicht/CIrrMeshFileLoader.cpp +++ b/source/Irrlicht/CIrrMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrMeshFileLoader.h b/source/Irrlicht/CIrrMeshFileLoader.h index 82c29f78..675d36f1 100644 --- a/source/Irrlicht/CIrrMeshFileLoader.h +++ b/source/Irrlicht/CIrrMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrMeshWriter.cpp b/source/Irrlicht/CIrrMeshWriter.cpp index 06de87f0..e8f2e6f2 100644 --- a/source/Irrlicht/CIrrMeshWriter.cpp +++ b/source/Irrlicht/CIrrMeshWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CIrrMeshWriter.h b/source/Irrlicht/CIrrMeshWriter.h index 94cf6f36..2de22490 100644 --- a/source/Irrlicht/CIrrMeshWriter.h +++ b/source/Irrlicht/CIrrMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLMTSMeshFileLoader.cpp b/source/Irrlicht/CLMTSMeshFileLoader.cpp index fe1c3ee1..849573c6 100644 --- a/source/Irrlicht/CLMTSMeshFileLoader.cpp +++ b/source/Irrlicht/CLMTSMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // This file was written by Jonas Petersen and modified by Nikolaus Gebhardt. diff --git a/source/Irrlicht/CLMTSMeshFileLoader.h b/source/Irrlicht/CLMTSMeshFileLoader.h index e2373cc8..4735bbf2 100644 --- a/source/Irrlicht/CLMTSMeshFileLoader.h +++ b/source/Irrlicht/CLMTSMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CLWOMeshFileLoader.cpp b/source/Irrlicht/CLWOMeshFileLoader.cpp index 8a8dbe75..9490fae5 100644 --- a/source/Irrlicht/CLWOMeshFileLoader.cpp +++ b/source/Irrlicht/CLWOMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Nikolaus Gebhardt +// Copyright (C) 2007-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLWOMeshFileLoader.h b/source/Irrlicht/CLWOMeshFileLoader.h index 9f8c99bb..835bac22 100644 --- a/source/Irrlicht/CLWOMeshFileLoader.h +++ b/source/Irrlicht/CLWOMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLightSceneNode.cpp b/source/Irrlicht/CLightSceneNode.cpp index 8d9c71c0..a2d452ab 100644 --- a/source/Irrlicht/CLightSceneNode.cpp +++ b/source/Irrlicht/CLightSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLightSceneNode.h b/source/Irrlicht/CLightSceneNode.h index 1db890a1..d71d77bd 100644 --- a/source/Irrlicht/CLightSceneNode.h +++ b/source/Irrlicht/CLightSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLimitReadFile.cpp b/source/Irrlicht/CLimitReadFile.cpp index 7a309c5a..352dd925 100644 --- a/source/Irrlicht/CLimitReadFile.cpp +++ b/source/Irrlicht/CLimitReadFile.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLimitReadFile.h b/source/Irrlicht/CLimitReadFile.h index 42f596fc..57cf17f2 100644 --- a/source/Irrlicht/CLimitReadFile.h +++ b/source/Irrlicht/CLimitReadFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLogger.cpp b/source/Irrlicht/CLogger.cpp index d9f6cfc0..35df6242 100644 --- a/source/Irrlicht/CLogger.cpp +++ b/source/Irrlicht/CLogger.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CLogger.h b/source/Irrlicht/CLogger.h index 9dc29604..c94f6e07 100644 --- a/source/Irrlicht/CLogger.h +++ b/source/Irrlicht/CLogger.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMD2MeshFileLoader.cpp b/source/Irrlicht/CMD2MeshFileLoader.cpp index cafaeba4..4c4ac396 100644 --- a/source/Irrlicht/CMD2MeshFileLoader.cpp +++ b/source/Irrlicht/CMD2MeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMD2MeshFileLoader.h b/source/Irrlicht/CMD2MeshFileLoader.h index da345b82..66723de4 100644 --- a/source/Irrlicht/CMD2MeshFileLoader.h +++ b/source/Irrlicht/CMD2MeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMD3MeshFileLoader.cpp b/source/Irrlicht/CMD3MeshFileLoader.cpp index 959baab0..97549ee9 100644 --- a/source/Irrlicht/CMD3MeshFileLoader.cpp +++ b/source/Irrlicht/CMD3MeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMD3MeshFileLoader.h b/source/Irrlicht/CMD3MeshFileLoader.h index fe96c03e..b0b077cd 100644 --- a/source/Irrlicht/CMD3MeshFileLoader.h +++ b/source/Irrlicht/CMD3MeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMS3DMeshFileLoader.cpp b/source/Irrlicht/CMS3DMeshFileLoader.cpp index 8b68a1c0..82301b40 100644 --- a/source/Irrlicht/CMS3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMS3DMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -327,7 +327,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) } } - // skip materials + // load materials u16 numMaterials = *(u16*)pPtr; #ifdef __BIG_ENDIAN__ numMaterials = os::Byteswap::byteswap(numMaterials); @@ -337,9 +337,6 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) #endif pPtr += sizeof(u16); - // MS3DMaterial *materials = (MS3DMaterial*)pPtr; - // pPtr += sizeof(MS3DMaterial) * numMaterials; - if(numMaterials == 0) { // if there are no materials, add at least one buffer @@ -383,16 +380,15 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) if (TexturePath.trim()!="") { TexturePath=stripPathFromString(file->getFileName(),true) + stripPathFromString(TexturePath,false); - tmpBuffer->Material.setTexture(0, Driver->getTexture(TexturePath) ); + tmpBuffer->Material.setTexture(0, Driver->getTexture(TexturePath)); } core::stringc AlphamapPath=(const c8*)material->Alphamap; if (AlphamapPath.trim()!="") { AlphamapPath=stripPathFromString(file->getFileName(),true) + stripPathFromString(AlphamapPath,false); - tmpBuffer->Material.setTexture(2, Driver->getTexture(AlphamapPath) ); + tmpBuffer->Material.setTexture(2, Driver->getTexture(AlphamapPath)); } - } // animation time @@ -408,7 +404,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) if (framesPerSecond<1.f) framesPerSecond=1.f; -// calculated inside SkinnedMesh +// ignore, calculated inside SkinnedMesh // s32 frameCount = *(int*)pPtr; #ifdef __BIG_ENDIAN__ // frameCount = os::Byteswap::byteswap(frameCount); @@ -550,7 +546,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) core::array vertexWeights; f32 weightFactor=0; - if ((pHeader->Version == 4) && (pPtr < buffer+fileSize)) + if (jointCount && (pHeader->Version == 4) && (pPtr < buffer+fileSize)) { s32 subVersion = *(s32*)pPtr; // comment subVersion, always 1 #ifdef __BIG_ENDIAN__ @@ -729,7 +725,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) w->vertex_id = index; } } - else // new weights from 1.8.x + else if (jointCount) // new weights from 1.8.x { f32 sum = 1.0f; s32 boneid = vertices[vertidx].BoneID; diff --git a/source/Irrlicht/CMS3DMeshFileLoader.h b/source/Irrlicht/CMS3DMeshFileLoader.h index e8643458..4be71188 100644 --- a/source/Irrlicht/CMS3DMeshFileLoader.h +++ b/source/Irrlicht/CMS3DMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMY3DHelper.h b/source/Irrlicht/CMY3DHelper.h index dcbb8c63..03b81138 100644 --- a/source/Irrlicht/CMY3DHelper.h +++ b/source/Irrlicht/CMY3DHelper.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CMY3DMeshFileLoader.cpp b/source/Irrlicht/CMY3DMeshFileLoader.cpp index e7c98cd6..ca70d371 100644 --- a/source/Irrlicht/CMY3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMY3DMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CMY3DMeshFileLoader.h b/source/Irrlicht/CMY3DMeshFileLoader.h index d255b2e6..78145636 100644 --- a/source/Irrlicht/CMY3DMeshFileLoader.h +++ b/source/Irrlicht/CMY3DMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/CMemoryFile.cpp b/source/Irrlicht/CMemoryFile.cpp index 0196d301..596fc45d 100644 --- a/source/Irrlicht/CMemoryFile.cpp +++ b/source/Irrlicht/CMemoryFile.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2008 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMemoryFile.h b/source/Irrlicht/CMemoryFile.h index 91098ab5..3fc3826a 100644 --- a/source/Irrlicht/CMemoryFile.h +++ b/source/Irrlicht/CMemoryFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2008 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMeshCache.cpp b/source/Irrlicht/CMeshCache.cpp index b197c366..7e202a4b 100644 --- a/source/Irrlicht/CMeshCache.cpp +++ b/source/Irrlicht/CMeshCache.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -32,23 +32,6 @@ void CMeshCache::addMesh(const io::path& filename, IAnimatedMesh* mesh) } -//! Removes a mesh from the cache. -void CMeshCache::removeMesh(const IAnimatedMesh* const mesh) -{ - if ( !mesh ) - return; - for (u32 i=0; idrop(); - Meshes.erase(i); - return; - } - } -} - - //! Removes a mesh from the cache. void CMeshCache::removeMesh(const IMesh* const mesh) { @@ -56,7 +39,7 @@ void CMeshCache::removeMesh(const IMesh* const mesh) return; for (u32 i=0; igetMesh(0) == mesh) + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) { Meshes[i].Mesh->drop(); Meshes.erase(i); @@ -74,23 +57,11 @@ u32 CMeshCache::getMeshCount() const //! Returns current number of the mesh -s32 CMeshCache::getMeshIndex(const IAnimatedMesh* const mesh) const -{ - for (u32 i=0; igetMesh(0) == mesh) + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) return (s32)i; } @@ -116,6 +87,7 @@ IAnimatedMesh* CMeshCache::getMeshByName(const io::path& name) return (id != -1) ? Meshes[id].Mesh : 0; } + //! Get the name of a loaded mesh, based on its index. const io::SNamedPath& CMeshCache::getMeshName(u32 index) const { @@ -125,20 +97,6 @@ const io::SNamedPath& CMeshCache::getMeshName(u32 index) const return Meshes[index].NamedPath; } -//! Get the name of a loaded mesh, if there is any. -const io::SNamedPath& CMeshCache::getMeshName(const IAnimatedMesh* const mesh) const -{ - if(!mesh) - return emptyNamedPath; - - for (u32 i=0; igetMesh(0) == mesh)) + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) return Meshes[i].NamedPath; } @@ -168,28 +124,13 @@ bool CMeshCache::renameMesh(u32 index, const io::path& name) return true; } -//! Renames a loaded mesh. -bool CMeshCache::renameMesh(const IAnimatedMesh* const mesh, const io::path& name) -{ - for (u32 i=0; igetMesh(0) == mesh) + if (Meshes[i].Mesh == mesh || (Meshes[i].Mesh && Meshes[i].Mesh->getMesh(0) == mesh)) { Meshes[i].NamedPath.setPath(name); Meshes.sort(); diff --git a/source/Irrlicht/CMeshCache.h b/source/Irrlicht/CMeshCache.h index 74161f29..0f02b0c0 100644 --- a/source/Irrlicht/CMeshCache.h +++ b/source/Irrlicht/CMeshCache.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -32,11 +32,6 @@ namespace scene \param mesh: Pointer to a mesh which will now be referenced by this name. */ virtual void addMesh(const io::path& filename, IAnimatedMesh* mesh); - //! Removes a mesh from the cache. - /** After loading a mesh with getMesh(), the mesh can be removed from the cache - using this method, freeing a lot of memory. */ - virtual void removeMesh(const IAnimatedMesh* const mesh); - //! Removes a mesh from the cache. /** After loading a mesh with getMesh(), the mesh can be removed from the cache using this method, freeing a lot of memory. */ @@ -48,9 +43,6 @@ namespace scene removeMesh(), getMeshNumber(), getMeshByIndex() and getMeshFilename() */ virtual u32 getMeshCount() const; - //! Returns current index number of the mesh, and -1 if it is not in the cache. - virtual s32 getMeshIndex(const IAnimatedMesh* const mesh) const; - //! Returns current index number of the mesh, and -1 if it is not in the cache. virtual s32 getMeshIndex(const IMesh* const mesh) const; @@ -70,11 +62,6 @@ namespace scene \return The name if mesh was found and has a name, else the path is empty. */ virtual const io::SNamedPath& getMeshName(u32 index) const; - //! Get the name of a loaded mesh, if there is any. - /** \param mesh Pointer to mesh to query. - \return The name if mesh was found and has a name, else the path is empty. */ - virtual const io::SNamedPath& getMeshName(const IAnimatedMesh* const mesh) const; - //! Get the name of a loaded mesh, if there is any. /** \param mesh Pointer to mesh to query. \return The name if mesh was found and has a name, else the path is empty. */ @@ -89,15 +76,6 @@ namespace scene \return True if mesh was renamed. */ virtual bool renameMesh(u32 index, const io::path& name); - //! Renames a loaded mesh. - /** Note that renaming meshes might change the ordering of the - meshes, and so the index of the meshes as returned by - getMeshIndex() or taken by some methods will change. - \param mesh Mesh to be renamed. - \param name New name for the mesh. - \return True if mesh was renamed. */ - virtual bool renameMesh(const IAnimatedMesh* const mesh, const io::path& name); - //! Renames a loaded mesh. /** Note that renaming meshes might change the ordering of the meshes, and so the index of the meshes as returned by diff --git a/source/Irrlicht/CMeshManipulator.cpp b/source/Irrlicht/CMeshManipulator.cpp index 066dbf4d..0cc81569 100644 --- a/source/Irrlicht/CMeshManipulator.cpp +++ b/source/Irrlicht/CMeshManipulator.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMeshManipulator.h b/source/Irrlicht/CMeshManipulator.h index cb75b8c9..2cf9a2e1 100644 --- a/source/Irrlicht/CMeshManipulator.h +++ b/source/Irrlicht/CMeshManipulator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CMeshSceneNode.cpp b/source/Irrlicht/CMeshSceneNode.cpp index 207666a8..403ff47c 100644 --- a/source/Irrlicht/CMeshSceneNode.cpp +++ b/source/Irrlicht/CMeshSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -33,7 +33,6 @@ CMeshSceneNode::CMeshSceneNode(IMesh* mesh, ISceneNode* parent, ISceneManager* m } - //! destructor CMeshSceneNode::~CMeshSceneNode() { @@ -42,7 +41,6 @@ CMeshSceneNode::~CMeshSceneNode() } - //! frame void CMeshSceneNode::OnRegisterSceneNode() { @@ -110,7 +108,6 @@ void CMeshSceneNode::OnRegisterSceneNode() } - //! renders the node. void CMeshSceneNode::render() { @@ -232,7 +229,7 @@ void CMeshSceneNode::render() for (u32 g=0; ggetMeshBufferCount(); ++g) { - driver->drawMeshBuffer( Mesh->getMeshBuffer(g) ); + driver->drawMeshBuffer(Mesh->getMeshBuffer(g)); } } } @@ -255,8 +252,8 @@ video::SMaterial& CMeshSceneNode::getMaterial(u32 i) { if (Mesh && ReadOnlyMaterials && igetMeshBufferCount()) { - tmpReadOnlyMaterial = Mesh->getMeshBuffer(i)->getMaterial(); - return tmpReadOnlyMaterial; + ReadOnlyMaterial = Mesh->getMeshBuffer(i)->getMaterial(); + return ReadOnlyMaterial; } if (i >= Materials.size()) @@ -266,7 +263,6 @@ video::SMaterial& CMeshSceneNode::getMaterial(u32 i) } - //! returns amount of materials used by this scene node. u32 CMeshSceneNode::getMaterialCount() const { @@ -277,19 +273,18 @@ u32 CMeshSceneNode::getMaterialCount() const } - //! Sets a new mesh void CMeshSceneNode::setMesh(IMesh* mesh) { - if (!mesh) - return; // won't set null mesh + if (mesh) + { + mesh->grab(); + if (Mesh) + Mesh->drop(); - mesh->grab(); - if (Mesh) - Mesh->drop(); - - Mesh = mesh; - copyMaterials(); + Mesh = mesh; + copyMaterials(); + } } @@ -322,6 +317,7 @@ void CMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeRea out->addBool("ReadOnlyMaterials", ReadOnlyMaterials); } + //! Reads attributes of the scene node. void CMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { @@ -341,9 +337,38 @@ void CMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeRe setMesh(newMesh); } + // optional attribute to assign the hint to the whole mesh + if (in->existsAttribute("HardwareMappingHint") && + in->existsAttribute("HardwareMappingBufferType")) + { + scene::E_HARDWARE_MAPPING mapping = scene::EHM_NEVER; + scene::E_BUFFER_TYPE bufferType = scene::EBT_NONE; + + core::stringc smapping = in->getAttributeAsString("HardwareMappingHint"); + if (smapping.equals_ignore_case("static")) + mapping = scene::EHM_STATIC; + else if (smapping.equals_ignore_case("dynamic")) + mapping = scene::EHM_DYNAMIC; + else if (smapping.equals_ignore_case("stream")) + mapping = scene::EHM_STREAM; + + core::stringc sbufferType = in->getAttributeAsString("HardwareMappingBufferType"); + if (sbufferType.equals_ignore_case("vertex")) + bufferType = scene::EBT_VERTEX; + else if (sbufferType.equals_ignore_case("index")) + bufferType = scene::EBT_INDEX; + else if (sbufferType.equals_ignore_case("vertexindex")) + bufferType = scene::EBT_VERTEX_AND_INDEX; + + IMesh* mesh = getMesh(); + if (mesh) + mesh->setHardwareMappingHint(mapping, bufferType); + } + IMeshSceneNode::deserializeAttributes(in, options); } + //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. /* In this way it is possible to change the materials a mesh causing all mesh scene nodes referencing this mesh to change too. */ @@ -352,6 +377,7 @@ void CMeshSceneNode::setReadOnlyMaterials(bool readonly) ReadOnlyMaterials = readonly; } + //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style bool CMeshSceneNode::isReadOnlyMaterials() const { @@ -362,8 +388,10 @@ bool CMeshSceneNode::isReadOnlyMaterials() const //! Creates a clone of this scene node and its children. ISceneNode* CMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) { - if (!newParent) newParent = Parent; - if (!newManager) newManager = SceneManager; + if (!newParent) + newParent = Parent; + if (!newManager) + newManager = SceneManager; CMeshSceneNode* nb = new CMeshSceneNode(Mesh, newParent, newManager, ID, RelativeTranslation, RelativeRotation, RelativeScale); @@ -372,13 +400,12 @@ ISceneNode* CMeshSceneNode::clone(ISceneNode* newParent, ISceneManager* newManag nb->ReadOnlyMaterials = ReadOnlyMaterials; nb->Materials = Materials; - if ( newParent ) + if (newParent) nb->drop(); return nb; } - } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CMeshSceneNode.h b/source/Irrlicht/CMeshSceneNode.h index f96ecb1a..94439edd 100644 --- a/source/Irrlicht/CMeshSceneNode.h +++ b/source/Irrlicht/CMeshSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -77,7 +77,7 @@ namespace scene core::array Materials; core::aabbox3d Box; - video::SMaterial tmpReadOnlyMaterial; + video::SMaterial ReadOnlyMaterial; IMesh* Mesh; diff --git a/source/Irrlicht/CMetaTriangleSelector.cpp b/source/Irrlicht/CMetaTriangleSelector.cpp index b8c93490..d7fd366e 100644 --- a/source/Irrlicht/CMetaTriangleSelector.cpp +++ b/source/Irrlicht/CMetaTriangleSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -135,7 +135,7 @@ void CMetaTriangleSelector::removeAllTriangleSelectors() //! Return the scene node associated with a given triangle. -const ISceneNode* CMetaTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) const +ISceneNode* CMetaTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) const { u32 totalTriangles = 0; diff --git a/source/Irrlicht/CMetaTriangleSelector.h b/source/Irrlicht/CMetaTriangleSelector.h index 04cb8558..8b6aee32 100644 --- a/source/Irrlicht/CMetaTriangleSelector.h +++ b/source/Irrlicht/CMetaTriangleSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -33,17 +33,17 @@ public: //! Gets all triangles which lie within a specific bounding box. virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::aabbox3d& box, + s32& outTriangleCount, const core::aabbox3d& box, const core::matrix4* transform=0) const; //! Gets all triangles which have or may have contact with a 3d line. virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::line3d& line, + s32& outTriangleCount, const core::line3d& line, const core::matrix4* transform=0) const; //! Adds a triangle selector to the collection of triangle selectors //! in this metaTriangleSelector. - virtual void addTriangleSelector(ITriangleSelector* toAdd); + virtual void addTriangleSelector(ITriangleSelector* toAdd); //! Removes a specific triangle selector which was added before from the collection. virtual bool removeTriangleSelector(ITriangleSelector* toRemove); @@ -52,7 +52,7 @@ public: virtual void removeAllTriangleSelectors(); //! Return the scene node associated with a given triangle. - virtual const ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const; + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const; private: diff --git a/source/Irrlicht/CMountPointReader.cpp b/source/Irrlicht/CMountPointReader.cpp index ff9653e7..f85cbe75 100644 --- a/source/Irrlicht/CMountPointReader.cpp +++ b/source/Irrlicht/CMountPointReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -27,15 +27,20 @@ CArchiveLoaderMount::CArchiveLoaderMount( io::IFileSystem* fs) //! returns true if the file maybe is able to be loaded by this class bool CArchiveLoaderMount::isALoadableFileFormat(const io::path& filename) const { - bool ret = false; io::path fname(filename); deletePathFromFilename(fname); if (!fname.size()) + return true; + IFileList* list = FileSystem->createFileList(); + bool ret = false; + if (list) { - ret = true; + // check if name is found as directory + if (list->findFile(filename, true)) + ret=true; + list->drop(); } - return ret; } @@ -58,11 +63,11 @@ IFileArchive* CArchiveLoaderMount::createArchive(const io::path& filename, bool EFileSystemType current = FileSystem->setFileListSystem(FILESYSTEM_NATIVE); - io::path save = FileSystem->getWorkingDirectory(); + const io::path save = FileSystem->getWorkingDirectory(); io::path fullPath = FileSystem->getAbsolutePath(filename); FileSystem->flattenFilename(fullPath); - if ( FileSystem->changeWorkingDirectoryTo ( fullPath ) ) + if (FileSystem->changeWorkingDirectoryTo(fullPath)) { archive = new CMountPointReader(FileSystem, fullPath, ignoreCase, ignorePaths); } @@ -88,7 +93,7 @@ CMountPointReader::CMountPointReader(IFileSystem * parent, const io::path& basen if (Path.lastChar() != '/' ) Path.append('/'); - const io::path work = Parent->getWorkingDirectory(); + const io::path& work = Parent->getWorkingDirectory(); Parent->changeWorkingDirectoryTo(basename); buildDirectory(); diff --git a/source/Irrlicht/CMountPointReader.h b/source/Irrlicht/CMountPointReader.h index 044b233f..31cedf5c 100644 --- a/source/Irrlicht/CMountPointReader.h +++ b/source/Irrlicht/CMountPointReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CNPKReader.cpp b/source/Irrlicht/CNPKReader.cpp index 5412b396..ed7bb144 100644 --- a/source/Irrlicht/CNPKReader.cpp +++ b/source/Irrlicht/CNPKReader.cpp @@ -1,5 +1,5 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt -// Copyright (C) 2009 Christian Stehno +// Copyright (C) 2002-2011 Nikolaus Gebhardt +// Copyright (C) 2009-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // Based on the NPK reader from Irrlicht diff --git a/source/Irrlicht/CNPKReader.h b/source/Irrlicht/CNPKReader.h index c7222e04..a35cec23 100644 --- a/source/Irrlicht/CNPKReader.h +++ b/source/Irrlicht/CNPKReader.h @@ -1,5 +1,5 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt -// Copyright (C) 2009 Christian Stehno +// Copyright (C) 2002-2011 Nikolaus Gebhardt +// Copyright (C) 2009-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index 96dd322e..db114043 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -79,7 +79,6 @@ IImageWriter* createImageWriterPNG(); //! creates a writer which is able to save ppm images IImageWriter* createImageWriterPPM(); - //! constructor CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& screenSize) : FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize), @@ -90,6 +89,22 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre setDebugName("CNullDriver"); #endif + DriverAttributes = new io::CAttributes(); + DriverAttributes->addInt("MaxTextures", _IRR_MATERIAL_MAX_TEXTURES_); + DriverAttributes->addInt("MaxSupportedTextures", _IRR_MATERIAL_MAX_TEXTURES_); + DriverAttributes->addInt("MaxLights", getMaximalDynamicLightAmount()); + DriverAttributes->addInt("MaxAnisotropy", 1); +// DriverAttributes->addInt("MaxUserClipPlanes", 0); +// DriverAttributes->addInt("MaxAuxBuffers", 0); + DriverAttributes->addInt("MaxMultipleRenderTargets", 1); + DriverAttributes->addInt("MaxIndices", -1); + DriverAttributes->addInt("MaxTextureSize", -1); +// DriverAttributes->addInt("MaxGeometryVerticesOut", 0); +// DriverAttributes->addFloat("MaxTextureLODBias", 0.f); + DriverAttributes->addInt("Version", 1); +// DriverAttributes->addInt("ShaderLanguageVersion", 0); +// DriverAttributes->addInt("AntiAlias", 0); + setFog(); setTextureCreationFlag(ETCF_ALWAYS_32_BIT, true); @@ -175,6 +190,7 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre InitMaterial2D.Lighting=false; InitMaterial2D.ZWriteEnable=false; InitMaterial2D.ZBuffer=video::ECFN_NEVER; + InitMaterial2D.UseMipMaps=false; for (u32 i=0; i& scre //! destructor CNullDriver::~CNullDriver() { + if (DriverAttributes) + DriverAttributes->drop(); + if (FileSystem) FileSystem->drop(); @@ -313,6 +332,13 @@ bool CNullDriver::queryFeature(E_VIDEO_DRIVER_FEATURE feature) const } +//! Get attributes of the actual video driver +const io::IAttributes& CNullDriver::getDriverAttributes() const +{ + return *DriverAttributes; +} + + //! sets transformation void CNullDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) { @@ -408,7 +434,7 @@ ITexture* CNullDriver::getTexture(const io::path& filename) // Now try to open the file using the complete path. io::IReadFile* file = FileSystem->createAndOpenFile(absolutePath); - if(!file) + if (!file) { // Try to open it using the raw filename. file = FileSystem->createAndOpenFile(filename); @@ -463,10 +489,10 @@ ITexture* CNullDriver::getTexture(io::IReadFile* file) addTexture(texture); texture->drop(); // drop it because we created it, one grab too much } - } - if (!texture) - os::Printer::log("Could not load texture", file->getFileName(), ELL_WARNING); + if (!texture) + os::Printer::log("Could not load texture", file->getFileName(), ELL_WARNING); + } return texture; } @@ -1060,7 +1086,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture, if (texture->getColorFormat() == ECF_A1R5G5B5) { - u16 *p = (u16*)texture->lock(true); + u16 *p = (u16*)texture->lock(ETLM_READ_ONLY); if (!p) { @@ -1076,7 +1102,7 @@ void CNullDriver::makeColorKeyTexture(video::ITexture* texture, } else { - u32 *p = (u32*)texture->lock(true); + u32 *p = (u32*)texture->lock(ETLM_READ_ONLY); if (!p) { @@ -1414,9 +1440,9 @@ IImage* CNullDriver::createImage(IImage* imageToCopy, const core::position2d& pos, const core::dimension2d& size) { - if (pos==core::position2di(0,0) && size == texture->getSize()) + if ((pos==core::position2di(0,0)) && (size == texture->getSize())) { - IImage* image = new CImage(texture->getColorFormat(), size, texture->lock(true), false); + IImage* image = new CImage(texture->getColorFormat(), size, texture->lock(ETLM_READ_ONLY), false); texture->unlock(); return image; } @@ -1431,14 +1457,17 @@ IImage* CNullDriver::createImage(ITexture* texture, const core::position2d& core::clamp(static_cast(size.Height), 0u, texture->getSize().Height))); if (!clamped.isValid()) return 0; - void* src = texture->lock(true); + u8* src = static_cast(texture->lock(ETLM_READ_ONLY)); if (!src) return 0; IImage* image = new CImage(texture->getColorFormat(), clamped.getSize()); - void* dst = image->lock(); - for (u32 i=clamped.UpperLeftCorner.X; i(image->lock()); + src += clamped.UpperLeftCorner.Y * texture->getPitch() + image->getBytesPerPixel() * clamped.UpperLeftCorner.X; + for (u32 i=0; igetColorFormat(), clamped.getWidth(), dst, image->getColorFormat()); + src += texture->getPitch(); + dst += image->getPitch(); } image->unlock(); texture->unlock(); @@ -1789,6 +1818,7 @@ io::IAttributes* CNullDriver::createAttributesFromMaterial(const video::SMateria attr->addBool("FrontfaceCulling", material.FrontfaceCulling); attr->addBool("FogEnable", material.FogEnable); attr->addBool("NormalizeNormals", material.NormalizeNormals); + attr->addBool("UseMipMaps", material.UseMipMaps); attr->addInt("AntiAliasing", material.AntiAliasing); attr->addInt("ColorMask", material.ColorMask); @@ -1853,6 +1883,11 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater outMaterial.FrontfaceCulling = attr->getAttributeAsBool("FrontfaceCulling"); outMaterial.FogEnable = attr->getAttributeAsBool("FogEnable"); outMaterial.NormalizeNormals = attr->getAttributeAsBool("NormalizeNormals"); + if (attr->existsAttribute("UseMipMaps")) // legacy + outMaterial.UseMipMaps = attr->getAttributeAsBool("UseMipMaps"); + else + outMaterial.UseMipMaps = true; + // default 0 is ok outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing"); if (attr->existsAttribute("ColorMask")) diff --git a/source/Irrlicht/CNullDriver.h b/source/Irrlicht/CNullDriver.h index 1ed66de5..add1e820 100644 --- a/source/Irrlicht/CNullDriver.h +++ b/source/Irrlicht/CNullDriver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -57,6 +57,9 @@ namespace video //! queries the features of the driver, returns true if feature is available virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const; + //! Get attributes of the actual video driver + const io::IAttributes& getDriverAttributes() const; + //! sets transformation virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat); @@ -717,7 +720,7 @@ namespace video { SDummyTexture(const io::path& name) : ITexture(name), size(0,0) {}; - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0) { return 0; }; + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) { return 0; }; virtual void unlock(){} virtual const core::dimension2d& getOriginalSize() const { return size; } virtual const core::dimension2d& getSize() const { return size; } @@ -816,6 +819,8 @@ namespace video SColor FogColor; SExposedVideoData ExposedData; + io::IAttributes* DriverAttributes; + SOverrideMaterial OverrideMaterial; SMaterial OverrideMaterial2D; SMaterial InitMaterial2D; diff --git a/source/Irrlicht/COBJMeshFileLoader.cpp b/source/Irrlicht/COBJMeshFileLoader.cpp index b40d40dc..e1b3353d 100644 --- a/source/Irrlicht/COBJMeshFileLoader.cpp +++ b/source/Irrlicht/COBJMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COBJMeshFileLoader.h b/source/Irrlicht/COBJMeshFileLoader.h index 56ba0024..790e6b37 100644 --- a/source/Irrlicht/COBJMeshFileLoader.h +++ b/source/Irrlicht/COBJMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COBJMeshWriter.cpp b/source/Irrlicht/COBJMeshWriter.cpp index 607c3d3b..8f445854 100644 --- a/source/Irrlicht/COBJMeshWriter.cpp +++ b/source/Irrlicht/COBJMeshWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Christian Stehno +// Copyright (C) 2008-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COBJMeshWriter.h b/source/Irrlicht/COBJMeshWriter.h index e4bf5870..e04300cc 100644 --- a/source/Irrlicht/COBJMeshWriter.h +++ b/source/Irrlicht/COBJMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Christian Stehno +// Copyright (C) 2008-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COCTLoader.cpp b/source/Irrlicht/COCTLoader.cpp index 149adf78..ca5a8bbd 100644 --- a/source/Irrlicht/COCTLoader.cpp +++ b/source/Irrlicht/COCTLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/COCTLoader.h b/source/Irrlicht/COCTLoader.h index 5620e7df..a7b8d7d2 100644 --- a/source/Irrlicht/COCTLoader.h +++ b/source/Irrlicht/COCTLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp index 33ea328f..8351e5dc 100644 --- a/source/Irrlicht/COSOperator.cpp +++ b/source/Irrlicht/COSOperator.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COSOperator.h b/source/Irrlicht/COSOperator.h index e8201275..ec039d70 100644 --- a/source/Irrlicht/COSOperator.h +++ b/source/Irrlicht/COSOperator.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COctreeSceneNode.cpp b/source/Irrlicht/COctreeSceneNode.cpp index fbf4cfd3..940c16ae 100644 --- a/source/Irrlicht/COctreeSceneNode.cpp +++ b/source/Irrlicht/COctreeSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COctreeSceneNode.h b/source/Irrlicht/COctreeSceneNode.h index 8b64d2a1..a1ad5cf8 100644 --- a/source/Irrlicht/COctreeSceneNode.h +++ b/source/Irrlicht/COctreeSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COctreeTriangleSelector.cpp b/source/Irrlicht/COctreeTriangleSelector.cpp index fcc0c0bd..aedc1a66 100644 --- a/source/Irrlicht/COctreeTriangleSelector.cpp +++ b/source/Irrlicht/COctreeTriangleSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -14,7 +14,7 @@ namespace scene //! constructor COctreeTriangleSelector::COctreeTriangleSelector(const IMesh* mesh, - const ISceneNode* node, s32 minimalPolysPerNode) + ISceneNode* node, s32 minimalPolysPerNode) : CTriangleSelector(mesh, node), Root(0), NodeCount(0), MinimalPolysPerNode(minimalPolysPerNode) { diff --git a/source/Irrlicht/COctreeTriangleSelector.h b/source/Irrlicht/COctreeTriangleSelector.h index ae03fd90..aa7719c9 100644 --- a/source/Irrlicht/COctreeTriangleSelector.h +++ b/source/Irrlicht/COctreeTriangleSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -20,7 +20,7 @@ class COctreeTriangleSelector : public CTriangleSelector public: //! Constructs a selector based on a mesh - COctreeTriangleSelector(const IMesh* mesh, const ISceneNode* node, s32 minimalPolysPerNode); + COctreeTriangleSelector(const IMesh* mesh, ISceneNode* node, s32 minimalPolysPerNode); virtual ~COctreeTriangleSelector(); diff --git a/source/Irrlicht/COgreMeshFileLoader.cpp b/source/Irrlicht/COgreMeshFileLoader.cpp index b9cf7162..3a96a30a 100644 --- a/source/Irrlicht/COgreMeshFileLoader.cpp +++ b/source/Irrlicht/COgreMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // orginally written by Christian Stehno, modified by Nikolaus Gebhardt @@ -200,7 +200,7 @@ bool COgreMeshFileLoader::readChunk(io::IReadFile* file) bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent, OgreMesh& mesh) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Object Chunk"); + os::Printer::log("Read Object Chunk", ELL_DEBUG); #endif readBool(file, parent, mesh.SkeletalAnimation); bool skeleton_loaded=false; @@ -221,7 +221,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent case COGRE_MESH_BOUNDS: { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Mesh Bounds"); + os::Printer::log("Read Mesh Bounds", ELL_DEBUG); #endif readVector(file, data, mesh.BBoxMinEdge); readVector(file, data, mesh.BBoxMaxEdge); @@ -231,7 +231,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent case COGRE_SKELETON_LINK: { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Skeleton link"); + os::Printer::log("Read Skeleton link", ELL_DEBUG); #endif core::stringc name; readString(file, data, name); @@ -256,7 +256,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent break; default: #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Skipping", core::stringc(data.header.id)); + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); #endif // ignore chunk file->seek(data.header.length-data.read, true); @@ -274,7 +274,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent bool COgreMeshFileLoader::readGeometry(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Geometry"); + os::Printer::log("Read Geometry", ELL_DEBUG); #endif readInt(file, parent, &geometry.NumVertex); while(parent.read < parent.header.length) @@ -293,13 +293,15 @@ bool COgreMeshFileLoader::readGeometry(io::IReadFile* file, ChunkData& parent, O default: // ignore chunk #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Skipping", core::stringc(data.header.id)); + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); #endif file->seek(data.header.length-data.read, true); data.read += data.header.length-data.read; } parent.read += data.read; } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect geometry length. File might be corrupted."); return true; } @@ -307,7 +309,7 @@ bool COgreMeshFileLoader::readGeometry(io::IReadFile* file, ChunkData& parent, O bool COgreMeshFileLoader::readVertexDeclaration(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Vertex Declaration"); + os::Printer::log("Read Vertex Declaration", ELL_DEBUG); #endif NumUV = 0; while(parent.read < parent.header.length) @@ -340,6 +342,8 @@ bool COgreMeshFileLoader::readVertexDeclaration(io::IReadFile* file, ChunkData& } parent.read += data.read; } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect vertex declaration length. File might be corrupted."); return true; } @@ -347,7 +351,7 @@ bool COgreMeshFileLoader::readVertexDeclaration(io::IReadFile* file, ChunkData& bool COgreMeshFileLoader::readVertexBuffer(io::IReadFile* file, ChunkData& parent, OgreGeometry& geometry) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Vertex Buffer"); + os::Printer::log("Read Vertex Buffer", ELL_DEBUG); #endif OgreVertexBuffer buf; readShort(file, parent, &buf.BindIndex); @@ -364,6 +368,8 @@ bool COgreMeshFileLoader::readVertexBuffer(io::IReadFile* file, ChunkData& paren geometry.Buffers.push_back(buf); parent.read += data.read; + if (parent.read != parent.header.length) + os::Printer::log("Incorrect vertex buffer length. File might be corrupted."); return true; } @@ -371,11 +377,11 @@ bool COgreMeshFileLoader::readVertexBuffer(io::IReadFile* file, ChunkData& paren bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, OgreSubMesh& subMesh) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Submesh"); + os::Printer::log("Read Submesh", ELL_DEBUG); #endif readString(file, parent, subMesh.Material); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("using material", subMesh.Material); + os::Printer::log("using material", subMesh.Material, ELL_DEBUG); #endif readBool(file, parent, subMesh.SharedVertices); @@ -410,7 +416,7 @@ bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, Og case COGRE_SUBMESH_OPERATION: readShort(file, data, &subMesh.Operation); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Submesh Operation",core::stringc(subMesh.Operation)); + os::Printer::log("Read Submesh Operation",core::stringc(subMesh.Operation), ELL_DEBUG); #endif if (subMesh.Operation != 4) os::Printer::log("Primitive type != trilist not yet implemented", ELL_WARNING); @@ -418,7 +424,7 @@ bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, Og case COGRE_SUBMESH_TEXTURE_ALIAS: { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Submesh Texture Alias"); + os::Printer::log("Read Submesh Texture Alias", ELL_DEBUG); #endif core::stringc texture, alias; readString(file, data, texture); @@ -436,7 +442,7 @@ bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, Og break; default: #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Skipping", core::stringc(data.header.id)); + os::Printer::log("Skipping", core::stringc(data.header.id), ELL_DEBUG); #endif parent.read=parent.header.length; file->seek(-(long)sizeof(ChunkHeader), true); @@ -444,6 +450,11 @@ bool COgreMeshFileLoader::readSubMesh(io::IReadFile* file, ChunkData& parent, Og } parent.read += data.read; } + if (parent.read != parent.header.length) + os::Printer::log("Incorrect submesh length. File might be corrupted."); +#ifdef IRR_OGRE_LOADER_DEBUG + os::Printer::log("Done with submesh", ELL_DEBUG); +#endif return true; } @@ -1071,7 +1082,7 @@ void COgreMeshFileLoader::readPass(io::IReadFile* file, OgreTechnique& technique else if (token=="texture_unit") { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Texture unit"); + os::Printer::log("Read Texture unit", ELL_DEBUG); #endif getMaterialToken(file, token); //open brace getMaterialToken(file, token); @@ -1081,7 +1092,7 @@ void COgreMeshFileLoader::readPass(io::IReadFile* file, OgreTechnique& technique { getMaterialToken(file, pass.Texture.Filename); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Read Texture", pass.Texture.Filename.c_str()); + os::Printer::log("Read Texture", pass.Texture.Filename.c_str(), ELL_DEBUG); #endif getMaterialToken(file, pass.Texture.CoordsType, true); getMaterialToken(file, pass.Texture.MipMaps, true); @@ -1217,7 +1228,7 @@ void COgreMeshFileLoader::readTechnique(io::IReadFile* file, OgreMaterial& mat) void COgreMeshFileLoader::loadMaterials(io::IReadFile* meshFile) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Load Materials"); + os::Printer::log("Load Materials", ELL_DEBUG); #endif core::stringc token; io::IReadFile* file = 0; @@ -1268,7 +1279,7 @@ void COgreMeshFileLoader::loadMaterials(io::IReadFile* meshFile) getMaterialToken(file, mat.Name); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Load Material", mat.Name.c_str()); + os::Printer::log("Load Material", mat.Name.c_str(), ELL_DEBUG); #endif getMaterialToken(file, token); //open brace getMaterialToken(file, token); @@ -1300,7 +1311,7 @@ void COgreMeshFileLoader::loadMaterials(io::IReadFile* meshFile) file->drop(); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Finished loading Materials"); + os::Printer::log("Finished loading Materials", ELL_DEBUG); #endif } @@ -1308,7 +1319,7 @@ void COgreMeshFileLoader::loadMaterials(io::IReadFile* meshFile) bool COgreMeshFileLoader::loadSkeleton(io::IReadFile* meshFile, const core::stringc& name) { #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Load Skeleton", name); + os::Printer::log("Load Skeleton", name, ELL_DEBUG); #endif io::IReadFile* file = 0; io::path filename; @@ -1363,9 +1374,9 @@ bool COgreMeshFileLoader::loadSkeleton(io::IReadFile* meshFile, const core::stri readVector(file, data, bone.Position); readQuaternion(file, data, bone.Orientation); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Bone", bone.Name+" ("+core::stringc(bone.Handle)+")"); - os::Printer::log("Position", core::stringc(bone.Position.X)+" "+core::stringc(bone.Position.Y)+" "+core::stringc(bone.Position.Z)); - os::Printer::log("Rotation quat", core::stringc(bone.Orientation.W)+" "+core::stringc(bone.Orientation.X)+" "+core::stringc(bone.Orientation.Y)+" "+core::stringc(bone.Orientation.Z)); + os::Printer::log("Bone", bone.Name+" ("+core::stringc(bone.Handle)+")", ELL_DEBUG); + os::Printer::log("Position", core::stringc(bone.Position.X)+" "+core::stringc(bone.Position.Y)+" "+core::stringc(bone.Position.Z), ELL_DEBUG); + os::Printer::log("Rotation quat", core::stringc(bone.Orientation.W)+" "+core::stringc(bone.Orientation.X)+" "+core::stringc(bone.Orientation.Y)+" "+core::stringc(bone.Orientation.Z), ELL_DEBUG); // core::vector3df rot; // bone.Orientation.toEuler(rot); // rot *= core::RADTODEG; @@ -1399,14 +1410,14 @@ bool COgreMeshFileLoader::loadSkeleton(io::IReadFile* meshFile, const core::stri readString(file, data, anim.Name); readFloat(file, data, &anim.Length); #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Animation", anim.Name); - os::Printer::log("Length", core::stringc(anim.Length)); + os::Printer::log("Animation", anim.Name, ELL_DEBUG); + os::Printer::log("Length", core::stringc(anim.Length), ELL_DEBUG); #endif } break; case COGRE_ANIMATION_TRACK: #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("for Bone ", core::stringc(bone)); + os::Printer::log("for Bone ", core::stringc(bone), ELL_DEBUG); #endif readShort(file, data, &bone); // store current bone break; @@ -1430,7 +1441,7 @@ bool COgreMeshFileLoader::loadSkeleton(io::IReadFile* meshFile, const core::stri break; case COGRE_ANIMATION_LINK: #ifdef IRR_OGRE_LOADER_DEBUG - os::Printer::log("Animation link"); + os::Printer::log("Animation link", ELL_DEBUG); #endif break; default: diff --git a/source/Irrlicht/COgreMeshFileLoader.h b/source/Irrlicht/COgreMeshFileLoader.h index 95394873..127582a0 100644 --- a/source/Irrlicht/COgreMeshFileLoader.h +++ b/source/Irrlicht/COgreMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // orginally written by Christian Stehno, modified by Nikolaus Gebhardt diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index 8be9def4..3ff3748a 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -158,7 +158,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi GLuint PixelFormat; - for (u32 i=0; i<5; ++i) + for (u32 i=0; i<6; ++i) { if (i == 1) { @@ -235,8 +235,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi return false; } -#ifdef _DEBUG - core::stringc wglExtensions; + io::path wglExtensions; #ifdef WGL_ARB_extensions_string PFNWGLGETEXTENSIONSSTRINGARBPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); if (irrGetExtensionsString) @@ -246,12 +245,16 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi if (irrGetExtensionsString) wglExtensions = irrGetExtensionsString(HDc); #endif + const bool pixel_format_supported = (wglExtensions.find("WGL_ARB_pixel_format") != -1); + const bool multi_sample_supported = ((wglExtensions.find("WGL_ARB_multisample") != -1) || + (wglExtensions.find("WGL_EXT_multisample") != -1) || (wglExtensions.find("WGL_3DFX_multisample") != -1) ); +#ifdef _DEBUG os::Printer::log("WGL_extensions", wglExtensions); #endif #ifdef WGL_ARB_pixel_format PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat_ARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); - if (wglChoosePixelFormat_ARB) + if (pixel_format_supported && multi_sample_supported && wglChoosePixelFormat_ARB) { // This value determines the number of samples used for antialiasing // My experience is that 8 does not show a big @@ -649,6 +652,20 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d& screenSize, } else os::Printer::log("GLSL not available.", ELL_INFORMATION); + DriverAttributes->setAttribute("MaxTextures", MaxTextureUnits); + DriverAttributes->setAttribute("MaxSupportedTextures", MaxSupportedTextures); +// DriverAttributes->setAttribute("MaxLights", MaxLights); + DriverAttributes->setAttribute("MaxAnisotropy", MaxAnisotropy); + DriverAttributes->setAttribute("MaxUserClipPlanes", MaxUserClipPlanes); + DriverAttributes->setAttribute("MaxAuxBuffers", MaxAuxBuffers); + DriverAttributes->setAttribute("MaxMultipleRenderTargets", MaxMultipleRenderTargets); + DriverAttributes->setAttribute("MaxIndices", (s32)MaxIndices); + DriverAttributes->setAttribute("MaxTextureSize", (s32)MaxTextureSize); + DriverAttributes->setAttribute("MaxGeometryVerticesOut", (s32)MaxGeometryVerticesOut); + DriverAttributes->setAttribute("MaxTextureLODBias", MaxTextureLODBias); + DriverAttributes->setAttribute("Version", Version); + DriverAttributes->setAttribute("ShaderLanguageVersion", ShaderLanguageVersion); + DriverAttributes->setAttribute("AntiAlias", AntiAlias); glPixelStorei(GL_PACK_ALIGNMENT, 1); @@ -822,7 +839,8 @@ void COpenGLDriver::clearBuffers(bool backBuffer, bool zBuffer, bool stencilBuff if (stencilBuffer) mask |= GL_STENCIL_BUFFER_BIT; - glClear(mask); + if (mask) + glClear(mask); } @@ -877,42 +895,41 @@ void COpenGLDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matri break; case ETS_PROJECTION: { - GLfloat glmat[16]; - createGLMatrix(glmat, mat); - // flip z to compensate OpenGLs right-hand coordinate system - glmat[12] *= -1.0f; glMatrixMode(GL_PROJECTION); - glLoadMatrixf(glmat); + glLoadMatrixf(mat.pointer()); + // we have to update the clip planes to the latest view matrix + for (u32 i=0; i= MATERIAL_MAX_TEXTURES) - break; - - const bool isRTT = Material.getTexture(i) && Material.getTexture(i)->isRenderTarget(); - - if (MultiTextureExtension) - extGlActiveTexture(GL_TEXTURE0_ARB + i); - - glMatrixMode(GL_TEXTURE); - if (!isRTT && mat.isIdentity() ) - glLoadIdentity(); - else { - GLfloat glmat[16]; - if (isRTT) - createGLTextureMatrix(glmat, mat * TextureFlipMatrix); - else - createGLTextureMatrix(glmat, mat); + const u32 i = state - ETS_TEXTURE_0; + if (i >= MATERIAL_MAX_TEXTURES) + break; - glLoadMatrixf(glmat); + const bool isRTT = Material.getTexture(i) && Material.getTexture(i)->isRenderTarget(); + + if (MultiTextureExtension) + extGlActiveTexture(GL_TEXTURE0_ARB + i); + + glMatrixMode(GL_TEXTURE); + if (!isRTT && mat.isIdentity() ) + glLoadIdentity(); + else + { + GLfloat glmat[16]; + if (isRTT) + createGLTextureMatrix(glmat, mat * TextureFlipMatrix); + else + createGLTextureMatrix(glmat, mat); + glLoadMatrixf(glmat); + } + break; } - break; - } } } @@ -1819,8 +1836,6 @@ void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture, const u32 drawCount = core::min_(positions.size(), sourceRects.size()); - // texcoords need to be flipped horizontally for RTTs - const bool isRTT = texture->isRenderTarget(); const core::dimension2d& ss = texture->getOriginalSize(); const f32 invW = 1.f / static_cast(ss.Width); const f32 invH = 1.f / static_cast(ss.Height); @@ -1921,9 +1936,9 @@ void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture, const core::rect tcoords( sourcePos.X * invW, - (isRTT?(sourcePos.Y + sourceSize.Height):sourcePos.Y) * invH, + sourcePos.Y * invH, (sourcePos.X + sourceSize.Width) * invW, - (isRTT?sourcePos.Y:(sourcePos.Y + sourceSize.Height)) * invH); + (sourcePos.Y + sourceSize.Height) * invH); const core::rect poss(targetPos, sourceSize); @@ -2040,16 +2055,14 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, // ok, we've clipped everything. // now draw it. - // texcoords need to be flipped horizontally for RTTs - const bool isRTT = texture->isRenderTarget(); const core::dimension2d& ss = texture->getOriginalSize(); const f32 invW = 1.f / static_cast(ss.Width); const f32 invH = 1.f / static_cast(ss.Height); const core::rect tcoords( sourcePos.X * invW, - (isRTT?(sourcePos.Y + sourceSize.Height):sourcePos.Y) * invH, + sourcePos.Y * invH, (sourcePos.X + sourceSize.Width) * invW, - (isRTT?sourcePos.Y:(sourcePos.Y + sourceSize.Height)) * invH); + (sourcePos.Y + sourceSize.Height) * invH); const core::rect poss(targetPos, sourceSize); @@ -2085,16 +2098,14 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect if (!texture) return; - // texcoords need to be flipped horizontally for RTTs - const bool isRTT = texture->isRenderTarget(); const core::dimension2d& ss = texture->getOriginalSize(); const f32 invW = 1.f / static_cast(ss.Width); const f32 invH = 1.f / static_cast(ss.Height); const core::rect tcoords( sourceRect.UpperLeftCorner.X * invW, - (isRTT?sourceRect.LowerRightCorner.Y:sourceRect.UpperLeftCorner.Y) * invH, + sourceRect.UpperLeftCorner.Y * invH, sourceRect.LowerRightCorner.X * invW, - (isRTT?sourceRect.UpperLeftCorner.Y:sourceRect.LowerRightCorner.Y) *invH); + sourceRect.LowerRightCorner.Y *invH); const video::SColor temp[4] = { @@ -2182,8 +2193,6 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::dimension2d& ss = texture->getOriginalSize(); core::position2d targetPos(pos); - // texcoords need to be flipped horizontally for RTTs - const bool isRTT = texture->isRenderTarget(); const f32 invW = 1.f / static_cast(ss.Width); const f32 invH = 1.f / static_cast(ss.Height); @@ -2195,9 +2204,9 @@ void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect tcoords( sourceRects[currentIndex].UpperLeftCorner.X * invW, - (isRTT?sourceRects[currentIndex].LowerRightCorner.Y:sourceRects[currentIndex].UpperLeftCorner.Y) * invH, + sourceRects[currentIndex].UpperLeftCorner.Y * invH, sourceRects[currentIndex].LowerRightCorner.X * invW, - (isRTT?sourceRects[currentIndex].UpperLeftCorner.Y:sourceRects[currentIndex].LowerRightCorner.Y) * invH); + sourceRects[currentIndex].LowerRightCorner.Y * invH); const core::rect poss(targetPos, sourceRects[currentIndex].getSize()); @@ -2339,6 +2348,7 @@ bool COpenGLDriver::setActiveTexture(u32 stage, const video::ITexture* texture) if (texture->getDriverType() != EDT_OPENGL) { glDisable(GL_TEXTURE_2D); + CurrentTexture[stage]=0; os::Printer::log("Fatal Error: Tried to set a texture not owned by this driver.", ELL_ERROR); return false; } @@ -2460,17 +2470,14 @@ void COpenGLDriver::setRenderStates3DMode() // Reset Texture Stages glDisable(GL_BLEND); glDisable(GL_ALPHA_TEST); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // switch back the matrices glMatrixMode(GL_MODELVIEW); glLoadMatrixf((Matrices[ETS_VIEW] * Matrices[ETS_WORLD]).pointer()); - GLfloat glmat[16]; - createGLMatrix(glmat, Matrices[ETS_PROJECTION]); - glmat[12] *= -1.0f; glMatrixMode(GL_PROJECTION); - glLoadMatrixf(glmat); + glLoadMatrixf(Matrices[ETS_PROJECTION].pointer()); ResetRenderStates = true; } @@ -2607,6 +2614,8 @@ void COpenGLDriver::setWrapMode(const SMaterial& material) // Has to be checked always because it depends on the textures for (u32 u=0; u0) @@ -2724,6 +2733,8 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater // Filtering has to be set for each texture layer for (u32 i=0; i0) @@ -2978,14 +2989,14 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh glMatrixMode(GL_PROJECTION); const core::dimension2d& renderTargetSize = getCurrentRenderTargetSize(); - core::matrix4 m; - m.buildProjectionMatrixOrthoLH(f32(renderTargetSize.Width), f32(-(s32)(renderTargetSize.Height)), -1.0, 1.0); + core::matrix4 m(core::matrix4::EM4CONST_NOTHING); + m.buildProjectionMatrixOrthoLH(f32(renderTargetSize.Width), f32(-(s32)(renderTargetSize.Height)), -1.0f, 1.0f); m.setTranslation(core::vector3df(-1,1,0)); glLoadMatrixf(m.pointer()); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glTranslatef(0.375, 0.375, 0.0); + glTranslatef(0.375f, 0.375f, 0.0f); // Make sure we set first texture matrix if (MultiTextureExtension) @@ -2997,8 +3008,8 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh { setBasicRenderStates(InitMaterial2D, LastMaterial, true); LastMaterial = InitMaterial2D; - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } if (OverrideMaterial2DEnabled) { @@ -3030,7 +3041,11 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); } + Material.setTexture(0, const_cast(CurrentTexture[0])); setTransform(ETS_TEXTURE_0, core::IdentityMatrix); + // Due to the transformation change, the previous line would call a reset each frame + // but we can safely reset the variable as it was false before + Transformation3DChanged=false; if (alphaChannel) { @@ -3297,16 +3312,20 @@ void COpenGLDriver::setAmbientLight(const SColorf& color) // method just a bit. void COpenGLDriver::setViewPort(const core::rect& area) { + if (area == ViewPort) + return; core::rect vp = area; core::rect rendert(0,0, getCurrentRenderTargetSize().Width, getCurrentRenderTargetSize().Height); vp.clipAgainst(rendert); if (vp.getHeight()>0 && vp.getWidth()>0) + { glViewport(vp.UpperLeftCorner.X, getCurrentRenderTargetSize().Height - vp.UpperLeftCorner.Y - vp.getHeight(), vp.getWidth(), vp.getHeight()); - ViewPort = vp; + ViewPort = vp; + } } @@ -3353,6 +3372,10 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 decr = GL_DECR_WRAP_EXT; } #endif +#ifdef GL_NV_depth_clamp + if (FeatureAvailable[IRR_NV_depth_clamp]) + glEnable(GL_DEPTH_CLAMP_NV); +#endif // The first parts are not correctly working, yet. #if 0 @@ -3360,10 +3383,6 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 if (FeatureAvailable[IRR_EXT_stencil_two_side]) { glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); -#ifdef GL_NV_depth_clamp - if (FeatureAvailable[IRR_NV_depth_clamp]) - glEnable(GL_DEPTH_CLAMP_NV); -#endif glDisable(GL_CULL_FACE); if (zfail) { @@ -3388,10 +3407,6 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 glStencilMask(~0); glStencilFunc(GL_ALWAYS, 0, ~0); glDrawArrays(GL_TRIANGLES,0,count); -#ifdef GL_NV_depth_clamp - if (FeatureAvailable[IRR_NV_depth_clamp]) - glDisable(GL_DEPTH_CLAMP_NV); -#endif glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); } else @@ -3409,7 +3424,7 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 extGlStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, decr); extGlStencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, incr); } - extGlStencilFuncSeparate(GL_FRONT_AND_BACK, GL_ALWAYS, 0, ~0); + extGlStencilFuncSeparate(GL_ALWAYS, GL_ALWAYS, 0, ~0); glStencilMask(~0); glDrawArrays(GL_TRIANGLES,0,count); } @@ -3438,6 +3453,10 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3 glDrawArrays(GL_TRIANGLES,0,count); } } +#ifdef GL_NV_depth_clamp + if (FeatureAvailable[IRR_NV_depth_clamp]) + glDisable(GL_DEPTH_CLAMP_NV); +#endif glDisableClientState(GL_VERTEX_ARRAY); //not stored on stack glPopAttrib(); @@ -3751,7 +3770,12 @@ bool COpenGLDriver::setRenderTarget(video::E_RENDER_TARGET target, bool clearTar if (ERT_RENDER_TEXTURE == target) { - os::Printer::log("Fatal Error: For render textures call setRenderTarget with the actual texture as first parameter.", ELL_ERROR); + os::Printer::log("For render textures call setRenderTarget with the actual texture as first parameter.", ELL_ERROR); + return false; + } + if (ERT_MULTI_RENDER_TEXTURES == target) + { + os::Printer::log("For multiple render textures call setRenderTarget with the texture array as first parameter.", ELL_ERROR); return false; } @@ -3801,34 +3825,55 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff return false; } +#if defined(GL_EXT_framebuffer_object) + if (CurrentTarget==ERT_MULTI_RENDER_TEXTURES) + { + for (u32 i=0; iunbindRTT(); + } - setActiveTexture(0, 0); - ResetRenderStates=true; - if (RenderTargetTexture!=0) - { - RenderTargetTexture->unbindRTT(); - } - - if (texture) - { - // we want to set a new target. so do this. - glViewport(0, 0, texture->getSize().Width, texture->getSize().Height); - RenderTargetTexture = static_cast(texture); - RenderTargetTexture->bindRTT(); - CurrentRendertargetSize = texture->getSize(); - CurrentTarget=ERT_RENDER_TEXTURE; - } - else - { - glViewport(0,0,ScreenSize.Width,ScreenSize.Height); - RenderTargetTexture = 0; - CurrentRendertargetSize = core::dimension2d(0,0); - CurrentTarget=ERT_FRAME_BUFFER; - glDrawBuffer(Doublebuffer?GL_BACK_LEFT:GL_FRONT_LEFT); + if (texture) + { + // we want to set a new target. so do this. + glViewport(0, 0, texture->getSize().Width, texture->getSize().Height); + RenderTargetTexture = static_cast(texture); + RenderTargetTexture->bindRTT(); + CurrentRendertargetSize = texture->getSize(); + CurrentTarget=ERT_RENDER_TEXTURE; + } + else + { + glViewport(0,0,ScreenSize.Width,ScreenSize.Height); + RenderTargetTexture = 0; + CurrentRendertargetSize = core::dimension2d(0,0); + CurrentTarget=ERT_FRAME_BUFFER; + glDrawBuffer(Doublebuffer?GL_BACK_LEFT:GL_FRONT_LEFT); + } + // we need to update the matrices due to the rendersize change. + Transformation3DChanged=true; } clearBuffers(clearBackBuffer, clearZBuffer, false, color); + return true; } @@ -3837,8 +3882,21 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff bool COpenGLDriver::setRenderTarget(const core::array& targets, bool clearBackBuffer, bool clearZBuffer, SColor color) { + // if simply disabling the MRT via array call if (targets.size()==0) return setRenderTarget(0, clearBackBuffer, clearZBuffer, color); + // if disabling old MRT, but enabling new one as well + if ((MRTargets.size()!=0) && (targets != MRTargets)) + setRenderTarget(0, clearBackBuffer, clearZBuffer, color); + // if no change, simply clear buffers + else if (targets == MRTargets) + { + clearBuffers(clearBackBuffer, clearZBuffer, false, color); + return true; + } + + // copy to storage for correct disabling + MRTargets=targets; u32 maxMultipleRTTs = core::min_(static_cast(MaxMultipleRenderTargets), targets.size()); @@ -3901,7 +3959,7 @@ bool COpenGLDriver::setRenderTarget(const core::array& tar if (targets[i].TargetType==ERT_RENDER_TEXTURE) { setRenderTarget(targets[i].RenderTexture, false, false, 0x0); - break; + break; // bind only first RTT } } // init other main buffer, if necessary @@ -3930,7 +3988,7 @@ bool COpenGLDriver::setRenderTarget(const core::array& tar } if (FeatureAvailable[IRR_AMD_draw_buffers_blend] || FeatureAvailable[IRR_ARB_draw_buffers_blend]) { - extGlBlendFuncIndexed(i, targets[i].BlendFuncSrc, targets[i].BlendFuncDst); + extGlBlendFuncIndexed(i, getGLBlend(targets[i].BlendFuncSrc), getGLBlend(targets[i].BlendFuncDst)); } if (targets[i].TargetType==ERT_RENDER_TEXTURE) { @@ -3938,7 +3996,8 @@ bool COpenGLDriver::setRenderTarget(const core::array& tar #ifdef GL_EXT_framebuffer_object // attach texture to FrameBuffer Object on Color [i] attachment = GL_COLOR_ATTACHMENT0_EXT+i; - extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_2D, static_cast(targets[i].RenderTexture)->getOpenGLTextureName(), 0); + if ((i != 0) && (targets[i].RenderTexture != RenderTargetTexture)) + extGlFramebufferTexture2D(GL_FRAMEBUFFER_EXT, attachment, GL_TEXTURE_2D, static_cast(targets[i].RenderTexture)->getOpenGLTextureName(), 0); #endif MRTs[i]=attachment; } @@ -4135,6 +4194,7 @@ core::dimension2du COpenGLDriver::getMaxTextureSize() const return core::dimension2du(MaxTextureSize, MaxTextureSize); } + //! Convert E_PRIMITIVE_TYPE to OpenGL equivalent GLenum COpenGLDriver::primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const { @@ -4170,6 +4230,28 @@ GLenum COpenGLDriver::primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const return GL_TRIANGLES; } + +GLenum COpenGLDriver::getGLBlend (E_BLEND_FACTOR factor) const +{ + u32 r = 0; + switch (factor) + { + case EBF_ZERO: r = GL_ZERO; break; + case EBF_ONE: r = GL_ONE; break; + case EBF_DST_COLOR: r = GL_DST_COLOR; break; + case EBF_ONE_MINUS_DST_COLOR: r = GL_ONE_MINUS_DST_COLOR; break; + case EBF_SRC_COLOR: r = GL_SRC_COLOR; break; + case EBF_ONE_MINUS_SRC_COLOR: r = GL_ONE_MINUS_SRC_COLOR; break; + case EBF_SRC_ALPHA: r = GL_SRC_ALPHA; break; + case EBF_ONE_MINUS_SRC_ALPHA: r = GL_ONE_MINUS_SRC_ALPHA; break; + case EBF_DST_ALPHA: r = GL_DST_ALPHA; break; + case EBF_ONE_MINUS_DST_ALPHA: r = GL_ONE_MINUS_DST_ALPHA; break; + case EBF_SRC_ALPHA_SATURATE: r = GL_SRC_ALPHA_SATURATE; break; + } + return r; +} + + } // end namespace } // end namespace diff --git a/source/Irrlicht/COpenGLDriver.h b/source/Irrlicht/COpenGLDriver.h index 3b378685..f45e7f38 100644 --- a/source/Irrlicht/COpenGLDriver.h +++ b/source/Irrlicht/COpenGLDriver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h @@ -378,6 +378,9 @@ namespace video //! Convert E_PRIMITIVE_TYPE to OpenGL equivalent GLenum primitiveTypeToGL(scene::E_PRIMITIVE_TYPE type) const; + //! Convert E_BLEND_FACTOR to OpenGL equivalent + GLenum getGLBlend(E_BLEND_FACTOR factor) const; + private: //! clears the zbuffer and color buffer @@ -446,6 +449,7 @@ namespace video SMaterial Material, LastMaterial; COpenGLTexture* RenderTargetTexture; + core::array MRTargets; const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES]; core::array DepthTextures; struct SUserClipPlane diff --git a/source/Irrlicht/COpenGLExtensionHandler.cpp b/source/Irrlicht/COpenGLExtensionHandler.cpp index c018946a..61b5d900 100644 --- a/source/Irrlicht/COpenGLExtensionHandler.cpp +++ b/source/Irrlicht/COpenGLExtensionHandler.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -19,8 +19,8 @@ namespace video COpenGLExtensionHandler::COpenGLExtensionHandler() : StencilBuffer(false), MultiTextureExtension(false), TextureCompressionExtension(false), - MaxTextureUnits(1), MaxLights(1), MaxAnisotropy(1), - MaxUserClipPlanes(0), MaxAuxBuffers(0), + MaxSupportedTextures(1), MaxTextureUnits(1), MaxLights(1), + MaxAnisotropy(1), MaxUserClipPlanes(0), MaxAuxBuffers(0), MaxMultipleRenderTargets(1), MaxIndices(65535), MaxTextureSize(1), MaxGeometryVerticesOut(0), MaxTextureLODBias(0.f), Version(0), ShaderLanguageVersion(0), @@ -606,7 +606,7 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) if (Version>102 || FeatureAvailable[IRR_ARB_multitexture]) { glGetIntegerv(GL_MAX_TEXTURE_UNITS, &num); - MaxTextureUnits=static_cast(num); + MaxSupportedTextures=static_cast(num); } #endif glGetIntegerv(GL_MAX_LIGHTS, &num); @@ -651,7 +651,11 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &num); MaxMultipleRenderTargets = static_cast(num); } -#elif defined(GL_ATI_draw_buffers) +#endif +#if defined(GL_ATI_draw_buffers) +#ifdef GL_ARB_draw_buffers + else +#endif if (FeatureAvailable[IRR_ATI_draw_buffers]) { glGetIntegerv(GL_MAX_DRAW_BUFFERS_ATI, &num); @@ -689,12 +693,12 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) } else #endif + MaxTextureUnits = core::min_(MaxSupportedTextures, static_cast(MATERIAL_MAX_TEXTURES)); if (MaxTextureUnits < 2) { MultiTextureExtension = false; os::Printer::log("Warning: OpenGL device only has one texture unit. Disabling multitexturing.", ELL_WARNING); } - MaxTextureUnits = core::min_(MaxTextureUnits,static_cast(MATERIAL_MAX_TEXTURES)); #ifdef GL_ARB_occlusion_query if (FeatureAvailable[IRR_ARB_occlusion_query]) diff --git a/source/Irrlicht/COpenGLExtensionHandler.h b/source/Irrlicht/COpenGLExtensionHandler.h index 1a5a1564..b5612b5b 100644 --- a/source/Irrlicht/COpenGLExtensionHandler.h +++ b/source/Irrlicht/COpenGLExtensionHandler.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h @@ -82,11 +82,16 @@ static const char* const OpenGLFeatureStrings[] = { "GL_3DFX_multisample", "GL_3DFX_tbuffer", "GL_3DFX_texture_compression_FXT1", + "GL_AMD_conservative_depth", + "GL_AMD_debug_output", + "GL_AMD_depth_clamp_separate", "GL_AMD_draw_buffers_blend", + "GL_AMD_name_gen_delete", "GL_AMD_performance_monitor", "GL_AMD_seamless_cubemap_per_texture", "GL_AMD_shader_stencil_export", "GL_AMD_texture_texture4", + "GL_AMD_transform_feedback3_lines_triangles", "GL_AMD_vertex_shader_tesselator", "GL_APPLE_aux_depth_stencil", "GL_APPLE_client_storage", @@ -105,9 +110,11 @@ static const char* const OpenGLFeatureStrings[] = { "GL_APPLE_vertex_program_evaluators", "GL_APPLE_ycbcr_422", "GL_ARB_blend_func_extended", + "GL_ARB_cl_event", "GL_ARB_color_buffer_float", "GL_ARB_compatibility", "GL_ARB_copy_buffer", + "GL_ARB_debug_output", "GL_ARB_depth_buffer_float", "GL_ARB_depth_clamp", "GL_ARB_depth_texture", @@ -116,13 +123,17 @@ static const char* const OpenGLFeatureStrings[] = { "GL_ARB_draw_elements_base_vertex", "GL_ARB_draw_indirect", "GL_ARB_draw_instanced", + "GL_ARB_ES2_compatibility", + "GL_ARB_explicit_attrib_location", "GL_ARB_fragment_coord_conventions", "GL_ARB_fragment_program", "GL_ARB_fragment_program_shadow", "GL_ARB_fragment_shader", "GL_ARB_framebuffer_object", "GL_ARB_framebuffer_sRGB", + "GL_ARB_get_program_binary", "GL_ARB_geometry_shader4", + "GL_ARB_gpu_shader5", "GL_ARB_gpu_shader_fp64", "GL_ARB_half_float_pixel", "GL_ARB_half_float_vertex", @@ -133,14 +144,19 @@ static const char* const OpenGLFeatureStrings[] = { "GL_ARB_multisample", "GL_ARB_multitexture", "GL_ARB_occlusion_query", + "GL_ARB_occlusion_query2", "GL_ARB_pixel_buffer_object", "GL_ARB_point_parameters", "GL_ARB_point_sprite", "GL_ARB_provoking_vertex", + "GL_ARB_robustness", "GL_ARB_sample_shading", "GL_ARB_sampler_objects", "GL_ARB_seamless_cube_map", + "GL_ARB_separate_shader_objects", "GL_ARB_shader_objects", + "GL_ARB_shader_precision", + "GL_ARB_shader_stencil_export", "GL_ARB_shader_subroutine", "GL_ARB_shader_texture_lod", "GL_ARB_shading_language_100", @@ -151,7 +167,9 @@ static const char* const OpenGLFeatureStrings[] = { "GL_ARB_tessellation_shader", "GL_ARB_texture_border_clamp", "GL_ARB_texture_buffer_object", + "GL_ARB_texture_buffer_object_rgb32", "GL_ARB_texture_compression", + "GL_ARB_texture_compression_bptc", "GL_ARB_texture_compression_rgtc", "GL_ARB_texture_cube_map", "GL_ARB_texture_cube_map_array", @@ -167,6 +185,8 @@ static const char* const OpenGLFeatureStrings[] = { "GL_ARB_texture_query_lod", "GL_ARB_texture_rectangle", "GL_ARB_texture_rg", + "GL_ARB_texture_rgb10_a2ui", + "GL_ARB_texture_swizzle", "GL_ARB_timer_query", "GL_ARB_transform_feedback2", "GL_ARB_transform_feedback3", @@ -174,11 +194,13 @@ static const char* const OpenGLFeatureStrings[] = { "GL_ARB_uniform_buffer_object", "GL_ARB_vertex_array_bgra", "GL_ARB_vertex_array_object", + "GL_ARB_vertex_attrib_64bit", "GL_ARB_vertex_blend", "GL_ARB_vertex_buffer_object", "GL_ARB_vertex_program", "GL_ARB_vertex_shader", "GL_ARB_vertex_type_2_10_10_10_rev", + "GL_ARB_viewport_array", "GL_ARB_window_pos", "GL_ATI_draw_buffers", "GL_ATI_element_array", @@ -250,6 +272,7 @@ static const char* const OpenGLFeatureStrings[] = { "GL_EXT_secondary_color", "GL_EXT_separate_shader_objects", "GL_EXT_separate_specular_color", + "GL_EXT_shader_image_load_store", "GL_EXT_shadow_funcs", "GL_EXT_shared_texture_palette", "GL_EXT_stencil_clear_tag", @@ -281,6 +304,7 @@ static const char* const OpenGLFeatureStrings[] = { "GL_EXT_transform_feedback", "GL_EXT_vertex_array", "GL_EXT_vertex_array_bgra", + "GL_EXT_vertex_attrib_64bit", "GL_EXT_vertex_shader", "GL_EXT_vertex_weighting", "GL_FfdMaskSGIX", @@ -325,8 +349,11 @@ static const char* const OpenGLFeatureStrings[] = { "GL_NV_geometry_program4", "GL_NV_geometry_shader4", "GL_NV_gpu_program4", + "GL_NV_gpu_program5", + "GL_NV_gpu_shader5", "GL_NV_half_float", "GL_NV_light_max_exponent", + "GL_NV_multisample_coverage", "GL_NV_multisample_filter_hint", "GL_NV_occlusion_query", "GL_NV_packed_depth_stencil", @@ -339,6 +366,8 @@ static const char* const OpenGLFeatureStrings[] = { "GL_NV_register_combiners", "GL_NV_register_combiners2", "GL_NV_shader_buffer_load", + "GL_NV_shader_buffer_store", + "GL_NV_tessellation_program5", "GL_NV_texgen_emboss", "GL_NV_texgen_reflection", "GL_NV_texture_barrier", @@ -351,8 +380,10 @@ static const char* const OpenGLFeatureStrings[] = { "GL_NV_texture_shader3", "GL_NV_transform_feedback", "GL_NV_transform_feedback2", + "GL_NV_vdpau_interop", "GL_NV_vertex_array_range", "GL_NV_vertex_array_range2", + "GL_NV_vertex_attrib_integer_64bit", "GL_NV_vertex_buffer_unified_memory", "GL_NV_vertex_program", "GL_NV_vertex_program1_1", @@ -450,11 +481,16 @@ class COpenGLExtensionHandler IRR_3DFX_multisample = 0, IRR_3DFX_tbuffer, IRR_3DFX_texture_compression_FXT1, + IRR_AMD_conservative_depth, + IRR_AMD_debug_output, + IRR_AMD_depth_clamp_separate, IRR_AMD_draw_buffers_blend, + IRR_AMD_name_gen_delete, IRR_AMD_performance_monitor, IRR_AMD_seamless_cubemap_per_texture, IRR_AMD_shader_stencil_export, IRR_AMD_texture_texture4, + IRR_AMD_transform_feedback3_lines_triangles, IRR_AMD_vertex_shader_tesselator, IRR_APPLE_aux_depth_stencil, IRR_APPLE_client_storage, @@ -473,9 +509,11 @@ class COpenGLExtensionHandler IRR_APPLE_vertex_program_evaluators, IRR_APPLE_ycbcr_422, IRR_ARB_blend_func_extended, + IRR_ARB_cl_event, IRR_ARB_color_buffer_float, IRR_ARB_compatibility, IRR_ARB_copy_buffer, + IRR_ARB_debug_output, IRR_ARB_depth_buffer_float, IRR_ARB_depth_clamp, IRR_ARB_depth_texture, @@ -484,6 +522,8 @@ class COpenGLExtensionHandler IRR_ARB_draw_elements_base_vertex, IRR_ARB_draw_indirect, IRR_ARB_draw_instanced, + IRR_ARB_ES2_compatibility, + IRR_ARB_explicit_attrib_location, IRR_ARB_fragment_coord_conventions, IRR_ARB_fragment_program, IRR_ARB_fragment_program_shadow, @@ -491,6 +531,8 @@ class COpenGLExtensionHandler IRR_ARB_framebuffer_object, IRR_ARB_framebuffer_sRGB, IRR_ARB_geometry_shader4, + IRR_ARB_get_program_binary, + IRR_ARB_gpu_shader5, IRR_ARB_gpu_shader_fp64, IRR_ARB_half_float_pixel, IRR_ARB_half_float_vertex, @@ -501,14 +543,19 @@ class COpenGLExtensionHandler IRR_ARB_multisample, IRR_ARB_multitexture, IRR_ARB_occlusion_query, + IRR_ARB_occlusion_query2, IRR_ARB_pixel_buffer_object, IRR_ARB_point_parameters, IRR_ARB_point_sprite, IRR_ARB_provoking_vertex, + IRR_ARB_robustness, IRR_ARB_sample_shading, IRR_ARB_sampler_objects, IRR_ARB_seamless_cube_map, + IRR_ARB_separate_shader_objects, IRR_ARB_shader_objects, + IRR_ARB_shader_precision, + IRR_ARB_shader_stencil_export, IRR_ARB_shader_subroutine, IRR_ARB_shader_texture_lod, IRR_ARB_shading_language_100, @@ -519,7 +566,9 @@ class COpenGLExtensionHandler IRR_ARB_tessellation_shader, IRR_ARB_texture_border_clamp, IRR_ARB_texture_buffer_object, + IRR_ARB_texture_buffer_object_rgb32, IRR_ARB_texture_compression, + IRR_ARB_texture_compression_bptc, IRR_ARB_texture_compression_rgtc, IRR_ARB_texture_cube_map, IRR_ARB_texture_cube_map_array, @@ -535,6 +584,8 @@ class COpenGLExtensionHandler IRR_ARB_texture_query_lod, IRR_ARB_texture_rectangle, IRR_ARB_texture_rg, + IRR_ARB_texture_rgb10_a2ui, + IRR_ARB_texture_swizzle, IRR_ARB_timer_query, IRR_ARB_transform_feedback2, IRR_ARB_transform_feedback3, @@ -542,11 +593,13 @@ class COpenGLExtensionHandler IRR_ARB_uniform_buffer_object, IRR_ARB_vertex_array_bgra, IRR_ARB_vertex_array_object, + IRR_ARB_vertex_attrib_64bit, IRR_ARB_vertex_blend, IRR_ARB_vertex_buffer_object, IRR_ARB_vertex_program, IRR_ARB_vertex_shader, IRR_ARB_vertex_type_2_10_10_10_rev, + IRR_ARB_viewport_array, IRR_ARB_window_pos, IRR_ATI_draw_buffers, IRR_ATI_element_array, @@ -618,6 +671,7 @@ class COpenGLExtensionHandler IRR_EXT_secondary_color, IRR_EXT_separate_shader_objects, IRR_EXT_separate_specular_color, + IRR_EXT_shader_image_load_store, IRR_EXT_shadow_funcs, IRR_EXT_shared_texture_palette, IRR_EXT_stencil_clear_tag, @@ -649,6 +703,7 @@ class COpenGLExtensionHandler IRR_EXT_transform_feedback, IRR_EXT_vertex_array, IRR_EXT_vertex_array_bgra, + IRR_EXT_vertex_attrib_64bit, IRR_EXT_vertex_shader, IRR_EXT_vertex_weighting, IRR_FfdMaskSGIX, @@ -693,8 +748,11 @@ class COpenGLExtensionHandler IRR_NV_geometry_program4, IRR_NV_geometry_shader4, IRR_NV_gpu_program4, + IRR_NV_gpu_program5, + IRR_NV_gpu_shader5, IRR_NV_half_float, IRR_NV_light_max_exponent, + IRR_NV_multisample_coverage, IRR_NV_multisample_filter_hint, IRR_NV_occlusion_query, IRR_NV_packed_depth_stencil, @@ -707,6 +765,8 @@ class COpenGLExtensionHandler IRR_NV_register_combiners, IRR_NV_register_combiners2, IRR_NV_shader_buffer_load, + IRR_NV_shader_buffer_store, + IRR_NV_tessellation_program5, IRR_NV_texgen_emboss, IRR_NV_texgen_reflection, IRR_NV_texture_barrier, @@ -719,8 +779,10 @@ class COpenGLExtensionHandler IRR_NV_texture_shader3, IRR_NV_transform_feedback, IRR_NV_transform_feedback2, + IRR_NV_vdpau_interop, IRR_NV_vertex_array_range, IRR_NV_vertex_array_range2, + IRR_NV_vertex_attrib_integer_64bit, IRR_NV_vertex_buffer_unified_memory, IRR_NV_vertex_program, IRR_NV_vertex_program1_1, @@ -836,6 +898,8 @@ class COpenGLExtensionHandler // Some non-boolean properties //! Maxmimum texture layers supported by the fixed pipeline + u8 MaxSupportedTextures; + //! Maxmimum texture layers supported by the engine u8 MaxTextureUnits; //! Maximum hardware lights supported u8 MaxLights; diff --git a/source/Irrlicht/COpenGLMaterialRenderer.h b/source/Irrlicht/COpenGLMaterialRenderer.h index f8d2f0d5..fe73aeb1 100644 --- a/source/Irrlicht/COpenGLMaterialRenderer.h +++ b/source/Irrlicht/COpenGLMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -93,7 +93,7 @@ public: glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, (f32) modulate ); #endif - glBlendFunc( getGLBlend(srcFact), getGLBlend(dstFact) ); + glBlendFunc( Driver->getGLBlend(srcFact), Driver->getGLBlend(dstFact) ); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0.f); glEnable(GL_BLEND); @@ -165,29 +165,6 @@ public: { return true; } - - private: - - u32 getGLBlend ( E_BLEND_FACTOR factor ) const - { - u32 r = 0; - switch ( factor ) - { - case EBF_ZERO: r = GL_ZERO; break; - case EBF_ONE: r = GL_ONE; break; - case EBF_DST_COLOR: r = GL_DST_COLOR; break; - case EBF_ONE_MINUS_DST_COLOR: r = GL_ONE_MINUS_DST_COLOR; break; - case EBF_SRC_COLOR: r = GL_SRC_COLOR; break; - case EBF_ONE_MINUS_SRC_COLOR: r = GL_ONE_MINUS_SRC_COLOR; break; - case EBF_SRC_ALPHA: r = GL_SRC_ALPHA; break; - case EBF_ONE_MINUS_SRC_ALPHA: r = GL_ONE_MINUS_SRC_ALPHA; break; - case EBF_DST_ALPHA: r = GL_DST_ALPHA; break; - case EBF_ONE_MINUS_DST_ALPHA: r = GL_ONE_MINUS_DST_ALPHA; break; - case EBF_SRC_ALPHA_SATURATE: r = GL_SRC_ALPHA_SATURATE; break; - } - return r; - } - }; @@ -316,7 +293,7 @@ public: glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE); #endif - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } } @@ -710,6 +687,21 @@ public: if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) { +#ifdef GL_ARB_texture_env_combine + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS_ARB); +#else + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PREVIOUS_ARB); +#endif if (Driver->queryFeature(EVDF_MULTITEXTURE)) { Driver->extGlActiveTexture(GL_TEXTURE1_ARB); @@ -718,11 +710,15 @@ public: glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS_ARB); #else glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, GL_PREVIOUS_ARB); #endif } glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); @@ -730,7 +726,7 @@ public: glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } } diff --git a/source/Irrlicht/COpenGLNormalMapRenderer.cpp b/source/Irrlicht/COpenGLNormalMapRenderer.cpp index c4201255..0de05a6f 100644 --- a/source/Irrlicht/COpenGLNormalMapRenderer.cpp +++ b/source/Irrlicht/COpenGLNormalMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLNormalMapRenderer.h b/source/Irrlicht/COpenGLNormalMapRenderer.h index 4b50954b..726d6bff 100644 --- a/source/Irrlicht/COpenGLNormalMapRenderer.h +++ b/source/Irrlicht/COpenGLNormalMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLParallaxMapRenderer.cpp b/source/Irrlicht/COpenGLParallaxMapRenderer.cpp index 3c3b0e71..d561a8ca 100644 --- a/source/Irrlicht/COpenGLParallaxMapRenderer.cpp +++ b/source/Irrlicht/COpenGLParallaxMapRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLParallaxMapRenderer.h b/source/Irrlicht/COpenGLParallaxMapRenderer.h index 3424c3fe..3dad6085 100644 --- a/source/Irrlicht/COpenGLParallaxMapRenderer.h +++ b/source/Irrlicht/COpenGLParallaxMapRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLSLMaterialRenderer.cpp b/source/Irrlicht/COpenGLSLMaterialRenderer.cpp index 024b2078..4bac925e 100644 --- a/source/Irrlicht/COpenGLSLMaterialRenderer.cpp +++ b/source/Irrlicht/COpenGLSLMaterialRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLSLMaterialRenderer.h b/source/Irrlicht/COpenGLSLMaterialRenderer.h index be122c80..fc3498a2 100644 --- a/source/Irrlicht/COpenGLSLMaterialRenderer.h +++ b/source/Irrlicht/COpenGLSLMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp b/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp index 279642b7..99c73dba 100644 --- a/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp +++ b/source/Irrlicht/COpenGLShaderMaterialRenderer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLShaderMaterialRenderer.h b/source/Irrlicht/COpenGLShaderMaterialRenderer.h index bf182451..5f229c62 100644 --- a/source/Irrlicht/COpenGLShaderMaterialRenderer.h +++ b/source/Irrlicht/COpenGLShaderMaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/COpenGLTexture.cpp b/source/Irrlicht/COpenGLTexture.cpp index b565c91c..8c7fb47a 100644 --- a/source/Irrlicht/COpenGLTexture.cpp +++ b/source/Irrlicht/COpenGLTexture.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -24,7 +24,7 @@ namespace video COpenGLTexture::COpenGLTexture(IImage* origImage, const io::path& name, void* mipmapData, COpenGLDriver* driver) : ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0), TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT), - PixelType(GL_UNSIGNED_BYTE), + PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), IsRenderTarget(false), AutomaticMipmapUpdate(false), ReadOnlyLock(false), KeepImage(true) { @@ -61,7 +61,7 @@ COpenGLTexture::COpenGLTexture(IImage* origImage, const io::path& name, void* mi COpenGLTexture::COpenGLTexture(const io::path& name, COpenGLDriver* driver) : ITexture(name), ColorFormat(ECF_A8R8G8B8), Driver(driver), Image(0), MipImage(0), TextureName(0), InternalFormat(GL_RGBA), PixelFormat(GL_BGRA_EXT), - PixelType(GL_UNSIGNED_BYTE), + PixelType(GL_UNSIGNED_BYTE), MipLevelStored(0), HasMipMaps(true), IsRenderTarget(false), AutomaticMipmapUpdate(false), ReadOnlyLock(false), KeepImage(true) { @@ -354,11 +354,11 @@ void COpenGLTexture::uploadTexture(bool newTexture, void* mipmapData, u32 level) //! lock function -void* COpenGLTexture::lock(bool readOnly, u32 mipmapLevel) +void* COpenGLTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) { // store info about which image is locked IImage* image = (mipmapLevel==0)?Image:MipImage; - ReadOnlyLock |= readOnly; + ReadOnlyLock |= (mode==ETLM_READ_ONLY); MipLevelStored = mipmapLevel; // if data not available or might have changed on GPU download it @@ -390,48 +390,51 @@ void* COpenGLTexture::lock(bool readOnly, u32 mipmapLevel) if (!image) return 0; - u8* pixels = static_cast(image->lock()); - if (!pixels) - return 0; - - // we need to keep the correct texture bound later on - GLint tmpTexture; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tmpTexture); - glBindTexture(GL_TEXTURE_2D, TextureName); - - // allows to read pixels in top-to-bottom order -#ifdef GL_MESA_pack_invert - if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) - glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); -#endif - - // download GPU data as ARGB8 to pixels; - glGetTexImage(GL_TEXTURE_2D, mipmapLevel, GL_BGRA_EXT, GL_UNSIGNED_BYTE, pixels); - -#ifdef GL_MESA_pack_invert - if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) - glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE); - else -#endif + if (mode != ETLM_WRITE_ONLY) { - // opengl images are horizontally flipped, so we have to fix that here. - const s32 pitch=image->getPitch(); - u8* p2 = pixels + (image->getDimension().Height - 1) * pitch; - u8* tmpBuffer = new u8[pitch]; - for (u32 i=0; i < image->getDimension().Height; i += 2) - { - memcpy(tmpBuffer, pixels, pitch); - memcpy(pixels, p2, pitch); - memcpy(p2, tmpBuffer, pitch); - pixels += pitch; - p2 -= pitch; - } - delete [] tmpBuffer; - } - image->unlock(); + u8* pixels = static_cast(image->lock()); + if (!pixels) + return 0; - //reset old bound texture - glBindTexture(GL_TEXTURE_2D, tmpTexture); + // we need to keep the correct texture bound later on + GLint tmpTexture; + glGetIntegerv(GL_TEXTURE_BINDING_2D, &tmpTexture); + glBindTexture(GL_TEXTURE_2D, TextureName); + + // allows to read pixels in top-to-bottom order + #ifdef GL_MESA_pack_invert + if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) + glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); + #endif + + // download GPU data as ARGB8 to pixels; + glGetTexImage(GL_TEXTURE_2D, mipmapLevel, GL_BGRA_EXT, GL_UNSIGNED_BYTE, pixels); + + #ifdef GL_MESA_pack_invert + if (Driver->queryOpenGLFeature(COpenGLExtensionHandler::IRR_MESA_pack_invert)) + glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE); + else + #endif + { + // opengl images are horizontally flipped, so we have to fix that here. + const s32 pitch=image->getPitch(); + u8* p2 = pixels + (image->getDimension().Height - 1) * pitch; + u8* tmpBuffer = new u8[pitch]; + for (u32 i=0; i < image->getDimension().Height; i += 2) + { + memcpy(tmpBuffer, pixels, pitch); + memcpy(pixels, p2, pitch); + memcpy(p2, tmpBuffer, pitch); + pixels += pitch; + p2 -= pitch; + } + delete [] tmpBuffer; + } + image->unlock(); + + //reset old bound texture + glBindTexture(GL_TEXTURE_2D, tmpTexture); + } } return image->lock(); } @@ -605,7 +608,7 @@ static bool checkFBOStatus(COpenGLDriver* Driver); //! RTT ColorFrameBuffer constructor COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d& size, const io::path& name, COpenGLDriver* driver, - const ECOLOR_FORMAT format) + ECOLOR_FORMAT format) : COpenGLTexture(name, driver), DepthTexture(0), ColorFrameBuffer(0) { #ifdef _DEBUG @@ -615,6 +618,9 @@ COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d& size, ImageSize = size; TextureSize = size; + if (ECF_UNKNOWN == format) + format = getBestColorFormat(driver->getColorFormat()); + GLint FilteringType; InternalFormat = getOpenGLFormatAndParametersFromColorFormat(format, FilteringType, PixelFormat, PixelType); @@ -624,7 +630,7 @@ COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d& size, #ifdef GL_EXT_framebuffer_object // generate frame buffer Driver->extGlGenFramebuffers(1, &ColorFrameBuffer); - Driver->extGlBindFramebuffer(GL_FRAMEBUFFER_EXT, ColorFrameBuffer); + bindRTT(); // generate color texture glGenTextures(1, &TextureName); @@ -669,6 +675,7 @@ void COpenGLFBOTexture::bindRTT() #ifdef GL_EXT_framebuffer_object if (ColorFrameBuffer != 0) Driver->extGlBindFramebuffer(GL_FRAMEBUFFER_EXT, ColorFrameBuffer); + glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); #endif } @@ -691,7 +698,7 @@ COpenGLFBODepthTexture::COpenGLFBODepthTexture( const io::path& name, COpenGLDriver* driver, bool useStencil) - : COpenGLFBOTexture(size, name, driver), DepthRenderBuffer(0), + : COpenGLTexture(name, driver), DepthRenderBuffer(0), StencilRenderBuffer(0), UseStencil(useStencil) { #ifdef _DEBUG @@ -727,19 +734,14 @@ COpenGLFBODepthTexture::COpenGLFBODepthTexture( glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, ImageSize.Width, ImageSize.Height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 0); - // we 're in trouble! the code below does not complete - // the FBO currently... stencil buffer is only - // supported with EXT_packed_depth_stencil extension - // (above) - -// // generate stencil texture -// glGenTextures(1, &StencilRenderBuffer); -// glBindTexture(GL_TEXTURE_2D, StencilRenderBuffer); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -// glTexImage2D(GL_TEXTURE_2D, 0, GL_STENCIL_INDEX, ImageSize.Width, -// ImageSize.Height, 0, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, 0); -// glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -// glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + // generate stencil texture + glGenTextures(1, &StencilRenderBuffer); + glBindTexture(GL_TEXTURE_2D, StencilRenderBuffer); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexImage2D(GL_TEXTURE_2D, 0, GL_STENCIL_INDEX, ImageSize.Width, + ImageSize.Height, 0, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, 0); } } #ifdef GL_EXT_framebuffer_object @@ -883,6 +885,7 @@ bool checkFBOStatus(COpenGLDriver* Driver) } #endif os::Printer::log("FBO error", ELL_ERROR); + _IRR_DEBUG_BREAK_IF(true); return false; } diff --git a/source/Irrlicht/COpenGLTexture.h b/source/Irrlicht/COpenGLTexture.h index 47ac6481..acd823c0 100644 --- a/source/Irrlicht/COpenGLTexture.h +++ b/source/Irrlicht/COpenGLTexture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -57,7 +57,7 @@ public: virtual ~COpenGLTexture(); //! lock function - virtual void* lock(bool readOnly=false, u32 mipmapLevel=0); + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); //! unlock function virtual void unlock(); @@ -172,7 +172,7 @@ protected: //! OpenGL FBO depth texture. -class COpenGLFBODepthTexture : public COpenGLFBOTexture +class COpenGLFBODepthTexture : public COpenGLTexture { public: //! FrameBufferObject depth constructor diff --git a/source/Irrlicht/CPLYMeshFileLoader.cpp b/source/Irrlicht/CPLYMeshFileLoader.cpp index 9cff36b3..75cd75fa 100644 --- a/source/Irrlicht/CPLYMeshFileLoader.cpp +++ b/source/Irrlicht/CPLYMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CPLYMeshFileLoader.h b/source/Irrlicht/CPLYMeshFileLoader.h index 5f452445..b26b37f1 100644 --- a/source/Irrlicht/CPLYMeshFileLoader.h +++ b/source/Irrlicht/CPLYMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CPLYMeshWriter.cpp b/source/Irrlicht/CPLYMeshWriter.cpp index a6e8617c..df3cef68 100644 --- a/source/Irrlicht/CPLYMeshWriter.cpp +++ b/source/Irrlicht/CPLYMeshWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2009 Christian Stehno +// Copyright (C) 2008-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CPLYMeshWriter.h b/source/Irrlicht/CPLYMeshWriter.h index 1e23eed8..a2bb17d3 100644 --- a/source/Irrlicht/CPLYMeshWriter.h +++ b/source/Irrlicht/CPLYMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CPakReader.cpp b/source/Irrlicht/CPakReader.cpp index d8ac68c4..05bbaf0d 100644 --- a/source/Irrlicht/CPakReader.cpp +++ b/source/Irrlicht/CPakReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // Code contributed by skreamz diff --git a/source/Irrlicht/CPakReader.h b/source/Irrlicht/CPakReader.h index 00d282af..b8e0b69e 100644 --- a/source/Irrlicht/CPakReader.h +++ b/source/Irrlicht/CPakReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp index 1d1f9d77..67f6b015 100644 --- a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp +++ b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -44,7 +44,7 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if(Time > everyWhatMillisecond) @@ -80,19 +80,20 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, if( MaxAngleDegrees ) { core::vector3df tgt = p.vector; - tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); p.vector = tgt; } - if(MaxLifeTime - MinLifeTime == 0) - p.endTime = now + MinLifeTime; - else - p.endTime = now + MinLifeTime + (os::Randomizer::rand() % (MaxLifeTime - MinLifeTime)); + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); - p.color = MinStartColor.getInterpolated( - MaxStartColor, (os::Randomizer::rand() % 100) / 100.0f); + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); p.startColor = p.color; p.startVector = p.vector; @@ -100,8 +101,7 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, if (MinStartSize==MaxStartSize) p.startSize = MinStartSize; else - p.startSize = MinStartSize.getInterpolated( - MaxStartSize, (os::Randomizer::rand() % 100) / 100.0f); + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); p.size = p.startSize; Particles.push_back(p); @@ -133,19 +133,20 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, if( MaxAngleDegrees ) { core::vector3df tgt = Direction; - tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); p.vector = tgt; } - if(MaxLifeTime - MinLifeTime == 0) - p.endTime = now + MinLifeTime; - else - p.endTime = now + MinLifeTime + (os::Randomizer::rand() % (MaxLifeTime - MinLifeTime)); + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); - p.color = MinStartColor.getInterpolated( - MaxStartColor, (os::Randomizer::rand() % 100) / 100.0f); + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); p.startColor = p.color; p.startVector = p.vector; @@ -153,8 +154,7 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall, if (MinStartSize==MaxStartSize) p.startSize = MinStartSize; else - p.startSize = MinStartSize.getInterpolated( - MaxStartSize, (os::Randomizer::rand() % 100) / 100.0f); + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); p.size = p.startSize; Particles.push_back(p); diff --git a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h index d6bf9233..3358ac30 100644 --- a/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h +++ b/source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -70,10 +70,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Get Mesh we're emitting particles from virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const { return Node; } @@ -104,10 +113,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Get the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Get the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } private: diff --git a/source/Irrlicht/CParticleAttractionAffector.cpp b/source/Irrlicht/CParticleAttractionAffector.cpp index 0fc38603..ab9678df 100644 --- a/source/Irrlicht/CParticleAttractionAffector.cpp +++ b/source/Irrlicht/CParticleAttractionAffector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleAttractionAffector.h b/source/Irrlicht/CParticleAttractionAffector.h index 241083fb..62b10f65 100644 --- a/source/Irrlicht/CParticleAttractionAffector.h +++ b/source/Irrlicht/CParticleAttractionAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleBoxEmitter.cpp b/source/Irrlicht/CParticleBoxEmitter.cpp index 4486440c..27a18317 100644 --- a/source/Irrlicht/CParticleBoxEmitter.cpp +++ b/source/Irrlicht/CParticleBoxEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -40,7 +40,7 @@ s32 CParticleBoxEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outAr Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if (Time > everyWhatMillisecond) @@ -56,9 +56,9 @@ s32 CParticleBoxEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outAr for (u32 i=0; igetAttributeAsFloat("MinStartSizeWidth"); - MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); - MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); - MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleBoxEmitter.h b/source/Irrlicht/CParticleBoxEmitter.h index f59e7719..c816e11f 100644 --- a/source/Irrlicht/CParticleBoxEmitter.h +++ b/source/Irrlicht/CParticleBoxEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -31,7 +31,7 @@ public: u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); //! Prepares an array with new particles to emitt into the system @@ -59,6 +59,15 @@ public: //! Set the minimum starting size for particles virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } + //! Set box from which the particles are emitted. virtual void setBox( const core::aabbox3df& box ) { Box = box; } @@ -78,10 +87,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } //! Get box from which the particles are emitted. virtual const core::aabbox3df& getBox() const { return Box; } diff --git a/source/Irrlicht/CParticleCylinderEmitter.cpp b/source/Irrlicht/CParticleCylinderEmitter.cpp index 1c0937bf..4e7d1a83 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.cpp +++ b/source/Irrlicht/CParticleCylinderEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -43,7 +43,7 @@ s32 CParticleCylinderEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if(Time > everyWhatMillisecond) @@ -59,18 +59,14 @@ s32 CParticleCylinderEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& for(u32 i=0; igetAttributeAsFloat("MinStartSizeWidth"); - MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); - MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); - MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleCylinderEmitter.h b/source/Irrlicht/CParticleCylinderEmitter.h index be2465ae..aafac10d 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.h +++ b/source/Irrlicht/CParticleCylinderEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -31,7 +31,7 @@ public: u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) + const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ); //! Prepares an array with new particles to emitt into the system @@ -69,10 +69,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Get the center of the cylinder virtual const core::vector3df& getCenter() const { return Center; } @@ -105,10 +114,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } //! Writes attributes of the object. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; diff --git a/source/Irrlicht/CParticleFadeOutAffector.cpp b/source/Irrlicht/CParticleFadeOutAffector.cpp index 5559c424..279c934e 100644 --- a/source/Irrlicht/CParticleFadeOutAffector.cpp +++ b/source/Irrlicht/CParticleFadeOutAffector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -36,7 +36,7 @@ void CParticleFadeOutAffector::affect(u32 now, SParticle* particlearray, u32 cou { if (particlearray[i].endTime - now < FadeOutTime) { - d = (particlearray[i].endTime - now) / FadeOutTime; + d = (particlearray[i].endTime - now) / FadeOutTime; // FadeOutTime probably f32 to save casts here (just guessing) particlearray[i].color = particlearray[i].startColor.getInterpolated( TargetColor, d); } diff --git a/source/Irrlicht/CParticleFadeOutAffector.h b/source/Irrlicht/CParticleFadeOutAffector.h index 7ad97fa0..7afb6619 100644 --- a/source/Irrlicht/CParticleFadeOutAffector.h +++ b/source/Irrlicht/CParticleFadeOutAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -28,22 +28,22 @@ public: virtual void setTargetColor( const video::SColor& targetColor ) { TargetColor = targetColor; } //! Sets the amount of time it takes for each particle to fade out. - virtual void setFadeOutTime( f32 fadeOutTime ) { FadeOutTime = fadeOutTime; } + virtual void setFadeOutTime( u32 fadeOutTime ) { FadeOutTime = fadeOutTime ? static_cast(fadeOutTime) : 1.0f; } //! Sets the targetColor, i.e. the color the particles will interpolate //! to over time. virtual const video::SColor& getTargetColor() const { return TargetColor; } //! Sets the amount of time it takes for each particle to fade out. - virtual f32 getFadeOutTime() const { return FadeOutTime; } + virtual u32 getFadeOutTime() const { return static_cast(FadeOutTime); } //! Writes attributes of the object. - //! Implement this to expose the attributes of your scene node animator for + //! Implement this to expose the attributes of your scene node animator for //! scripting languages, editors, debuggers or xml serialization purposes. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; //! Reads attributes of the object. - //! Implement this to set the attributes of your scene node animator for + //! Implement this to set the attributes of your scene node animator for //! scripting languages, editors, debuggers or xml deserialization purposes. //! \param startIndex: start index where to start reading attributes. //! \return: returns last index of an attribute read by this affector diff --git a/source/Irrlicht/CParticleGravityAffector.cpp b/source/Irrlicht/CParticleGravityAffector.cpp index c57ca34e..3a7bf185 100644 --- a/source/Irrlicht/CParticleGravityAffector.cpp +++ b/source/Irrlicht/CParticleGravityAffector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleGravityAffector.h b/source/Irrlicht/CParticleGravityAffector.h index d517c25f..88a129de 100644 --- a/source/Irrlicht/CParticleGravityAffector.h +++ b/source/Irrlicht/CParticleGravityAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleMeshEmitter.cpp b/source/Irrlicht/CParticleMeshEmitter.cpp index 34c2835a..e5571164 100644 --- a/source/Irrlicht/CParticleMeshEmitter.cpp +++ b/source/Irrlicht/CParticleMeshEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -44,7 +44,7 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if(Time > everyWhatMillisecond) @@ -77,19 +77,20 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA if( MaxAngleDegrees ) { core::vector3df tgt = p.vector; - tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); - tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); - tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); p.vector = tgt; } - if(MaxLifeTime - MinLifeTime == 0) - p.endTime = now + MinLifeTime; - else - p.endTime = now + MinLifeTime + (os::Randomizer::rand() % (MaxLifeTime - MinLifeTime)); + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); - p.color = MinStartColor.getInterpolated( - MaxStartColor, (os::Randomizer::rand() % 100) / 100.0f); + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); p.startColor = p.color; p.startVector = p.vector; @@ -97,8 +98,7 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA if (MinStartSize==MaxStartSize) p.startSize = MinStartSize; else - p.startSize = MinStartSize.getInterpolated( - MaxStartSize, (os::Randomizer::rand() % 100) / 100.0f); + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); p.size = p.startSize; Particles.push_back(p); @@ -107,16 +107,7 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA } else { - s32 randomMB = 0; - - if( MBNumber < 0 ) - { - randomMB = os::Randomizer::rand() % MBCount; - } - else - { - randomMB = MBNumber; - } + const s32 randomMB = (MBNumber < 0) ? (os::Randomizer::rand() % MBCount) : MBNumber; u32 vertexNumber = Mesh->getMeshBuffer(randomMB)->getVertexCount(); if (!vertexNumber) @@ -135,19 +126,20 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA if( MaxAngleDegrees ) { core::vector3df tgt = Direction; - tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); - tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); - tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0)); + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); p.vector = tgt; } - if(MaxLifeTime - MinLifeTime == 0) - p.endTime = now + MinLifeTime; - else - p.endTime = now + MinLifeTime + (os::Randomizer::rand() % (MaxLifeTime - MinLifeTime)); + p.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + p.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); - p.color = MinStartColor.getInterpolated( - MaxStartColor, (os::Randomizer::rand() % 100) / 100.0f); + if (MinStartColor==MaxStartColor) + p.color=MinStartColor; + else + p.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); p.startColor = p.color; p.startVector = p.vector; @@ -155,8 +147,7 @@ s32 CParticleMeshEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA if (MinStartSize==MaxStartSize) p.startSize = MinStartSize; else - p.startSize = MinStartSize.getInterpolated( - MaxStartSize, (os::Randomizer::rand() % 100) / 100.0f); + p.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); p.size = p.startSize; Particles.push_back(p); diff --git a/source/Irrlicht/CParticleMeshEmitter.h b/source/Irrlicht/CParticleMeshEmitter.h index 3cbb4f35..213d6755 100644 --- a/source/Irrlicht/CParticleMeshEmitter.h +++ b/source/Irrlicht/CParticleMeshEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -71,10 +71,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Get Mesh we're emitting particles from virtual const IMesh* getMesh() const { return Mesh; } @@ -105,10 +114,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } private: diff --git a/source/Irrlicht/CParticlePointEmitter.cpp b/source/Irrlicht/CParticlePointEmitter.cpp index 1982ee3a..d86a89e8 100644 --- a/source/Irrlicht/CParticlePointEmitter.cpp +++ b/source/Irrlicht/CParticlePointEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -40,7 +40,7 @@ s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& out Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if (Time > everyWhatMillisecond) @@ -52,19 +52,20 @@ s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& out if (MaxAngleDegrees) { core::vector3df tgt = Direction; - tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); - tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees); + tgt.rotateXYBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateYZBy(os::Randomizer::frand() * MaxAngleDegrees); + tgt.rotateXZBy(os::Randomizer::frand() * MaxAngleDegrees); Particle.vector = tgt; } - if (MaxLifeTime - MinLifeTime == 0) - Particle.endTime = now + MinLifeTime; - else - Particle.endTime = now + MinLifeTime + (os::Randomizer::rand() % (MaxLifeTime - MinLifeTime)); + Particle.endTime = now + MinLifeTime; + if (MaxLifeTime != MinLifeTime) + Particle.endTime += os::Randomizer::rand() % (MaxLifeTime - MinLifeTime); - Particle.color = MinStartColor.getInterpolated( - MaxStartColor, (os::Randomizer::rand() % 100) / 100.0f); + if (MinStartColor==MaxStartColor) + Particle.color=MinStartColor; + else + Particle.color = MinStartColor.getInterpolated(MaxStartColor, os::Randomizer::frand()); Particle.startColor = Particle.color; Particle.startVector = Particle.vector; @@ -72,8 +73,7 @@ s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& out if (MinStartSize==MaxStartSize) Particle.startSize = MinStartSize; else - Particle.startSize = MinStartSize.getInterpolated( - MaxStartSize, (os::Randomizer::rand() % 100) / 100.0f); + Particle.startSize = MinStartSize.getInterpolated(MaxStartSize, os::Randomizer::frand()); Particle.size = Particle.startSize; outArray = &Particle; @@ -108,10 +108,19 @@ void CParticlePointEmitter::deserializeAttributes(io::IAttributes* in, io::SAttr if (Direction.getLength() == 0) Direction.set(0,0.01f,0); - MinStartSize.Width = in->getAttributeAsFloat("MinStartSizeWidth"); - MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); - MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); - MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticlePointEmitter.h b/source/Irrlicht/CParticlePointEmitter.h index 4ae94045..e9edc09a 100644 --- a/source/Irrlicht/CParticlePointEmitter.h +++ b/source/Irrlicht/CParticlePointEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -51,10 +51,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Gets direction the emitter emits particles. virtual const core::vector3df& getDirection() const { return Direction; } @@ -72,10 +81,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } //! Writes attributes of the object. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; diff --git a/source/Irrlicht/CParticleRingEmitter.cpp b/source/Irrlicht/CParticleRingEmitter.cpp index 76566bad..3c1aeb5b 100644 --- a/source/Irrlicht/CParticleRingEmitter.cpp +++ b/source/Irrlicht/CParticleRingEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -42,7 +42,7 @@ s32 CParticleRingEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA Time += timeSinceLastCall; u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; f32 everyWhatMillisecond = 1000.0f / perSecond; if(Time > everyWhatMillisecond) @@ -57,14 +57,14 @@ s32 CParticleRingEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA for(u32 i=0; igetAttributeAsFloat("MinStartSizeWidth"); - MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); - MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); - MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleRingEmitter.h b/source/Irrlicht/CParticleRingEmitter.h index 7c2dee6c..d4328dbc 100644 --- a/source/Irrlicht/CParticleRingEmitter.h +++ b/source/Irrlicht/CParticleRingEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -53,10 +53,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Set the center of the ring virtual void setCenter( const core::vector3df& center ) { Center = center; } @@ -83,10 +92,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } //! Get the center of the ring virtual const core::vector3df& getCenter() const { return Center; } diff --git a/source/Irrlicht/CParticleRotationAffector.cpp b/source/Irrlicht/CParticleRotationAffector.cpp index c9fa8f6c..d7a26677 100644 --- a/source/Irrlicht/CParticleRotationAffector.cpp +++ b/source/Irrlicht/CParticleRotationAffector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleRotationAffector.h b/source/Irrlicht/CParticleRotationAffector.h index 9c449579..48ad5960 100644 --- a/source/Irrlicht/CParticleRotationAffector.h +++ b/source/Irrlicht/CParticleRotationAffector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CParticleSphereEmitter.cpp b/source/Irrlicht/CParticleSphereEmitter.cpp index 950eb6de..b2f782a0 100644 --- a/source/Irrlicht/CParticleSphereEmitter.cpp +++ b/source/Irrlicht/CParticleSphereEmitter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -43,7 +43,7 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou Time += timeSinceLastCall; const u32 pps = (MaxParticlesPerSecond - MinParticlesPerSecond); - const f32 perSecond = pps ? (f32)MinParticlesPerSecond + (os::Randomizer::rand() % pps) : MinParticlesPerSecond; + const f32 perSecond = pps ? ((f32)MinParticlesPerSecond + os::Randomizer::frand() * pps) : MinParticlesPerSecond; const f32 everyWhatMillisecond = 1000.0f / perSecond; if(Time > everyWhatMillisecond) @@ -59,13 +59,13 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou for(u32 i=0; igetAttributeAsFloat("MinStartSizeWidth"); - MinStartSize.Height = in->getAttributeAsFloat("MinStartSizeHeight"); - MaxStartSize.Width = in->getAttributeAsFloat("MaxStartSizeWidth"); - MaxStartSize.Height = in->getAttributeAsFloat("MaxStartSizeHeight"); - + int idx = -1; + idx = in->findAttribute("MinStartSizeWidth"); + if ( idx >= 0 ) + MinStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MinStartSizeHeight"); + if ( idx >= 0 ) + MinStartSize.Height = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeWidth"); + if ( idx >= 0 ) + MaxStartSize.Width = in->getAttributeAsFloat(idx); + idx = in->findAttribute("MaxStartSizeHeight"); + if ( idx >= 0 ) + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleSphereEmitter.h b/source/Irrlicht/CParticleSphereEmitter.h index 5273db45..4c0b326e 100644 --- a/source/Irrlicht/CParticleSphereEmitter.h +++ b/source/Irrlicht/CParticleSphereEmitter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -53,10 +53,19 @@ public: virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; + virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; + virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } + + //! Set the minimum particle life-time in milliseconds + virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } + + //! Set the maximum particle life-time in milliseconds + virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } + + //! Set maximal random derivation from the direction + virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } //! Set the center of the sphere for particle emissions virtual void setCenter( const core::vector3df& center ) { Center = center; } @@ -80,10 +89,19 @@ public: virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } //! Gets the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; }; + virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } //! Gets the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; }; + virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } + + //! Get the minimum particle life-time in milliseconds + virtual u32 getMinLifeTime() const { return MinLifeTime; } + + //! Get the maximum particle life-time in milliseconds + virtual u32 getMaxLifeTime() const { return MaxLifeTime; } + + //! Get maximal random derivation from the direction + virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } //! Get the center of the sphere for particle emissions virtual const core::vector3df& getCenter() const { return Center; } diff --git a/source/Irrlicht/CParticleSystemSceneNode.cpp b/source/Irrlicht/CParticleSystemSceneNode.cpp index 88d4c13b..6d17d31d 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.cpp +++ b/source/Irrlicht/CParticleSystemSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -91,6 +91,11 @@ void CParticleSystemSceneNode::addAffector(IParticleAffector* affector) AffectorList.push_back(affector); } +//! Get a list of all particle affectors. +const core::list& CParticleSystemSceneNode::getAffectors() const +{ + return AffectorList; +} //! Removes all particle affectors in the particle system. void CParticleSystemSceneNode::removeAllAffectors() @@ -452,7 +457,14 @@ void CParticleSystemSceneNode::doParticleSystem(u32 time) { // erase is pretty expensive! if (now > Particles[i].endTime) - Particles.erase(i); + { + // Particle order does not seem to matter. + // So we can delete by switching with last particle and deleting that one. + // This is a lot faster and speed is very important here as the erase otherwise + // can cause noticable freezes. + Particles[i] = Particles[Particles.size()-1]; + Particles.erase( Particles.size()-1 ); + } else { Particles[i].pos += (Particles[i].vector * scale); @@ -486,6 +498,11 @@ void CParticleSystemSceneNode::setParticlesAreGlobal(bool global) ParticlesAreGlobal = global; } +//! Remove all currently visible particles +void CParticleSystemSceneNode::clearParticles() +{ + Particles.set_used(0); +} //! Sets the size of all particles. void CParticleSystemSceneNode::setParticleSize(const core::dimension2d &size) diff --git a/source/Irrlicht/CParticleSystemSceneNode.h b/source/Irrlicht/CParticleSystemSceneNode.h index 23fde158..74f0bfc7 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.h +++ b/source/Irrlicht/CParticleSystemSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -42,6 +42,9 @@ public: //! Adds new particle affector to the particle system. virtual void addAffector(IParticleAffector* affector); + //! Get a list of all particle affectors. + virtual const core::list& getAffectors() const; + //! Removes all particle affectors in the particle system. virtual void removeAllAffectors(); @@ -187,6 +190,9 @@ public: //! ignore it. Default is true. virtual void setParticlesAreGlobal(bool global=true); + //! Remove all currently visible particles + virtual void clearParticles(); + //! Writes attributes of the scene node. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; diff --git a/source/Irrlicht/CQ3LevelMesh.cpp b/source/Irrlicht/CQ3LevelMesh.cpp index 4b0f41e8..1f1d5734 100644 --- a/source/Irrlicht/CQ3LevelMesh.cpp +++ b/source/Irrlicht/CQ3LevelMesh.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -27,9 +27,10 @@ namespace scene //! constructor CQ3LevelMesh::CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr, const Q3LevelLoadParameter &loadParam) - : LoadParam(loadParam), Textures(0), LightMaps(0), - Vertices(0), Faces(0), Planes(0), Nodes(0), Leafs(0), LeafFaces(0), - MeshVerts(0), Brushes(0), FileSystem(fs), SceneManager(smgr) + : LoadParam(loadParam), Textures(0), NumTextures(0), LightMaps(0), NumLightMaps(0), + Vertices(0), NumVertices(0), Faces(0), NumFaces(0), Planes(0), NumPlanes(0), + Nodes(0), NumNodes(0), Leafs(0), NumLeafs(0), LeafFaces(0), NumLeafFaces(0), + MeshVerts(0), NumMeshVerts(0), Brushes(0), NumBrushes(0), FileSystem(fs), SceneManager(smgr) { #ifdef _DEBUG IReferenceCounted::setDebugName("CQ3LevelMesh"); @@ -197,6 +198,8 @@ IMesh* CQ3LevelMesh::getMesh(s32 frameInMs, s32 detailLevel, s32 startFrameLoop, void CQ3LevelMesh::loadTextures(tBSPLump* l, io::IReadFile* file) { NumTextures = l->length / sizeof(tBSPTexture); + if ( !NumTextures ) + return; Textures = new tBSPTexture[NumTextures]; file->seek(l->offset); @@ -217,6 +220,8 @@ void CQ3LevelMesh::loadTextures(tBSPLump* l, io::IReadFile* file) void CQ3LevelMesh::loadLightmaps(tBSPLump* l, io::IReadFile* file) { NumLightMaps = l->length / sizeof(tBSPLightmap); + if ( !NumLightMaps ) + return; LightMaps = new tBSPLightmap[NumLightMaps]; file->seek(l->offset); @@ -228,6 +233,8 @@ void CQ3LevelMesh::loadLightmaps(tBSPLump* l, io::IReadFile* file) void CQ3LevelMesh::loadVerts(tBSPLump* l, io::IReadFile* file) { NumVertices = l->length / sizeof(tBSPVertex); + if ( !NumVertices ) + return; Vertices = new tBSPVertex[NumVertices]; file->seek(l->offset); @@ -255,6 +262,8 @@ void CQ3LevelMesh::loadVerts(tBSPLump* l, io::IReadFile* file) void CQ3LevelMesh::loadFaces(tBSPLump* l, io::IReadFile* file) { NumFaces = l->length / sizeof(tBSPFace); + if (!NumFaces) + return; Faces = new tBSPFace[NumFaces]; file->seek(l->offset); @@ -395,6 +404,8 @@ void CQ3LevelMesh::loadModels(tBSPLump* l, io::IReadFile* file) void CQ3LevelMesh::loadMeshVerts(tBSPLump* l, io::IReadFile* file) { NumMeshVerts = l->length / sizeof(s32); + if (!NumMeshVerts) + return; MeshVerts = new s32[NumMeshVerts]; file->seek(l->offset); @@ -718,13 +729,13 @@ s32 CQ3LevelMesh::setShaderMaterial( video::SMaterial &material, const tBSPFace s32 shaderState = -1; - if ( face->textureID >= 0 ) + if ( face->textureID >= 0 && face->textureID < (s32)Tex.size() ) { material.setTexture(0, Tex [ face->textureID ].Texture); shaderState = Tex [ face->textureID ].ShaderID; } - if ( face->lightmapID >= 0 ) + if ( face->lightmapID >= 0 && face->lightmapID < (s32)Lightmap.size() ) { material.setTexture(1, Lightmap [ face->lightmapID ]); material.MaterialType = LoadParam.defaultLightMapMaterial; @@ -1834,7 +1845,7 @@ void CQ3LevelMesh::loadTextures() s32 t; // load lightmaps. - Lightmap.set_used(NumLightMaps+1); + Lightmap.set_used(NumLightMaps); /* bool oldMipMapState = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); @@ -1859,7 +1870,7 @@ void CQ3LevelMesh::loadTextures() // Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, oldMipMapState); // load textures - Tex.set_used( NumTextures+1 ); + Tex.set_used( NumTextures ); const IShader* shader; diff --git a/source/Irrlicht/CQ3LevelMesh.h b/source/Irrlicht/CQ3LevelMesh.h index 9d58319e..f829dd3c 100644 --- a/source/Irrlicht/CQ3LevelMesh.h +++ b/source/Irrlicht/CQ3LevelMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CQuake3ShaderSceneNode.cpp b/source/Irrlicht/CQuake3ShaderSceneNode.cpp index 10e4999e..d40092a5 100644 --- a/source/Irrlicht/CQuake3ShaderSceneNode.cpp +++ b/source/Irrlicht/CQuake3ShaderSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Thomas Alten / Nikolaus Gebhardt +// Copyright (C) 2002-2011 Thomas Alten / Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CQuake3ShaderSceneNode.h b/source/Irrlicht/CQuake3ShaderSceneNode.h index 83089d9a..9bcc1af2 100644 --- a/source/Irrlicht/CQuake3ShaderSceneNode.h +++ b/source/Irrlicht/CQuake3ShaderSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CReadFile.cpp b/source/Irrlicht/CReadFile.cpp index b0d1a5b8..501168f2 100644 --- a/source/Irrlicht/CReadFile.cpp +++ b/source/Irrlicht/CReadFile.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CReadFile.h b/source/Irrlicht/CReadFile.h index aca25112..708bc944 100644 --- a/source/Irrlicht/CReadFile.h +++ b/source/Irrlicht/CReadFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSTLMeshFileLoader.cpp b/source/Irrlicht/CSTLMeshFileLoader.cpp index 720d6812..0ee62e9d 100644 --- a/source/Irrlicht/CSTLMeshFileLoader.cpp +++ b/source/Irrlicht/CSTLMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSTLMeshFileLoader.h b/source/Irrlicht/CSTLMeshFileLoader.h index fc8280c9..4bb855bf 100644 --- a/source/Irrlicht/CSTLMeshFileLoader.h +++ b/source/Irrlicht/CSTLMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Christian Stehno +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSTLMeshWriter.cpp b/source/Irrlicht/CSTLMeshWriter.cpp index f705cc1c..93add5c5 100644 --- a/source/Irrlicht/CSTLMeshWriter.cpp +++ b/source/Irrlicht/CSTLMeshWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSTLMeshWriter.h b/source/Irrlicht/CSTLMeshWriter.h index 017d0eb3..ba9981ae 100644 --- a/source/Irrlicht/CSTLMeshWriter.h +++ b/source/Irrlicht/CSTLMeshWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneCollisionManager.cpp b/source/Irrlicht/CSceneCollisionManager.cpp index 123395a0..98c080f2 100644 --- a/source/Irrlicht/CSceneCollisionManager.cpp +++ b/source/Irrlicht/CSceneCollisionManager.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -303,7 +303,7 @@ void CSceneCollisionManager::getPickedNodeFromBBAndSelector( core::triangle3df candidateTriangle; // do intersection test in object space - const ISceneNode * hitNode = 0; + ISceneNode * hitNode = 0; if (box.intersectsWithLine(line) && getCollisionPoint(ray, selector, candidateCollisionPoint, candidateTriangle, hitNode)) { @@ -349,7 +349,7 @@ ISceneNode* CSceneCollisionManager::getSceneNodeFromCameraBB( bool CSceneCollisionManager::getCollisionPoint(const core::line3d& ray, ITriangleSelector* selector, core::vector3df& outIntersection, core::triangle3df& outTriangle, - const ISceneNode*& outNode) + ISceneNode*& outNode) { if (!selector) { @@ -423,7 +423,7 @@ core::vector3df CSceneCollisionManager::getCollisionResultPosition( core::triangle3df& triout, core::vector3df& hitPosition, bool& outFalling, - const ISceneNode*& outNode, + ISceneNode*& outNode, f32 slidingSpeed, const core::vector3df& gravity) { @@ -691,7 +691,7 @@ core::vector3df CSceneCollisionManager::collideEllipsoidWithWorld( core::triangle3df& triout, core::vector3df& hitPosition, bool& outFalling, - const ISceneNode*& outNode) + ISceneNode*& outNode) { if (!selector || radius.X == 0.0f || radius.Y == 0.0f || radius.Z == 0.0f) return position; @@ -874,7 +874,7 @@ core::line3d CSceneCollisionManager::getRayFromScreenCoordinates( //! Calculates 2d screen position from a 3d position. core::position2d CSceneCollisionManager::getScreenCoordinatesFrom3DPosition( - const core::vector3df & pos3d, ICameraSceneNode* camera) + const core::vector3df & pos3d, ICameraSceneNode* camera, bool useViewPort) { if (!SceneManager || !Driver) return core::position2d(-1000,-1000); @@ -885,8 +885,11 @@ core::position2d CSceneCollisionManager::getScreenCoordinatesFrom3DPosition if (!camera) return core::position2d(-1000,-1000); - const core::rect& viewPort = Driver->getViewPort(); - core::dimension2d dim(viewPort.getWidth(), viewPort.getHeight()); + core::dimension2d dim; + if (useViewPort) + dim.set(Driver->getViewPort().getWidth(), Driver->getViewPort().getHeight()); + else + dim=(Driver->getScreenSize()); dim.Width /= 2; dim.Height /= 2; @@ -905,7 +908,7 @@ core::position2d CSceneCollisionManager::getScreenCoordinatesFrom3DPosition core::reciprocal(transformedPos[3]); return core::position2d( - core::round32(dim.Width * transformedPos[0] * zDiv) + dim.Width, + dim.Width + core::round32(dim.Width * (transformedPos[0] * zDiv)), dim.Height - core::round32(dim.Height * (transformedPos[1] * zDiv))); } diff --git a/source/Irrlicht/CSceneCollisionManager.h b/source/Irrlicht/CSceneCollisionManager.h index 7b13c8b9..5d1eb27b 100644 --- a/source/Irrlicht/CSceneCollisionManager.h +++ b/source/Irrlicht/CSceneCollisionManager.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -45,7 +45,7 @@ namespace scene virtual bool getCollisionPoint(const core::line3d& ray, ITriangleSelector* selector, core::vector3df& outCollisionPoint, core::triangle3df& outTriangle, - const ISceneNode* & outNode); + ISceneNode* & outNode); //! Collides a moving ellipsoid with a 3d world with gravity and returns //! the resulting new position of the ellipsoid. @@ -57,7 +57,7 @@ namespace scene core::triangle3df& triout, core::vector3df& hitPosition, bool& outFalling, - const ISceneNode*& outNode, + ISceneNode*& outNode, f32 slidingSpeed, const core::vector3df& gravityDirectionAndSpeed); @@ -67,7 +67,7 @@ namespace scene //! Calculates 2d screen position from a 3d position. virtual core::position2d getScreenCoordinatesFrom3DPosition( - const core::vector3df & pos, ICameraSceneNode* camera=0); + const core::vector3df & pos, ICameraSceneNode* camera=0, bool useViewPort=false); //! Gets the scene node and nearest collision point for a ray based on //! the nodes' id bitmasks, bounding boxes and triangle selectors. @@ -138,7 +138,7 @@ namespace scene const core::vector3df& gravity, core::triangle3df& triout, core::vector3df& hitPosition, bool& outFalling, - const ISceneNode*& outNode); + ISceneNode*& outNode); core::vector3df collideWithWorld(s32 recursionDepth, SCollisionData &colData, core::vector3df pos, core::vector3df vel); diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp index 56efe516..fe3423d1 100644 --- a/source/Irrlicht/CSceneManager.cpp +++ b/source/Irrlicht/CSceneManager.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -291,6 +291,12 @@ CSceneManager::~CSceneManager() { clearDeletionList(); + //! force to remove hardwareTextures from the driver + //! because Scenes may hold internally data bounded to sceneNodes + //! which may be destroyed twice + if (Driver) + Driver->removeAllHardwareBuffers (); + if (FileSystem) FileSystem->drop(); @@ -324,12 +330,6 @@ CSceneManager::~CSceneManager() for (i=0; idrop(); - //! force to remove hardwareTextures from the driver - //! because Scenes may hold internally data bounded to sceneNodes - //! which may be destroyed twice - if (Driver) - Driver->removeAllHardwareBuffers (); - if(LightManager) LightManager->drop(); @@ -588,9 +588,6 @@ ISceneNode* CSceneManager::addWaterSurfaceSceneNode(IMesh* mesh, f32 waveHeight, ISceneNode* parent, s32 id, const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale) { - if (!mesh) - return 0; - if (!parent) parent = this; @@ -963,9 +960,10 @@ IAnimatedMesh* CSceneManager::addTerrainMesh(const io::path& name, if (MeshCache->isMeshLoaded(name)) return MeshCache->getMeshByName(name); + const bool debugBorders=false; IMesh* mesh = GeometryCreator->createTerrainMesh(texture, heightmap, stretchSize, maxHeight, getVideoDriver(), - defaultVertexBlockSize); + defaultVertexBlockSize, debugBorders); if (!mesh) return 0; @@ -2040,13 +2038,13 @@ ISceneNodeAnimatorFactory* CSceneManager::getSceneNodeAnimatorFactory(u32 index) //! Saves the current scene into a file. //! \param filename: Name of the file . -bool CSceneManager::saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer) +bool CSceneManager::saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) { bool ret = false; io::IWriteFile* file = FileSystem->createAndWriteFile(filename); if (file) { - ret = saveScene(file, userDataSerializer); + ret = saveScene(file, userDataSerializer, node); file->drop(); } _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; @@ -2055,7 +2053,7 @@ bool CSceneManager::saveScene(const io::path& filename, ISceneUserDataSerializer //! Saves the current scene into a file. -bool CSceneManager::saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer) +bool CSceneManager::saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) { if (!file) { @@ -2069,9 +2067,11 @@ bool CSceneManager::saveScene(io::IWriteFile* file, ISceneUserDataSerializer* us _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; return false; } + if (!node) + node=this; writer->writeXMLHeader(); - writeSceneNode(writer, this, userDataSerializer); + writeSceneNode(writer, node, userDataSerializer, FileSystem->getFileDir(FileSystem->getAbsolutePath(file->getFileName())).c_str(), true); writer->drop(); return true; @@ -2080,7 +2080,7 @@ bool CSceneManager::saveScene(io::IWriteFile* file, ISceneUserDataSerializer* us //! Loads a scene. Note that the current scene is not cleared before. //! \param filename: Name of the file . -bool CSceneManager::loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer) +bool CSceneManager::loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) { bool ret = false; io::IReadFile* read = FileSystem->createAndOpenFile(filename); @@ -2090,7 +2090,7 @@ bool CSceneManager::loadScene(const io::path& filename, ISceneUserDataSerializer } else { - ret = loadScene(read, userDataSerializer); + ret = loadScene(read, userDataSerializer, node); read->drop(); } @@ -2100,7 +2100,7 @@ bool CSceneManager::loadScene(const io::path& filename, ISceneUserDataSerializer //! Loads a scene. Note that the current scene is not cleared before. -bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer) +bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer, ISceneNode* node) { if (!file) { @@ -2126,7 +2126,7 @@ bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* use while(reader->read()) { - readSceneNode(reader, 0, userDataSerializer); + readSceneNode(reader, node, userDataSerializer); } // restore old collada parameters @@ -2148,8 +2148,16 @@ void CSceneManager::readSceneNode(io::IXMLReader* reader, ISceneNode* parent, IS scene::ISceneNode* node = 0; - if (!parent && IRR_XML_FORMAT_SCENE==reader->getNodeName()) - node = this; // root + bool readAttributes=true; + if (IRR_XML_FORMAT_SCENE==reader->getNodeName()) + { + // node==parent on start, which can be scene manager or distinct parent node + if (!parent) + node = this; // root + else + node = parent; + readAttributes = (node==this); + } else if (parent && IRR_XML_FORMAT_NODE==reader->getNodeName()) { // find node type and create it @@ -2159,7 +2167,10 @@ void CSceneManager::readSceneNode(io::IXMLReader* reader, ISceneNode* parent, IS node = SceneNodeFactoryList[i]->addSceneNode(attrName.c_str(), parent); if (!node) + { os::Printer::log("Could not create scene node of unknown type", attrName.c_str()); + node=addEmptySceneNode(parent); + } } // read attributes @@ -2177,7 +2188,7 @@ void CSceneManager::readSceneNode(io::IXMLReader* reader, ISceneNode* parent, IS } break; case io::EXN_ELEMENT: - if (core::stringw(L"attributes")==reader->getNodeName()) + if ((core::stringw(L"attributes")==reader->getNodeName()) && readAttributes) { // read attributes io::IAttributes* attr = FileSystem->createEmptyAttributes(Driver); @@ -2189,21 +2200,26 @@ void CSceneManager::readSceneNode(io::IXMLReader* reader, ISceneNode* parent, IS attr->drop(); } else - if (core::stringw(L"materials")==reader->getNodeName()) + if ((core::stringw(L"materials")==reader->getNodeName()) && readAttributes) readMaterials(reader, node); else - if (core::stringw(L"animators")==reader->getNodeName()) + if ((core::stringw(L"animators")==reader->getNodeName()) && readAttributes) readAnimators(reader, node); else - if (core::stringw(L"userData")==reader->getNodeName()) + if ((core::stringw(L"userData")==reader->getNodeName()) && readAttributes) readUserData(reader, node, userDataSerializer); else - if ((IRR_XML_FORMAT_NODE==reader->getNodeName()) || - (IRR_XML_FORMAT_SCENE==reader->getNodeName())) + if (IRR_XML_FORMAT_NODE==reader->getNodeName()) { readSceneNode(reader, node, userDataSerializer); } else + if (IRR_XML_FORMAT_SCENE==reader->getNodeName()) + { + // pass on parent value + readSceneNode(reader, parent, userDataSerializer); + } + else { os::Printer::log("Found unknown element in irrlicht scene file", core::stringc(reader->getNodeName()).c_str()); @@ -2341,17 +2357,20 @@ void CSceneManager::readUserData(io::IXMLReader* reader, ISceneNode* node, IScen //! writes a scene node -void CSceneManager::writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer) +void CSceneManager::writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer, + const c8* currentPath, bool init) { if (!writer || !node || node->isDebugObject()) return; const wchar_t* name; + ISceneNode* tmpNode=node; - if (node == this) + if (init) { name = IRR_XML_FORMAT_SCENE.c_str(); writer->writeElement(name, false); + node=this; } else { @@ -2360,13 +2379,18 @@ void CSceneManager::writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISc core::stringw(getSceneNodeTypeName(node->getType())).c_str()); } - writer->writeLineBreak(); writer->writeLineBreak(); // write properties io::IAttributes* attr = FileSystem->createEmptyAttributes(Driver); - node->serializeAttributes(attr); + io::SAttributeReadWriteOptions options; + if (currentPath) + { + options.Filename=currentPath; + options.Flags|=io::EARWF_USE_RELATIVE_PATHS; + } + node->serializeAttributes(attr, &options); if (attr->getAttributeCount() != 0) { @@ -2440,12 +2464,22 @@ void CSceneManager::writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISc userData->drop(); } } + // reset to actual root node + if (init) + node=tmpNode; - // write children - - ISceneNodeList::ConstIterator it = node->getChildren().begin(); - for (; it != node->getChildren().end(); ++it) - writeSceneNode(writer, (*it), userDataSerializer); + // write children once root node is written + // if parent is not scene manager, we need to write out node first + if (init && (node != this)) + { + writeSceneNode(writer, node, userDataSerializer, currentPath); + } + else + { + ISceneNodeList::ConstIterator it = node->getChildren().begin(); + for (; it != node->getChildren().end(); ++it) + writeSceneNode(writer, (*it), userDataSerializer, currentPath); + } attr->drop(); diff --git a/source/Irrlicht/CSceneManager.h b/source/Irrlicht/CSceneManager.h index cd85d269..3fb8833c 100644 --- a/source/Irrlicht/CSceneManager.h +++ b/source/Irrlicht/CSceneManager.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -216,8 +216,9 @@ namespace scene //! Adds a terrain mesh to the mesh pool. virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname, video::IImage* texture, video::IImage* heightmap, - const core::dimension2d& stretchSize, - f32 maxHeight, const core::dimension2d& defaultVertexBlockSize); + const core::dimension2d& stretchSize = core::dimension2d(10.0f,10.0f), + f32 maxHeight=200.0f, + const core::dimension2d& defaultVertexBlockSize = core::dimension2d(64,64)); //! Add a arrow mesh to the mesh pool virtual IAnimatedMesh* addArrowMesh(const io::path& name, @@ -456,17 +457,17 @@ namespace scene //! Saves the current scene into a file. //! \param filename: Name of the file . - virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0); + virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); //! Saves the current scene into a file. - virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0); + virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); //! Loads a scene. Note that the current scene is not cleared before. //! \param filename: Name of the file . - virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0); + virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); //! Loads a scene. Note that the current scene is not cleared before. - virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0); + virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0); //! Writes attributes of the scene node. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; @@ -501,7 +502,7 @@ namespace scene void clearDeletionList(); //! writes a scene node - void writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer); + void writeSceneNode(io::IXMLWriter* writer, ISceneNode* node, ISceneUserDataSerializer* userDataSerializer, const c8* currentPath=0, bool init=false); //! reads a scene node void readSceneNode(io::IXMLReader* reader, ISceneNode* parent, ISceneUserDataSerializer* userDataSerializer); diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp index c35aa6c6..f41d0225 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h index ca64c75b..781fdb57 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h +++ b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp index d00c4282..60d1ad89 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h index e91c5fdf..d46bbf89 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h +++ b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp b/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp index d1948385..42924b22 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -23,7 +23,7 @@ CSceneNodeAnimatorCollisionResponse::CSceneNodeAnimatorCollisionResponse( f32 slidingSpeed) : Radius(ellipsoidRadius), Gravity(gravityPerSecond), Translation(ellipsoidTranslation), World(world), Object(object), SceneManager(scenemanager), LastTime(0), - SlidingSpeed(slidingSpeed), CollisionCallback(0), + SlidingSpeed(slidingSpeed), CollisionNode(0), CollisionCallback(0), Falling(false), IsCamera(false), AnimateCameraTarget(true), CollisionOccurred(false), FirstUpdate(true) { diff --git a/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h b/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h index f8d8e8ec..19703af7 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h +++ b/source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -110,7 +110,7 @@ namespace scene virtual const core::vector3df & getCollisionResultPosition(void) const { return CollisionResultPosition; } - virtual const ISceneNode* getCollisionNode(void) const { return CollisionNode; } + virtual ISceneNode* getCollisionNode(void) const { return CollisionNode; } //! Sets a callback interface which will be called if a collision occurs. @@ -140,7 +140,7 @@ namespace scene core::vector3df CollisionPoint; core::triangle3df CollisionTriangle; core::vector3df CollisionResultPosition; - const ISceneNode * CollisionNode; + ISceneNode * CollisionNode; ICollisionCallback* CollisionCallback; bool Falling; diff --git a/source/Irrlicht/CSceneNodeAnimatorDelete.cpp b/source/Irrlicht/CSceneNodeAnimatorDelete.cpp index 2925ab9b..012b04c0 100644 --- a/source/Irrlicht/CSceneNodeAnimatorDelete.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorDelete.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorDelete.h b/source/Irrlicht/CSceneNodeAnimatorDelete.h index 42332bcd..03cb8d43 100644 --- a/source/Irrlicht/CSceneNodeAnimatorDelete.h +++ b/source/Irrlicht/CSceneNodeAnimatorDelete.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp index 6cebaa06..994b8d80 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h index 3b6826da..c66b91e5 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h +++ b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp b/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp index 79b74344..1b1d23dc 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h b/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h index 673b8f85..5e09a75e 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h +++ b/source/Irrlicht/CSceneNodeAnimatorFlyStraight.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp b/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp index 59ad26b0..f6ec9c75 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h b/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h index a2de040f..1a50de97 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h +++ b/source/Irrlicht/CSceneNodeAnimatorFollowSpline.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorRotation.cpp b/source/Irrlicht/CSceneNodeAnimatorRotation.cpp index 3f5592b1..c6eaf5b4 100644 --- a/source/Irrlicht/CSceneNodeAnimatorRotation.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorRotation.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorRotation.h b/source/Irrlicht/CSceneNodeAnimatorRotation.h index ced74659..be98f1cf 100644 --- a/source/Irrlicht/CSceneNodeAnimatorRotation.h +++ b/source/Irrlicht/CSceneNodeAnimatorRotation.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorTexture.cpp b/source/Irrlicht/CSceneNodeAnimatorTexture.cpp index 9901afa6..d09df204 100644 --- a/source/Irrlicht/CSceneNodeAnimatorTexture.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorTexture.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSceneNodeAnimatorTexture.h b/source/Irrlicht/CSceneNodeAnimatorTexture.h index 04e9fec5..b1a51886 100644 --- a/source/Irrlicht/CSceneNodeAnimatorTexture.h +++ b/source/Irrlicht/CSceneNodeAnimatorTexture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CShadowVolumeSceneNode.cpp b/source/Irrlicht/CShadowVolumeSceneNode.cpp index d1cda6c1..726ae739 100644 --- a/source/Irrlicht/CShadowVolumeSceneNode.cpp +++ b/source/Irrlicht/CShadowVolumeSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CShadowVolumeSceneNode.h b/source/Irrlicht/CShadowVolumeSceneNode.h index eeb26a96..e3b8853a 100644 --- a/source/Irrlicht/CShadowVolumeSceneNode.h +++ b/source/Irrlicht/CShadowVolumeSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSkinnedMesh.cpp b/source/Irrlicht/CSkinnedMesh.cpp index b5032797..a100e371 100644 --- a/source/Irrlicht/CSkinnedMesh.cpp +++ b/source/Irrlicht/CSkinnedMesh.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -18,11 +18,10 @@ namespace scene //! constructor CSkinnedMesh::CSkinnedMesh() -: SkinningBuffers(0), AnimationFrames(0.f), - LastAnimatedFrame(0.f), LastSkinnedFrame(0.f), - InterpolationMode(EIM_LINEAR), +: SkinningBuffers(0), AnimationFrames(0.f), FramesPerSecond(25.f), + LastAnimatedFrame(0.f), InterpolationMode(EIM_LINEAR), HasAnimation(false), PreparedForSkinning(false), - BoneControlUsed(false), AnimateNormals(true), HardwareSkinning(false) + AnimateNormals(true), HardwareSkinning(false) { #ifdef _DEBUG setDebugName("CSkinnedMesh"); @@ -54,6 +53,23 @@ u32 CSkinnedMesh::getFrameCount() const } +//! Gets the default animation speed of the animated mesh. +/** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ +f32 CSkinnedMesh::getAnimationSpeed() const +{ + return FramesPerSecond; +} + + +//! Gets the frame count of the animated mesh. +/** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. +The actual speed is set in the scene node the mesh is instantiated in.*/ +void CSkinnedMesh::setAnimationSpeed(f32 fps) +{ + FramesPerSecond=fps; +} + + //! returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. Note, that some Meshes will ignore the detail level. IMesh* CSkinnedMesh::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) { @@ -125,14 +141,14 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend) //---------------- // Temp! - buildAll_LocalAnimatedMatrices(); + buildAllLocalAnimatedMatrices(); //----------------- updateBoundingBox(); } -void CSkinnedMesh::buildAll_LocalAnimatedMatrices() +void CSkinnedMesh::buildAllLocalAnimatedMatrices() { for (u32 i=0; iChildren.size(); ++j) - buildAll_GlobalAnimatedMatrices(joint->Children[j], joint); + buildAllGlobalAnimatedMatrices(joint->Children[j], joint); } @@ -426,12 +442,12 @@ void CSkinnedMesh::getFrameData(f32 frame, SJoint *joint, //! Preforms a software skin on this mesh based of joint positions void CSkinnedMesh::skinMesh() { - if ( !HasAnimation) + if (!HasAnimation) return; //---------------- // This is marked as "Temp!". A shiny dubloon to whomever can tell me why. - buildAll_GlobalAnimatedMatrices(); + buildAllGlobalAnimatedMatrices(); //----------------- if (!HardwareSkinning) @@ -456,7 +472,7 @@ void CSkinnedMesh::skinMesh() //skin starting with the root joints for (i=0; isize(); ++i) (*SkinningBuffers)[i]->setDirty(EBT_VERTEX); @@ -465,7 +481,7 @@ void CSkinnedMesh::skinMesh() } -void CSkinnedMesh::SkinJoint(SJoint *joint, SJoint *parentJoint) +void CSkinnedMesh::skinJoint(SJoint *joint, SJoint *parentJoint) { if (joint->Weights.size()) { @@ -515,7 +531,7 @@ void CSkinnedMesh::SkinJoint(SJoint *joint, SJoint *parentJoint) //Skin all children for (u32 j=0; jChildren.size(); ++j) - SkinJoint(joint->Children[j], joint); + skinJoint(joint->Children[j], joint); } @@ -694,7 +710,6 @@ bool CSkinnedMesh::setHardwareSkinning(bool on) { if (HardwareSkinning!=on) { - if (on) { @@ -719,7 +734,7 @@ bool CSkinnedMesh::setHardwareSkinning(bool on) } -void CSkinnedMesh::CalculateGlobalMatrices(SJoint *joint,SJoint *parentJoint) +void CSkinnedMesh::calculateGlobalMatrices(SJoint *joint,SJoint *parentJoint) { if (!joint && parentJoint) // bit of protection from endless loops return; @@ -728,7 +743,7 @@ void CSkinnedMesh::CalculateGlobalMatrices(SJoint *joint,SJoint *parentJoint) if (!joint) { for (u32 i=0; iChildren.size(); ++j) - CalculateGlobalMatrices(joint->Children[j],joint); + calculateGlobalMatrices(joint->Children[j],joint); } @@ -864,8 +879,8 @@ void CSkinnedMesh::finalize() { u32 i; + // Make sure we recalc the next frame LastAnimatedFrame=-1; - LastSkinnedFrame=-1; //calculate bounding box for (i=0; i &JointChildSceneNodes) +void CSkinnedMesh::recoverJointsFromMesh(core::array &jointChildSceneNodes) { - for (u32 i=0;isetPosition( joint->LocalAnimatedMatrix.getTranslation() ); - node->setRotation( joint->LocalAnimatedMatrix.getRotationDegrees() ); - node->setScale( joint->LocalAnimatedMatrix.getScale() ); + node->setPosition(joint->LocalAnimatedMatrix.getTranslation()); + node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees()); + node->setScale(joint->LocalAnimatedMatrix.getScale()); node->positionHint=joint->positionHint; node->scaleHint=joint->scaleHint; @@ -1266,11 +1281,11 @@ void CSkinnedMesh::recoverJointsFromMesh(core::array &JointChil } -void CSkinnedMesh::transferJointsToMesh(const core::array &JointChildSceneNodes) +void CSkinnedMesh::transferJointsToMesh(const core::array &jointChildSceneNodes) { for (u32 i=0; iLocalAnimatedMatrix.setRotationDegrees(node->getRotation()); @@ -1283,17 +1298,16 @@ void CSkinnedMesh::transferJointsToMesh(const core::array &Join joint->GlobalSkinningSpace=(node->getSkinningSpace()==EBSS_GLOBAL); } - //Remove cache, temp... + // Make sure we recalc the next frame LastAnimatedFrame=-1; - LastSkinnedFrame=-1; } -void CSkinnedMesh::transferOnlyJointsHintsToMesh(const core::array &JointChildSceneNodes) +void CSkinnedMesh::transferOnlyJointsHintsToMesh(const core::array &jointChildSceneNodes) { - for (u32 i=0;ipositionHint=node->positionHint; @@ -1303,32 +1317,28 @@ void CSkinnedMesh::transferOnlyJointsHintsToMesh(const core::array &JointChildSceneNodes, - IAnimatedMeshSceneNode* AnimatedMeshSceneNode, - ISceneManager* SceneManager) +void CSkinnedMesh::addJoints(core::array &jointChildSceneNodes, + IAnimatedMeshSceneNode* node, ISceneManager* smgr) { - u32 i; - //Create new joints - for (i=0;iName.c_str())); + jointChildSceneNodes.push_back(new CBoneSceneNode(0, smgr, 0, i, AllJoints[i]->Name.c_str())); } //Match up parents - for (i=0;iChildren.size();++n) + for (u32 n=0; nChildren.size(); ++n) { if (parentTest->Children[n]==joint) { @@ -1339,12 +1349,13 @@ void CSkinnedMesh::createJoints(core::array &JointChildSceneNod } } + IBoneSceneNode* bone=jointChildSceneNodes[i]; if (parentID!=-1) - node->setParent( JointChildSceneNodes[parentID] ); + bone->setParent(jointChildSceneNodes[parentID]); else - node->setParent( AnimatedMeshSceneNode ); + bone->setParent(node); - node->drop(); + bone->drop(); } } diff --git a/source/Irrlicht/CSkinnedMesh.h b/source/Irrlicht/CSkinnedMesh.h index 4db1d35b..3612ccd2 100644 --- a/source/Irrlicht/CSkinnedMesh.h +++ b/source/Irrlicht/CSkinnedMesh.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -35,6 +35,15 @@ namespace scene //! returns the amount of frames. If the amount is 1, it is a static (=non animated) mesh. virtual u32 getFrameCount() const; + //! Gets the default animation speed of the animated mesh. + /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ + virtual f32 getAnimationSpeed() const; + + //! Gets the frame count of the animated mesh. + /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. + The actual speed is set in the scene node the mesh is instantiated in.*/ + virtual void setAnimationSpeed(f32 fps); + //! returns the animated mesh based on a detail level (which is ignored) virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1); @@ -95,20 +104,6 @@ namespace scene //! Sets Interpolation Mode virtual void setInterpolationMode(E_INTERPOLATION_MODE mode); - //! Recovers the joints from the mesh - virtual void recoverJointsFromMesh(core::array &JointChildSceneNodes); - - //! Tranfers the joint data to the mesh - virtual void transferJointsToMesh(const core::array &JointChildSceneNodes); - - //! Tranfers the joint hints to the mesh - virtual void transferOnlyJointsHintsToMesh(const core::array &JointChildSceneNodes); - - //! Creates an array of joints from this mesh - virtual void createJoints(core::array &JointChildSceneNodes, - IAnimatedMeshSceneNode* AnimatedMeshSceneNode, - ISceneManager* SceneManager); - //! Convertes the mesh to contain tangent information virtual void convertMeshToTangents(); @@ -119,8 +114,7 @@ namespace scene virtual bool setHardwareSkinning(bool on); //Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_ - - //these functions will use the needed arrays, set vaules, etc to help the loaders + //these functions will use the needed arrays, set values, etc to help the loaders //! exposed for loaders to add mesh buffers virtual core::array &getMeshBuffers(); @@ -152,23 +146,37 @@ namespace scene virtual void updateBoundingBox(void); + //! Recovers the joints from the mesh + void recoverJointsFromMesh(core::array &jointChildSceneNodes); + + //! Tranfers the joint data to the mesh + void transferJointsToMesh(const core::array &jointChildSceneNodes); + + //! Tranfers the joint hints to the mesh + void transferOnlyJointsHintsToMesh(const core::array &jointChildSceneNodes); + + //! Creates an array of joints from this mesh as children of node + void addJoints(core::array &jointChildSceneNodes, + IAnimatedMeshSceneNode* node, + ISceneManager* smgr); + private: void checkForAnimation(); void normalizeWeights(); - void buildAll_LocalAnimatedMatrices(); //public? + void buildAllLocalAnimatedMatrices(); - void buildAll_GlobalAnimatedMatrices(SJoint *Joint=0, SJoint *ParentJoint=0); + void buildAllGlobalAnimatedMatrices(SJoint *Joint=0, SJoint *ParentJoint=0); void getFrameData(f32 frame, SJoint *Node, core::vector3df &position, s32 &positionHint, core::vector3df &scale, s32 &scaleHint, core::quaternion &rotation, s32 &rotationHint); - void CalculateGlobalMatrices(SJoint *Joint,SJoint *ParentJoint); + void calculateGlobalMatrices(SJoint *Joint,SJoint *ParentJoint); - void SkinJoint(SJoint *Joint, SJoint *ParentJoint); + void skinJoint(SJoint *Joint, SJoint *ParentJoint); void calculateTangents(core::vector3df& normal, core::vector3df& tangent, core::vector3df& binormal, @@ -182,20 +190,19 @@ private: core::array AllJoints; core::array RootJoints; - core::aabbox3d BoundingBox; - core::array< core::array > Vertices_Moved; + core::aabbox3d BoundingBox; + f32 AnimationFrames; + f32 FramesPerSecond; f32 LastAnimatedFrame; - f32 LastSkinnedFrame; - E_INTERPOLATION_MODE InterpolationMode; + E_INTERPOLATION_MODE InterpolationMode:8; bool HasAnimation; bool PreparedForSkinning; - bool BoneControlUsed; bool AnimateNormals; bool HardwareSkinning; }; diff --git a/source/Irrlicht/CSkyBoxSceneNode.cpp b/source/Irrlicht/CSkyBoxSceneNode.cpp index 6be40279..047cb82b 100644 --- a/source/Irrlicht/CSkyBoxSceneNode.cpp +++ b/source/Irrlicht/CSkyBoxSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSkyBoxSceneNode.h b/source/Irrlicht/CSkyBoxSceneNode.h index e229cd11..8f9b2794 100644 --- a/source/Irrlicht/CSkyBoxSceneNode.h +++ b/source/Irrlicht/CSkyBoxSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSkyDomeSceneNode.cpp b/source/Irrlicht/CSkyDomeSceneNode.cpp index d5590b41..00e24d0e 100644 --- a/source/Irrlicht/CSkyDomeSceneNode.cpp +++ b/source/Irrlicht/CSkyDomeSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // Code for this scene node has been contributed by Anders la Cour-Harbo (alc) @@ -53,9 +53,6 @@ CSkyDomeSceneNode::CSkyDomeSceneNode(video::ITexture* sky, u32 horiRes, u32 vert Buffer->BoundingBox.MaxEdge.set(0,0,0); Buffer->BoundingBox.MinEdge.set(0,0,0); - Buffer->Vertices.clear(); - Buffer->Indices.clear(); - // regenerate the mesh generateMesh(); } @@ -73,6 +70,9 @@ void CSkyDomeSceneNode::generateMesh() f32 azimuth; u32 k; + Buffer->Vertices.clear(); + Buffer->Indices.clear(); + const f32 azimuth_step = (core::PI * 2.f) / HorizontalResolution; if (SpherePercentage < 0.f) SpherePercentage = -SpherePercentage; diff --git a/source/Irrlicht/CSkyDomeSceneNode.h b/source/Irrlicht/CSkyDomeSceneNode.h index 45556dbf..6f7b89d6 100644 --- a/source/Irrlicht/CSkyDomeSceneNode.h +++ b/source/Irrlicht/CSkyDomeSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // Code for this scene node has been contributed by Anders la Cour-Harbo (alc) diff --git a/source/Irrlicht/CSoftware2MaterialRenderer.h b/source/Irrlicht/CSoftware2MaterialRenderer.h index f9618461..ffffe5e7 100644 --- a/source/Irrlicht/CSoftware2MaterialRenderer.h +++ b/source/Irrlicht/CSoftware2MaterialRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSoftwareDriver.cpp b/source/Irrlicht/CSoftwareDriver.cpp index bc8e270e..25a860dc 100644 --- a/source/Irrlicht/CSoftwareDriver.cpp +++ b/source/Irrlicht/CSoftwareDriver.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -38,6 +38,11 @@ CSoftwareDriver::CSoftwareDriver(const core::dimension2d& windowSize, bool ZBuffer = video::createZBuffer(BackBuffer->getDimension()); } + DriverAttributes->setAttribute("MaxTextures", 1); + DriverAttributes->setAttribute("MaxIndices", 1<<16); + DriverAttributes->setAttribute("MaxTextureSize", 1024); + DriverAttributes->setAttribute("Version", 1); + // create triangle renderers TriangleRenderers[ETR_FLAT] = createTriangleRendererFlat(ZBuffer); diff --git a/source/Irrlicht/CSoftwareDriver.h b/source/Irrlicht/CSoftwareDriver.h index 2a55af2a..12d98f12 100644 --- a/source/Irrlicht/CSoftwareDriver.h +++ b/source/Irrlicht/CSoftwareDriver.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSoftwareDriver2.cpp b/source/Irrlicht/CSoftwareDriver2.cpp index ce52b950..7139d2b6 100644 --- a/source/Irrlicht/CSoftwareDriver2.cpp +++ b/source/Irrlicht/CSoftwareDriver2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -204,7 +204,6 @@ vec3 fnormal(void) } - struct program1 { vec4 Ambient; @@ -356,6 +355,12 @@ CBurningVideoDriver::CBurningVideoDriver(const irr::SIrrlichtCreationParameters& StencilBuffer = video::createStencilBuffer(BackBuffer->getDimension()); } + DriverAttributes->setAttribute("MaxTextures", 2); + DriverAttributes->setAttribute("MaxIndices", 1<<16); + DriverAttributes->setAttribute("MaxTextureSize", 1024); + DriverAttributes->setAttribute("MaxTextureLODBias", 16.f); + DriverAttributes->setAttribute("Version", 45); + // create triangle renderers irr::memset32 ( BurningShader, 0, sizeof ( BurningShader ) ); @@ -776,7 +781,6 @@ void CBurningVideoDriver::setViewPort(const core::rect& area) Transformation [ ETS_CLIPSCALE ].buildNDCToDCMatrix ( ViewPort, 1 ); - if (CurrentShader) CurrentShader->setRenderTarget(RenderTargetSurface, ViewPort); } @@ -2218,12 +2222,27 @@ void CBurningVideoDriver::draw2DImage(const video::ITexture* texture, const core return; } +#if 0 + // 2d methods don't use viewPort + core::position2di dest = destPos; + core::recti clip=ViewPort; + if (ViewPort.getSize().Width != ScreenSize.Width) + { + dest.X=ViewPort.UpperLeftCorner.X+core::round32(destPos.X*ViewPort.getWidth()/(f32)ScreenSize.Width); + dest.Y=ViewPort.UpperLeftCorner.Y+core::round32(destPos.Y*ViewPort.getHeight()/(f32)ScreenSize.Height); + if (clipRect) + { + clip.constrainTo(*clipRect); + } + clipRect = &clip; + } +#endif if (useAlphaChannelOfTexture) ((CSoftwareTexture2*)texture)->getImage()->copyToWithAlpha( - BackBuffer, destPos, sourceRect, color, clipRect); + RenderTargetSurface, destPos, sourceRect, color, clipRect); else ((CSoftwareTexture2*)texture)->getImage()->copyTo( - BackBuffer, destPos, sourceRect, clipRect); + RenderTargetSurface, destPos, sourceRect, clipRect); } } @@ -2493,7 +2512,7 @@ const wchar_t* CBurningVideoDriver::getName() const //! Returns the graphics card vendor name. core::stringc CBurningVideoDriver::getVendorInfo() { - return "Burning's Video: Ing. Thomas Alten (c) 2006-2010"; + return "Burning's Video: Ing. Thomas Alten (c) 2006-2011"; } @@ -2642,16 +2661,19 @@ void CBurningVideoDriver::drawStencilShadowVolume(const core::vector3df* triangl void CBurningVideoDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) { + if (!StencilBuffer) + return; // draw a shadow rectangle covering the entire screen using stencil buffer const u32 h = RenderTargetSurface->getDimension().Height; const u32 w = RenderTargetSurface->getDimension().Width; tVideoSample *dst; u32 *stencil; + u32* const stencilBase=(u32*) StencilBuffer->lock(); for ( u32 y = 0; y < h; ++y ) { dst = (tVideoSample*)RenderTargetSurface->lock() + ( y * w ); - stencil = (u32*) StencilBuffer->lock() + ( y * w ); + stencil = stencilBase + ( y * w ); for ( u32 x = 0; x < w; ++x ) { diff --git a/source/Irrlicht/CSoftwareDriver2.h b/source/Irrlicht/CSoftwareDriver2.h index 91a024d7..d885a41f 100644 --- a/source/Irrlicht/CSoftwareDriver2.h +++ b/source/Irrlicht/CSoftwareDriver2.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSoftwareTexture.cpp b/source/Irrlicht/CSoftwareTexture.cpp index 4273b29a..94d0e955 100644 --- a/source/Irrlicht/CSoftwareTexture.cpp +++ b/source/Irrlicht/CSoftwareTexture.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -58,7 +58,7 @@ CSoftwareTexture::~CSoftwareTexture() //! lock function -void* CSoftwareTexture::lock(bool readOnly, u32 mipmapLevel) +void* CSoftwareTexture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel) { return Image->lock(); } diff --git a/source/Irrlicht/CSoftwareTexture.h b/source/Irrlicht/CSoftwareTexture.h index f5cdd10e..4d45315d 100644 --- a/source/Irrlicht/CSoftwareTexture.h +++ b/source/Irrlicht/CSoftwareTexture.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -28,7 +28,7 @@ public: virtual ~CSoftwareTexture(); //! lock function - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0); + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0); //! unlock function virtual void unlock(); diff --git a/source/Irrlicht/CSoftwareTexture2.cpp b/source/Irrlicht/CSoftwareTexture2.cpp index ab2e381b..5458b0c4 100644 --- a/source/Irrlicht/CSoftwareTexture2.cpp +++ b/source/Irrlicht/CSoftwareTexture2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSoftwareTexture2.h b/source/Irrlicht/CSoftwareTexture2.h index f58a7627..095eef64 100644 --- a/source/Irrlicht/CSoftwareTexture2.h +++ b/source/Irrlicht/CSoftwareTexture2.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -36,7 +36,7 @@ public: virtual ~CSoftwareTexture2(); //! lock function - virtual void* lock(bool readOnly = false, u32 mipmapLevel=0) + virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) { if (Flags & GEN_MIPMAP) MipMapLOD=mipmapLevel; diff --git a/source/Irrlicht/CSphereSceneNode.cpp b/source/Irrlicht/CSphereSceneNode.cpp index eaceffd3..f5302cf0 100644 --- a/source/Irrlicht/CSphereSceneNode.cpp +++ b/source/Irrlicht/CSphereSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CSphereSceneNode.h b/source/Irrlicht/CSphereSceneNode.h index 1583ac31..5913518d 100644 --- a/source/Irrlicht/CSphereSceneNode.h +++ b/source/Irrlicht/CSphereSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRFlat.cpp b/source/Irrlicht/CTRFlat.cpp index f9ac119d..06958a7e 100644 --- a/source/Irrlicht/CTRFlat.cpp +++ b/source/Irrlicht/CTRFlat.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRFlatWire.cpp b/source/Irrlicht/CTRFlatWire.cpp index 71133601..caf47a57 100644 --- a/source/Irrlicht/CTRFlatWire.cpp +++ b/source/Irrlicht/CTRFlatWire.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRGouraud.cpp b/source/Irrlicht/CTRGouraud.cpp index 5ffb7233..8a471340 100644 --- a/source/Irrlicht/CTRGouraud.cpp +++ b/source/Irrlicht/CTRGouraud.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRGouraud2.cpp b/source/Irrlicht/CTRGouraud2.cpp index 383a4b67..cf5b2401 100644 --- a/source/Irrlicht/CTRGouraud2.cpp +++ b/source/Irrlicht/CTRGouraud2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRGouraudAlpha2.cpp b/source/Irrlicht/CTRGouraudAlpha2.cpp index c0d197fa..53f7aafc 100644 --- a/source/Irrlicht/CTRGouraudAlpha2.cpp +++ b/source/Irrlicht/CTRGouraudAlpha2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp index 45e701ce..324ba589 100644 --- a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp +++ b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRGouraudWire.cpp b/source/Irrlicht/CTRGouraudWire.cpp index c301a4cb..b5a56047 100644 --- a/source/Irrlicht/CTRGouraudWire.cpp +++ b/source/Irrlicht/CTRGouraudWire.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRNormalMap.cpp b/source/Irrlicht/CTRNormalMap.cpp index 5f2f8b93..e3441b50 100644 --- a/source/Irrlicht/CTRNormalMap.cpp +++ b/source/Irrlicht/CTRNormalMap.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRStencilShadow.cpp b/source/Irrlicht/CTRStencilShadow.cpp index 069e35c9..64a046e5 100644 --- a/source/Irrlicht/CTRStencilShadow.cpp +++ b/source/Irrlicht/CTRStencilShadow.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -110,14 +110,12 @@ CTRStencilShadow::CTRStencilShadow(CBurningVideoDriver* driver) } - /*! */ void CTRStencilShadow::setParam ( u32 index, f32 value) { u32 val = (u32) value; - // glStencilOp (fail,zfail,zpass if ( index == 1 && val == 1 ) { @@ -128,14 +126,14 @@ void CTRStencilShadow::setParam ( u32 index, f32 value) { fragmentShader = &CTRStencilShadow::fragment_zfail_decr; } - - } /*! */ void CTRStencilShadow::fragment_zfail_decr () { + if (!Stencil) + return; //tVideoSample *dst; #ifdef USE_ZBUFFER @@ -150,7 +148,6 @@ void CTRStencilShadow::fragment_zfail_decr () s32 xEnd; s32 dx; - #ifdef SUBTEXEL f32 subPixel; #endif @@ -285,13 +282,14 @@ void CTRStencilShadow::fragment_zfail_decr () line.l[0][0] += slopeL[0]; #endif } - } /*! */ -void CTRStencilShadow::fragment_zfail_incr () +void CTRStencilShadow::fragment_zfail_incr() { + if (!Stencil) + return; //tVideoSample *dst; #ifdef USE_ZBUFFER @@ -396,12 +394,10 @@ void CTRStencilShadow::fragment_zfail_incr () stencil = (u32*) Stencil->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart; #endif - #ifdef INVERSE_W f32 inversew; #endif - #ifdef IPOL_C0 tFixPoint r3, g3, b3; #endif @@ -441,7 +437,6 @@ void CTRStencilShadow::fragment_zfail_incr () line.l[0][0] += slopeL[0]; #endif } - } void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) @@ -520,7 +515,6 @@ void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,cons f32 subPixel; #endif - // rasterize upper sub-triangle //if ( (f32) 0.0 != scan.invDeltaY[1] ) if ( F32_GREATER_0 ( scan.invDeltaY[1] ) ) diff --git a/source/Irrlicht/CTRTextureBlend.cpp b/source/Irrlicht/CTRTextureBlend.cpp index ea332e25..c829bbd7 100644 --- a/source/Irrlicht/CTRTextureBlend.cpp +++ b/source/Irrlicht/CTRTextureBlend.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureDetailMap2.cpp b/source/Irrlicht/CTRTextureDetailMap2.cpp index e131e061..54a6be28 100644 --- a/source/Irrlicht/CTRTextureDetailMap2.cpp +++ b/source/Irrlicht/CTRTextureDetailMap2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureFlat.cpp b/source/Irrlicht/CTRTextureFlat.cpp index 67c3b7a7..273c8809 100644 --- a/source/Irrlicht/CTRTextureFlat.cpp +++ b/source/Irrlicht/CTRTextureFlat.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureFlatWire.cpp b/source/Irrlicht/CTRTextureFlatWire.cpp index d1d4694c..103f3256 100644 --- a/source/Irrlicht/CTRTextureFlatWire.cpp +++ b/source/Irrlicht/CTRTextureFlatWire.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraud.cpp b/source/Irrlicht/CTRTextureGouraud.cpp index bd8225d0..8c884047 100644 --- a/source/Irrlicht/CTRTextureGouraud.cpp +++ b/source/Irrlicht/CTRTextureGouraud.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraud.h b/source/Irrlicht/CTRTextureGouraud.h index 443f16c6..5578c014 100644 --- a/source/Irrlicht/CTRTextureGouraud.h +++ b/source/Irrlicht/CTRTextureGouraud.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraud2.cpp b/source/Irrlicht/CTRTextureGouraud2.cpp index fb5beb0b..84067830 100644 --- a/source/Irrlicht/CTRTextureGouraud2.cpp +++ b/source/Irrlicht/CTRTextureGouraud2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudAdd.cpp b/source/Irrlicht/CTRTextureGouraudAdd.cpp index 6b373afa..6ba7de19 100644 --- a/source/Irrlicht/CTRTextureGouraudAdd.cpp +++ b/source/Irrlicht/CTRTextureGouraudAdd.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudAdd2.cpp b/source/Irrlicht/CTRTextureGouraudAdd2.cpp index 01779a76..9a28a61a 100644 --- a/source/Irrlicht/CTRTextureGouraudAdd2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAdd2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp index d3f0aa28..9e326743 100644 --- a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudAlpha.cpp b/source/Irrlicht/CTRTextureGouraudAlpha.cpp index 9bc3a6d5..74e9dd7a 100644 --- a/source/Irrlicht/CTRTextureGouraudAlpha.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlpha.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp index 47d79345..b81cb19c 100644 --- a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudNoZ.cpp b/source/Irrlicht/CTRTextureGouraudNoZ.cpp index 9f105ce2..2e0d0569 100644 --- a/source/Irrlicht/CTRTextureGouraudNoZ.cpp +++ b/source/Irrlicht/CTRTextureGouraudNoZ.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp index 10a22b8e..359cdeea 100644 --- a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp index b18072c8..c258deba 100644 --- a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp +++ b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureGouraudWire.cpp b/source/Irrlicht/CTRTextureGouraudWire.cpp index 0cbf20ed..aace608b 100644 --- a/source/Irrlicht/CTRTextureGouraudWire.cpp +++ b/source/Irrlicht/CTRTextureGouraudWire.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureLightMap2_Add.cpp b/source/Irrlicht/CTRTextureLightMap2_Add.cpp index 3d1e6898..2dc28508 100644 --- a/source/Irrlicht/CTRTextureLightMap2_Add.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_Add.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureLightMap2_M1.cpp b/source/Irrlicht/CTRTextureLightMap2_M1.cpp index 82529a18..72536ebc 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M1.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M1.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureLightMap2_M2.cpp b/source/Irrlicht/CTRTextureLightMap2_M2.cpp index 06893300..f57f0d8f 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M2.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureLightMap2_M4.cpp b/source/Irrlicht/CTRTextureLightMap2_M4.cpp index 4d0e10d3..a3bcbabc 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M4.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp index 357a528d..c856907d 100644 --- a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTRTextureWire2.cpp b/source/Irrlicht/CTRTextureWire2.cpp index 6176a14e..4ae9c15d 100644 --- a/source/Irrlicht/CTRTextureWire2.cpp +++ b/source/Irrlicht/CTRTextureWire2.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTarReader.cpp b/source/Irrlicht/CTarReader.cpp index e9b0310d..465b574e 100644 --- a/source/Irrlicht/CTarReader.cpp +++ b/source/Irrlicht/CTarReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -110,7 +110,7 @@ bool CArchiveLoaderTAR::isALoadableFileFormat(io::IReadFile* file) const checksum2 += c8(*p); } - if (!strcmp(fHead.Magic, "star")) + if (!strncmp(fHead.Magic, "ustar", 5)) { for (u8* p = (u8*)(&fHead.Magic[0]); p < (u8*)(&fHead) + sizeof(fHead); ++p) { @@ -177,7 +177,7 @@ u32 CTarReader::populateFileList() // USTAR archives have a filename prefix // may not be null terminated, copy carefully! - if (!strcmp(fHead.Magic, "ustar")) + if (!strncmp(fHead.Magic, "ustar", 5)) { c8* np = fHead.FileNamePrefix; while(*np && (np - fHead.FileNamePrefix) < 155) diff --git a/source/Irrlicht/CTarReader.h b/source/Irrlicht/CTarReader.h index 06937d18..12dc371f 100644 --- a/source/Irrlicht/CTarReader.h +++ b/source/Irrlicht/CTarReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Gaz Davidson +// Copyright (C) 2009-2011 Gaz Davidson // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -35,12 +35,13 @@ namespace io { ETLI_REGULAR_FILE_OLD = 0 , ETLI_REGULAR_FILE = '0', - ETLI_LINK_TO_ARCHIVED_FILE = '1', + ETLI_LINK_TO_ARCHIVED_FILE = '1', // Hard link ETLI_SYMBOLIC_LINK = '2', ETLI_CHAR_SPECIAL_DEVICE = '3', ETLI_BLOCK_SPECIAL_DEVICE = '4', ETLI_DIRECTORY = '5', - ETLI_FIFO_SPECIAL_FILE = '6' + ETLI_FIFO_SPECIAL_FILE = '6', + ETLI_CONTIGUOUS_FILE = '7' }; struct STarHeader diff --git a/source/Irrlicht/CTerrainSceneNode.cpp b/source/Irrlicht/CTerrainSceneNode.cpp index 3109ada4..45f7d664 100644 --- a/source/Irrlicht/CTerrainSceneNode.cpp +++ b/source/Irrlicht/CTerrainSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTerrainSceneNode.h b/source/Irrlicht/CTerrainSceneNode.h index f5843d15..38bf66c4 100644 --- a/source/Irrlicht/CTerrainSceneNode.h +++ b/source/Irrlicht/CTerrainSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTerrainTriangleSelector.cpp b/source/Irrlicht/CTerrainTriangleSelector.cpp index 54a83b63..72ab9951 100644 --- a/source/Irrlicht/CTerrainTriangleSelector.cpp +++ b/source/Irrlicht/CTerrainTriangleSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -186,6 +186,11 @@ s32 CTerrainTriangleSelector::getTriangleCount() const return TrianglePatches.TotalTriangles; } +ISceneNode* CTerrainTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) const +{ + return SceneNode; +} + } // end namespace scene } // end namespace irr diff --git a/source/Irrlicht/CTerrainTriangleSelector.h b/source/Irrlicht/CTerrainTriangleSelector.h index 5840f3f4..03651e06 100644 --- a/source/Irrlicht/CTerrainTriangleSelector.h +++ b/source/Irrlicht/CTerrainTriangleSelector.h @@ -1,10 +1,10 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // The code for the TerrainTriangleSelector is based on the GeoMipMapSelector -// developed by Spintz. He made it available for Irrlicht and allowed it to be -// distributed under this licence. I only modified some parts. A lot of thanks go to him. +// developed by Spintz. He made it available for Irrlicht and allowed it to be +// distributed under this licence. I only modified some parts. A lot of thanks go to him. #ifndef __C_TERRAIN_TRIANGLE_SELECTOR_H__ #define __C_TERRAIN_TRIANGLE_SELECTOR_H__ @@ -21,8 +21,8 @@ class ITerrainSceneNode; //! Triangle Selector for the TerrainSceneNode //! The code for the TerrainTriangleSelector is based on the GeoMipMapSelector -//! developed by Spintz. He made it available for Irrlicht and allowed it to be -//! distributed under this licence. I only modified some parts. A lot of thanks go to him. +//! developed by Spintz. He made it available for Irrlicht and allowed it to be +//! distributed under this licence. I only modified some parts. A lot of thanks go to him. class CTerrainTriangleSelector : public ITriangleSelector { public: @@ -46,16 +46,14 @@ public: //! Gets all triangles which have or may have contact with a 3d line. virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::line3d& line, + s32& outTriangleCount, const core::line3d& line, const core::matrix4* transform=0) const; //! Returns amount of all available triangles in this selector virtual s32 getTriangleCount() const; //! Return the scene node associated with a given triangle. - /** ITerrainSceneNode is an ISceneNode, we just don't know it yet. */ - virtual const ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const - { return (ISceneNode*)SceneNode; } + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const; private: diff --git a/source/Irrlicht/CTextSceneNode.cpp b/source/Irrlicht/CTextSceneNode.cpp index 9b1ef66a..183f6eef 100644 --- a/source/Irrlicht/CTextSceneNode.cpp +++ b/source/Irrlicht/CTextSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTextSceneNode.h b/source/Irrlicht/CTextSceneNode.h index 8588dc78..666bd693 100644 --- a/source/Irrlicht/CTextSceneNode.h +++ b/source/Irrlicht/CTextSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CTimer.h b/source/Irrlicht/CTimer.h index 3e4d4e74..682073b8 100644 --- a/source/Irrlicht/CTimer.h +++ b/source/Irrlicht/CTimer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -15,23 +15,29 @@ namespace irr { public: - CTimer() + CTimer(bool usePerformanceTimer=true) { - os::Timer::initTimer(); + os::Timer::initTimer(usePerformanceTimer); } - //! Returns current real time in milliseconds of the system. + //! Returns current real time in milliseconds of the system. /** This value does not start with 0 when the application starts. - For example in one implementation the value returned could be the + For example in one implementation the value returned could be the amount of milliseconds which have elapsed since the system was started. */ virtual u32 getRealTime() const { return os::Timer::getRealTime(); } - //! Returns current virtual time in milliseconds. + //! Get current time and date in calendar form + virtual RealTimeDate getRealTimeAndDate() const + { + return os::Timer::getRealTimeAndDate(); + } + + //! Returns current virtual time in milliseconds. /** This value starts with 0 and can be manipulated using setTime(), stopTimer(), - startTimer(), etc. This value depends on the set speed of the timer if the timer + startTimer(), etc. This value depends on the set speed of the timer if the timer is stopped, etc. If you need the system time, use getRealTime() */ virtual u32 getTime() const { @@ -44,8 +50,8 @@ namespace irr os::Timer::setTime(time); } - //! Stops the game timer. - /** The timer is reference counted, which means everything which calls + //! Stops the game timer. + /** The timer is reference counted, which means everything which calls stopTimer() will also have to call startTimer(), otherwise the timer may not start/stop corretly again. */ virtual void stop() @@ -54,7 +60,7 @@ namespace irr } //! Starts the game timer. - /** The timer is reference counted, which means everything which calls + /** The timer is reference counted, which means everything which calls stopTimer() will also have to call startTimer(), otherwise the timer may not start/stop corretly again. */ virtual void start() diff --git a/source/Irrlicht/CTriangleBBSelector.cpp b/source/Irrlicht/CTriangleBBSelector.cpp index 034e19d0..f0a6386d 100644 --- a/source/Irrlicht/CTriangleBBSelector.cpp +++ b/source/Irrlicht/CTriangleBBSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -11,7 +11,7 @@ namespace scene { //! constructor -CTriangleBBSelector::CTriangleBBSelector(const ISceneNode* node) +CTriangleBBSelector::CTriangleBBSelector(ISceneNode* node) : CTriangleSelector(node) { #ifdef _DEBUG @@ -25,7 +25,7 @@ CTriangleBBSelector::CTriangleBBSelector(const ISceneNode* node) //! Gets all triangles. void CTriangleBBSelector::getTriangles(core::triangle3df* triangles, - s32 arraySize, s32& outTriangleCount, + s32 arraySize, s32& outTriangleCount, const core::matrix4* transform) const { if (!SceneNode) diff --git a/source/Irrlicht/CTriangleBBSelector.h b/source/Irrlicht/CTriangleBBSelector.h index db85286e..c3541f62 100644 --- a/source/Irrlicht/CTriangleBBSelector.h +++ b/source/Irrlicht/CTriangleBBSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -18,10 +18,10 @@ class CTriangleBBSelector : public CTriangleSelector public: //! Constructs a selector based on a mesh - CTriangleBBSelector(const ISceneNode* node); + CTriangleBBSelector(ISceneNode* node); //! Gets all triangles. - virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, const core::matrix4* transform=0) const; }; diff --git a/source/Irrlicht/CTriangleSelector.cpp b/source/Irrlicht/CTriangleSelector.cpp index b892ca0f..b9f83e5b 100644 --- a/source/Irrlicht/CTriangleSelector.cpp +++ b/source/Irrlicht/CTriangleSelector.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -13,7 +13,7 @@ namespace scene { //! constructor -CTriangleSelector::CTriangleSelector(const ISceneNode* node) +CTriangleSelector::CTriangleSelector(ISceneNode* node) : SceneNode(node), AnimatedNode(0), LastMeshFrame(-1) { #ifdef _DEBUG @@ -23,7 +23,7 @@ CTriangleSelector::CTriangleSelector(const ISceneNode* node) //! constructor -CTriangleSelector::CTriangleSelector(const IMesh* mesh, const ISceneNode* node) +CTriangleSelector::CTriangleSelector(const IMesh* mesh, ISceneNode* node) : SceneNode(node), AnimatedNode(0) { #ifdef _DEBUG @@ -137,7 +137,7 @@ void CTriangleSelector::updateFromMesh(const IMesh* mesh) const //! constructor -CTriangleSelector::CTriangleSelector(const core::aabbox3d& box, const ISceneNode* node) +CTriangleSelector::CTriangleSelector(const core::aabbox3d& box, ISceneNode* node) : SceneNode(node) { #ifdef _DEBUG @@ -172,7 +172,7 @@ void CTriangleSelector::update(void) const //! Gets all triangles. void CTriangleSelector::getTriangles(core::triangle3df* triangles, - s32 arraySize, s32& outTriangleCount, + s32 arraySize, s32& outTriangleCount, const core::matrix4* transform) const { // Update my triangles if necessary @@ -203,8 +203,8 @@ void CTriangleSelector::getTriangles(core::triangle3df* triangles, //! Gets all triangles which lie within a specific bounding box. -void CTriangleSelector::getTriangles(core::triangle3df* triangles, - s32 arraySize, s32& outTriangleCount, +void CTriangleSelector::getTriangles(core::triangle3df* triangles, + s32 arraySize, s32& outTriangleCount, const core::aabbox3d& box, const core::matrix4* transform) const { diff --git a/source/Irrlicht/CTriangleSelector.h b/source/Irrlicht/CTriangleSelector.h index 1f452ca9..4a65c17a 100644 --- a/source/Irrlicht/CTriangleSelector.h +++ b/source/Irrlicht/CTriangleSelector.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -23,51 +23,51 @@ class CTriangleSelector : public ITriangleSelector public: //! Constructs a selector based on a mesh - CTriangleSelector(const ISceneNode* node); + CTriangleSelector(ISceneNode* node); //! Constructs a selector based on a mesh - CTriangleSelector(const IMesh* mesh, const ISceneNode* node); + CTriangleSelector(const IMesh* mesh, ISceneNode* node); //! Constructs a selector based on an animated mesh scene node //!\param node An animated mesh scene node, which must have a valid mesh CTriangleSelector(IAnimatedMeshSceneNode* node); //! Constructs a selector based on a bounding box - CTriangleSelector(const core::aabbox3d& box, const ISceneNode* node); + CTriangleSelector(const core::aabbox3d& box, ISceneNode* node); //! Gets all triangles. - void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, const core::matrix4* transform=0) const; //! Gets all triangles which lie within a specific bounding box. - void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, + void getTriangles(core::triangle3df* triangles, s32 arraySize, s32& outTriangleCount, const core::aabbox3d& box, const core::matrix4* transform=0) const; //! Gets all triangles which have or may have contact with a 3d line. virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::line3d& line, + s32& outTriangleCount, const core::line3d& line, const core::matrix4* transform=0) const; //! Returns amount of all available triangles in this selector virtual s32 getTriangleCount() const; //! Return the scene node associated with a given triangle. - virtual const ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; } + virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; } protected: //! Create from a mesh - virtual void createFromMesh(const IMesh* mesh); + virtual void createFromMesh(const IMesh* mesh); //! Update when the mesh has changed - virtual void updateFromMesh(const IMesh* mesh) const; + virtual void updateFromMesh(const IMesh* mesh) const; //! Update the triangle selector, which will only have an effect if it - //! was built from an animated mesh and that mesh's frame has changed + //! was built from an animated mesh and that mesh's frame has changed //! since the last time it was updated. virtual void update(void) const; - const ISceneNode* SceneNode; - mutable core::array Triangles; + ISceneNode* SceneNode; + mutable core::array Triangles; // (mutable for CTriangleBBSelector) IAnimatedMeshSceneNode* AnimatedNode; mutable s32 LastMeshFrame; diff --git a/source/Irrlicht/CVideoModeList.cpp b/source/Irrlicht/CVideoModeList.cpp index c4ea7785..310f7422 100644 --- a/source/Irrlicht/CVideoModeList.cpp +++ b/source/Irrlicht/CVideoModeList.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CVideoModeList.h b/source/Irrlicht/CVideoModeList.h index 1b462d74..add6c81e 100644 --- a/source/Irrlicht/CVideoModeList.h +++ b/source/Irrlicht/CVideoModeList.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CVolumeLightSceneNode.cpp b/source/Irrlicht/CVolumeLightSceneNode.cpp index f18cfa0e..4d416faa 100644 --- a/source/Irrlicht/CVolumeLightSceneNode.cpp +++ b/source/Irrlicht/CVolumeLightSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2009 Dean Wadsworth +// Copyright (C) 2007-2011 Dean Wadsworth // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CVolumeLightSceneNode.h b/source/Irrlicht/CVolumeLightSceneNode.h index 3bdb08c2..692bedb0 100644 --- a/source/Irrlicht/CVolumeLightSceneNode.h +++ b/source/Irrlicht/CVolumeLightSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // @@ -44,7 +44,7 @@ namespace scene virtual u32 getMaterialCount() const; //! Returns type of the scene node - virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; } + virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; } //! Writes attributes of the scene node. virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; diff --git a/source/Irrlicht/CWADReader.cpp b/source/Irrlicht/CWADReader.cpp index bba7bda4..c7f1fef7 100644 --- a/source/Irrlicht/CWADReader.cpp +++ b/source/Irrlicht/CWADReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Thomas Alten +// Copyright (C) 2002-2011 Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // Code contributed by skreamz diff --git a/source/Irrlicht/CWADReader.h b/source/Irrlicht/CWADReader.h index cbe0f577..d92dc2b7 100644 --- a/source/Irrlicht/CWADReader.h +++ b/source/Irrlicht/CWADReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Thomas Alten +// Copyright (C) 2002-2011 Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CWaterSurfaceSceneNode.cpp b/source/Irrlicht/CWaterSurfaceSceneNode.cpp index 317de214..c20a3fb9 100644 --- a/source/Irrlicht/CWaterSurfaceSceneNode.cpp +++ b/source/Irrlicht/CWaterSurfaceSceneNode.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -29,13 +29,13 @@ CWaterSurfaceSceneNode::CWaterSurfaceSceneNode(f32 waveHeight, f32 waveSpeed, f3 #endif // create copy of the mesh - if (!mesh) - return; - - // Mesh is set in CMeshSceneNode constructor, now it is moved to OriginalMesh - IMesh* clone = SceneManager->getMeshManipulator()->createMeshCopy(mesh); - OriginalMesh = Mesh; - Mesh = clone; + if (mesh) + { + // Mesh is set in CMeshSceneNode constructor, now it is moved to OriginalMesh + IMesh* clone = SceneManager->getMeshManipulator()->createMeshCopy(mesh); + OriginalMesh = Mesh; + Mesh = clone; + } } diff --git a/source/Irrlicht/CWaterSurfaceSceneNode.h b/source/Irrlicht/CWaterSurfaceSceneNode.h index 2b5e2785..82aaed64 100644 --- a/source/Irrlicht/CWaterSurfaceSceneNode.h +++ b/source/Irrlicht/CWaterSurfaceSceneNode.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CWriteFile.cpp b/source/Irrlicht/CWriteFile.cpp index 0a4f12da..ef3665fa 100644 --- a/source/Irrlicht/CWriteFile.cpp +++ b/source/Irrlicht/CWriteFile.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CWriteFile.h b/source/Irrlicht/CWriteFile.h index 36a651e7..d955a993 100644 --- a/source/Irrlicht/CWriteFile.h +++ b/source/Irrlicht/CWriteFile.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CXMLReader.cpp b/source/Irrlicht/CXMLReader.cpp index dac2c7ac..ed0ad54e 100644 --- a/source/Irrlicht/CXMLReader.cpp +++ b/source/Irrlicht/CXMLReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CXMLReader.h b/source/Irrlicht/CXMLReader.h index 62c1b908..56fbd92a 100644 --- a/source/Irrlicht/CXMLReader.h +++ b/source/Irrlicht/CXMLReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CXMLReaderImpl.h b/source/Irrlicht/CXMLReaderImpl.h index 0f6a9985..cd5deae2 100644 --- a/source/Irrlicht/CXMLReaderImpl.h +++ b/source/Irrlicht/CXMLReaderImpl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h @@ -670,9 +670,19 @@ private: TextData = new char_type[sizeWithoutHeader]; - for (int i=0; i(source[i]); - + if ( sizeof(src_char_type) == 1 ) + { + // we have to cast away negative numbers or results might add the sign instead of just doing a copy + for (int i=0; i(static_cast(source[i])); + } + } + else + { + for (int i=0; i(source[i]); + } TextBegin = TextData; TextSize = sizeWithoutHeader; diff --git a/source/Irrlicht/CXMLWriter.cpp b/source/Irrlicht/CXMLWriter.cpp index 43dea14a..f2b1b160 100644 --- a/source/Irrlicht/CXMLWriter.cpp +++ b/source/Irrlicht/CXMLWriter.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CXMLWriter.h b/source/Irrlicht/CXMLWriter.h index 0921d366..8aeb2d49 100644 --- a/source/Irrlicht/CXMLWriter.h +++ b/source/Irrlicht/CXMLWriter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CXMeshFileLoader.cpp b/source/Irrlicht/CXMeshFileLoader.cpp index f87ff00f..95ed89e8 100644 --- a/source/Irrlicht/CXMeshFileLoader.cpp +++ b/source/Irrlicht/CXMeshFileLoader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -273,6 +273,8 @@ bool CXMeshFileLoader::load(io::IReadFile* file) // init with 0 for (i=0;iVertices.size();++i) { + // watch out for vertices which are not part of the mesh + // they will keep the -1 and can lead to out-of-bounds access verticesLinkBuffer[i]=-1; } @@ -305,7 +307,10 @@ bool CXMeshFileLoader::load(io::IReadFile* file) memset(vCountArray, 0, mesh->Buffers.size()*sizeof(u32)); // count vertices in each buffer and reallocate for (i=0; iVertices.size(); ++i) - ++vCountArray[verticesLinkBuffer[i]]; + { + if (verticesLinkBuffer[i] != -1) + ++vCountArray[verticesLinkBuffer[i]]; + } if (mesh->TCoords2.size()) { for (i=0; i!=mesh->Buffers.size(); ++i) @@ -324,13 +329,18 @@ bool CXMeshFileLoader::load(io::IReadFile* file) // actually store vertices for (i=0; iVertices.size(); ++i) { + // if a vertex is missing for some reason, just skip it + if (verticesLinkBuffer[i]==-1) + continue; scene::SSkinMeshBuffer *buffer = mesh->Buffers[ verticesLinkBuffer[i] ]; if (mesh->TCoords2.size()) { verticesLinkIndex[i] = buffer->Vertices_2TCoords.size(); buffer->Vertices_2TCoords.push_back( mesh->Vertices[i] ); - buffer->Vertices_2TCoords.getLast().TCoords2=mesh->TCoords2[i]; + // We have a problem with correct tcoord2 handling here + // crash fixed for now by checking the values + buffer->Vertices_2TCoords.getLast().TCoords2=(iTCoords2.size())?mesh->TCoords2[i]:mesh->Vertices[i].TCoords; } else { @@ -476,7 +486,7 @@ bool CXMeshFileLoader::parseDataObject() // parse specific object #ifdef _XREADER_DEBUG - os::Printer::log("debug DataObject:", objectName.c_str() ); + os::Printer::log("debug DataObject:", objectName.c_str(), ELL_DEBUG); #endif if (objectName == "template") @@ -528,7 +538,7 @@ bool CXMeshFileLoader::parseDataObject() bool CXMeshFileLoader::parseDataObjectTemplate() { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading template"); + os::Printer::log("CXFileReader: Reading template", ELL_DEBUG); #endif // parse a template data object. Currently not stored. @@ -564,7 +574,7 @@ bool CXMeshFileLoader::parseDataObjectTemplate() bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading frame"); + os::Printer::log("CXFileReader: Reading frame", ELL_DEBUG); #endif // A coordinate frame, or "frame of reference." The Frame template @@ -602,7 +612,7 @@ bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) if (!joint) { #ifdef _XREADER_DEBUG - os::Printer::log("creating joint ", name.c_str()); + os::Printer::log("creating joint ", name.c_str(), ELL_DEBUG); #endif joint=AnimatedMesh->addJoint(Parent); joint->Name=name; @@ -611,7 +621,7 @@ bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) else { #ifdef _XREADER_DEBUG - os::Printer::log("using joint ", name.c_str()); + os::Printer::log("using joint ", name.c_str(), ELL_DEBUG); #endif if (Parent) Parent->Children.push_back(joint); @@ -625,7 +635,7 @@ bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) core::stringc objectName = getNextToken(); #ifdef _XREADER_DEBUG - os::Printer::log("debug DataObject in frame:", objectName.c_str() ); + os::Printer::log("debug DataObject in frame:", objectName.c_str(), ELL_DEBUG); #endif if (objectName.size() == 0) @@ -688,7 +698,7 @@ bool CXMeshFileLoader::parseDataObjectFrame(CSkinnedMesh::SJoint *Parent) bool CXMeshFileLoader::parseDataObjectTransformationMatrix(core::matrix4 &mat) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading Transformation Matrix"); + os::Printer::log("CXFileReader: Reading Transformation Matrix", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -724,7 +734,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh) if (!readHeadOfDataObject(&name)) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading mesh"); + os::Printer::log("CXFileReader: Reading mesh", ELL_DEBUG); #endif os::Printer::log("No opening brace in Mesh found in x file", ELL_WARNING); os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); @@ -732,7 +742,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh) } #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading mesh", name.c_str()); + os::Printer::log("CXFileReader: Reading mesh", name.c_str(), ELL_DEBUG); #endif // read vertex count @@ -826,7 +836,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh) } #ifdef _XREADER_DEBUG - os::Printer::log("debug DataObject in mesh:", objectName.c_str() ); + os::Printer::log("debug DataObject in mesh:", objectName.c_str(), ELL_DEBUG); #endif if (objectName == "MeshNormals") @@ -1070,7 +1080,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectSkinWeights(SXMesh &mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading mesh skin weights"); + os::Printer::log("CXFileReader: Reading mesh skin weights", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1106,7 +1116,7 @@ bool CXMeshFileLoader::parseDataObjectSkinWeights(SXMesh &mesh) if (!joint) { #ifdef _XREADER_DEBUG - os::Printer::log("creating joint for skinning ", TransformNodeName.c_str()); + os::Printer::log("creating joint for skinning ", TransformNodeName.c_str(), ELL_DEBUG); #endif n = AnimatedMesh->getAllJoints().size(); joint=AnimatedMesh->addJoint(0); @@ -1170,7 +1180,7 @@ bool CXMeshFileLoader::parseDataObjectSkinWeights(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectSkinMeshHeader(SXMesh& mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading skin mesh header"); + os::Printer::log("CXFileReader: Reading skin mesh header", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1201,7 +1211,7 @@ bool CXMeshFileLoader::parseDataObjectSkinMeshHeader(SXMesh& mesh) bool CXMeshFileLoader::parseDataObjectMeshNormals(SXMesh &mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading mesh normals"); + os::Printer::log("CXFileReader: reading mesh normals", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1292,7 +1302,7 @@ bool CXMeshFileLoader::parseDataObjectMeshNormals(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectMeshTextureCoords(SXMesh &mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading mesh texture coordinates"); + os::Printer::log("CXFileReader: reading mesh texture coordinates", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1326,7 +1336,7 @@ bool CXMeshFileLoader::parseDataObjectMeshTextureCoords(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectMeshVertexColors(SXMesh &mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading mesh vertex colors"); + os::Printer::log("CXFileReader: reading mesh vertex colors", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1371,7 +1381,7 @@ bool CXMeshFileLoader::parseDataObjectMeshVertexColors(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectMeshMaterialList(SXMesh &mesh) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading mesh material list"); + os::Printer::log("CXFileReader: Reading mesh material list", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1467,7 +1477,7 @@ bool CXMeshFileLoader::parseDataObjectMeshMaterialList(SXMesh &mesh) bool CXMeshFileLoader::parseDataObjectMaterial(video::SMaterial& material) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading mesh material"); + os::Printer::log("CXFileReader: Reading mesh material", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1570,7 +1580,7 @@ bool CXMeshFileLoader::parseDataObjectMaterial(video::SMaterial& material) bool CXMeshFileLoader::parseDataObjectAnimationSet() { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: Reading animation set"); + os::Printer::log("CXFileReader: Reading animation set", ELL_DEBUG); #endif core::stringc AnimationName; @@ -1581,6 +1591,7 @@ bool CXMeshFileLoader::parseDataObjectAnimationSet() os::Printer::log("Line", core::stringc(Line).c_str(), ELL_WARNING); return false; } + os::Printer::log("Reading animationset ", AnimationName, ELL_DEBUG); while(true) { @@ -1617,7 +1628,7 @@ bool CXMeshFileLoader::parseDataObjectAnimationSet() bool CXMeshFileLoader::parseDataObjectAnimation() { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading animation"); + os::Printer::log("CXFileReader: reading animation", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1685,7 +1696,7 @@ bool CXMeshFileLoader::parseDataObjectAnimation() if (FrameName.size() != 0) { #ifdef _XREADER_DEBUG - os::Printer::log("getting name: ", FrameName.c_str()); + os::Printer::log("frame name", FrameName.c_str(), ELL_DEBUG); #endif CSkinnedMesh::SJoint *joint=0; @@ -1702,7 +1713,7 @@ bool CXMeshFileLoader::parseDataObjectAnimation() if (!joint) { #ifdef _XREADER_DEBUG - os::Printer::log("creating joint for animation ", FrameName.c_str()); + os::Printer::log("creating joint for animation ", FrameName.c_str(), ELL_DEBUG); #endif joint=AnimatedMesh->addJoint(0); joint->Name=FrameName; @@ -1736,7 +1747,7 @@ bool CXMeshFileLoader::parseDataObjectAnimation() bool CXMeshFileLoader::parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading animation key"); + os::Printer::log("CXFileReader: reading animation key", ELL_DEBUG); #endif if (!readHeadOfDataObject()) @@ -1908,7 +1919,7 @@ bool CXMeshFileLoader::parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint) bool CXMeshFileLoader::parseDataObjectTextureFilename(core::stringc& texturename) { #ifdef _XREADER_DEBUG - os::Printer::log("CXFileReader: reading texture filename"); + os::Printer::log("CXFileReader: reading texture filename", ELL_DEBUG); #endif if (!readHeadOfDataObject()) diff --git a/source/Irrlicht/CXMeshFileLoader.h b/source/Irrlicht/CXMeshFileLoader.h index 59ec4dce..8305c77c 100644 --- a/source/Irrlicht/CXMeshFileLoader.h +++ b/source/Irrlicht/CXMeshFileLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CZBuffer.cpp b/source/Irrlicht/CZBuffer.cpp index 53bf79bf..2a4573df 100644 --- a/source/Irrlicht/CZBuffer.cpp +++ b/source/Irrlicht/CZBuffer.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CZBuffer.h b/source/Irrlicht/CZBuffer.h index 72a7971a..3f9d4697 100644 --- a/source/Irrlicht/CZBuffer.h +++ b/source/Irrlicht/CZBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/CZipReader.cpp b/source/Irrlicht/CZipReader.cpp index ead1d59e..676edf51 100644 --- a/source/Irrlicht/CZipReader.cpp +++ b/source/Irrlicht/CZipReader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -176,90 +176,6 @@ const IFileList* CZipReader::getFileList() const return this; } -#if 0 -#include - -const c8 *sigName( u32 sig ) -{ - switch ( sig ) - { - case 0x04034b50: return "PK0304"; - case 0x02014b50: return "PK0102"; - case 0x06054b50: return "PK0506"; - } - return "unknown"; -} - -bool CZipReader::scanLocalHeader2() -{ - c8 buf [ 128 ]; - c8 *c; - - File->read( &temp.header.Sig, 4 ); - -#ifdef __BIG_ENDIAN__ - os::Byteswap::byteswap(temp.header.Sig); -#endif - - sprintf ( buf, "sig: %08x,%s,", temp.header.Sig, sigName ( temp.header.Sig ) ); - OutputDebugStringA ( buf ); - - // Local File Header - if ( temp.header.Sig == 0x04034b50 ) - { - File->read( &temp.header.VersionToExtract, sizeof( temp.header ) - 4 ); - - temp.zipFileName.reserve( temp.header.FilenameLength+2); - c = (c8*) temp.zipFileName.c_str(); - File->read( c, temp.header.FilenameLength); - c [ temp.header.FilenameLength ] = 0; - temp.zipFileName.verify(); - - sprintf ( buf, "%d,'%s'\n", temp.header.CompressionMethod, c ); - OutputDebugStringA ( buf ); - - if (temp.header.ExtraFieldLength) - { - File->seek( temp.header.ExtraFieldLength, true); - } - - if (temp.header.GeneralBitFlag & ZIP_INFO_IN_DATA_DESCRIPTOR) - { - // read data descriptor - File->seek(sizeof(SZIPFileDataDescriptor), true ); - } - - // compressed data - temp.fileDataPosition = File->getPos(); - File->seek( temp.header.DataDescriptor.CompressedSize, true); - FileList.push_back( temp ); - return true; - } - - // Central directory structure - if ( temp.header.Sig == 0x04034b50 ) - { - //SZIPFileCentralDirFileHeader h; - //File->read( &h, sizeof( h ) - 4 ); - return true; - } - - // End of central dir - if ( temp.header.Sig == 0x06054b50 ) - { - return true; - } - - // eof - if ( temp.header.Sig == 0x02014b50 ) - { - return false; - } - - return false; -} - -#endif //! scans for a local header, returns false if there is no more local file header. //! The gzip file format seems to think that there can be multiple files in a gzip file @@ -372,7 +288,7 @@ bool CZipReader::scanGZipHeader() } //! scans for a local header, returns false if there is no more local file header. -bool CZipReader::scanZipHeader() +bool CZipReader::scanZipHeader(bool ignoreGPBits) { io::path ZipFileName = ""; SZipFileEntry entry; @@ -450,16 +366,57 @@ bool CZipReader::scanZipHeader() if (entry.header.ExtraFieldLength) File->seek(entry.header.ExtraFieldLength, true); - // if bit 3 was set, read DataDescriptor, following after the compressed data - if (entry.header.GeneralBitFlag & ZIP_INFO_IN_DATA_DESCRIPTOR) + // if bit 3 was set, use CentralDirectory for setup + if (!ignoreGPBits && entry.header.GeneralBitFlag & ZIP_INFO_IN_DATA_DESCRIPTOR) { - // read data descriptor - File->read(&entry.header.DataDescriptor, sizeof(entry.header.DataDescriptor)); + SZIPFileCentralDirEnd dirEnd; + FileInfo.clear(); + Files.clear(); + // First place where the end record could be stored + File->seek(File->getSize()-22); + const char endID[] = {0x50, 0x4b, 0x05, 0x06, 0x0}; + char tmp[5]={'\0'}; + bool found=false; + // search for the end record ID + while (!found && File->getPos()>0) + { + int seek=8; + File->read(tmp, 4); + switch (tmp[0]) + { + case 0x50: + if (!strcmp(endID, tmp)) + { + seek=4; + found=true; + } + break; + case 0x4b: + seek=5; + break; + case 0x05: + seek=6; + break; + case 0x06: + seek=7; + break; + } + File->seek(-seek, true); + } + File->read(&dirEnd, sizeof(dirEnd)); #ifdef __BIG_ENDIAN__ - entry.header.DataDescriptor.CRC32 = os::Byteswap::byteswap(entry.header.DataDescriptor.CRC32); - entry.header.DataDescriptor.CompressedSize = os::Byteswap::byteswap(entry.header.DataDescriptor.CompressedSize); - entry.header.DataDescriptor.UncompressedSize = os::Byteswap::byteswap(entry.header.DataDescriptor.UncompressedSize); + dirEnd.NumberDisk = os::Byteswap::byteswap(dirEnd.NumberDisk); + dirEnd.NumberStart = os::Byteswap::byteswap(dirEnd.NumberStart); + dirEnd.TotalDisk = os::Byteswap::byteswap(dirEnd.TotalDisk); + dirEnd.TotalEntries = os::Byteswap::byteswap(dirEnd.TotalEntries); + dirEnd.Size = os::Byteswap::byteswap(dirEnd.Size); + dirEnd.Offset = os::Byteswap::byteswap(dirEnd.Offset); + dirEnd.CommentLength = os::Byteswap::byteswap(dirEnd.CommentLength); #endif + FileInfo.reallocate(dirEnd.TotalEntries); + File->seek(dirEnd.Offset); + while (scanCentralDirectoryHeader()) { } + return false; } // store position in file @@ -471,13 +428,55 @@ bool CZipReader::scanZipHeader() //os::Debuginfo::print("added file from archive", ZipFileName.c_str()); #endif - addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, false, FileInfo.size()); + addItem(ZipFileName, entry.Offset, entry.header.DataDescriptor.UncompressedSize, ZipFileName.lastChar()=='/', FileInfo.size()); FileInfo.push_back(entry); return true; } +//! scans for a local header, returns false if there is no more local file header. +bool CZipReader::scanCentralDirectoryHeader() +{ + io::path ZipFileName = ""; + SZIPFileCentralDirFileHeader entry; + File->read(&entry, sizeof(SZIPFileCentralDirFileHeader)); + +#ifdef __BIG_ENDIAN__ + entry.Sig = os::Byteswap::byteswap(entry.Sig); + entry.VersionMadeBy = os::Byteswap::byteswap(entry.VersionMadeBy); + entry.VersionToExtract = os::Byteswap::byteswap(entry.VersionToExtract); + entry.GeneralBitFlag = os::Byteswap::byteswap(entry.GeneralBitFlag); + entry.CompressionMethod = os::Byteswap::byteswap(entry.CompressionMethod); + entry.LastModFileTime = os::Byteswap::byteswap(entry.LastModFileTime); + entry.LastModFileDate = os::Byteswap::byteswap(entry.LastModFileDate); + entry.CRC32 = os::Byteswap::byteswap(entry.CRC32); + entry.CompressedSize = os::Byteswap::byteswap(entry.CompressedSize); + entry.UncompressedSize = os::Byteswap::byteswap(entry.UncompressedSize); + entry.FilenameLength = os::Byteswap::byteswap(entry.FilenameLength); + entry.ExtraFieldLength = os::Byteswap::byteswap(entry.ExtraFieldLength); + entry.FileCommentLength = os::Byteswap::byteswap(entry.FileCommentLength); + entry.DiskNumberStart = os::Byteswap::byteswap(entry.DiskNumberStart); + entry.InternalFileAttributes = os::Byteswap::byteswap(entry.InternalFileAttributes); + entry.ExternalFileAttributes = os::Byteswap::byteswap(entry.ExternalFileAttributes); + entry.RelativeOffsetOfLocalHeader = os::Byteswap::byteswap(entry.RelativeOffsetOfLocalHeader); +#endif + + if (entry.Sig != 0x02014b50) + return false; // central dir headers end here. + + const long pos = File->getPos(); + File->seek(entry.RelativeOffsetOfLocalHeader); + scanZipHeader(true); + File->seek(pos+entry.FilenameLength+entry.ExtraFieldLength+entry.FileCommentLength); + FileInfo.getLast().header.DataDescriptor.CompressedSize=entry.CompressedSize; + FileInfo.getLast().header.DataDescriptor.UncompressedSize=entry.UncompressedSize; + FileInfo.getLast().header.DataDescriptor.CRC32=entry.CRC32; + Files.getLast().Size=entry.UncompressedSize; + return true; +} + + //! opens a file by file name IReadFile* CZipReader::createAndOpenFile(const io::path& filename) { diff --git a/source/Irrlicht/CZipReader.h b/source/Irrlicht/CZipReader.h index cedb6658..aa69b3e4 100644 --- a/source/Irrlicht/CZipReader.h +++ b/source/Irrlicht/CZipReader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -60,23 +60,23 @@ namespace io struct SZIPFileCentralDirFileHeader { - u32 central_file_header_signature; // 'PK0102' (0x02014b50) - u16 version_made_by; - u16 version_needed_to_extract; - u16 general_purpose_bit_flag; - u16 compression_method; - u16 last_mod_file_time; - u16 last_mod_file_date; - u32 crc_32; - u32 compressed_size; - u32 uncompressed_size; - u16 filename_length; - u16 extra_field_length; - u16 file_comment_length; - u16 disk_number_start; - u16 internal_file_attributes; - u32 external_file_attributes; - u32 relative_offset_of_local_header; + u32 Sig; // 'PK0102' (0x02014b50) + u16 VersionMadeBy; + u16 VersionToExtract; + u16 GeneralBitFlag; + u16 CompressionMethod; + u16 LastModFileTime; + u16 LastModFileDate; + u32 CRC32; + u32 CompressedSize; + u32 UncompressedSize; + u16 FilenameLength; + u16 ExtraFieldLength; + u16 FileCommentLength; + u16 DiskNumberStart; + u16 InternalFileAttributes; + u32 ExternalFileAttributes; + u32 RelativeOffsetOfLocalHeader; // filename (variable size) // extra field (variable size) @@ -86,14 +86,14 @@ namespace io struct SZIPFileCentralDirEnd { - u32 sig; // 'PK0506' end_of central dir signature // (0x06054b50) - u16 numberDisk; // number of this disk - u16 numberStart; // number of the disk with the start of the central directory - u16 totalDisk; // total number of entries in the central dir on this disk - u16 totalEntries; // total number of entries in the central dir - u32 size; // size of the central directory - u32 offset; // offset of start of centraldirectory with respect to the starting disk number - u16 comment_length; // zipfile comment length + u32 Sig; // 'PK0506' end_of central dir signature // (0x06054b50) + u16 NumberDisk; // number of this disk + u16 NumberStart; // number of the disk with the start of the central directory + u16 TotalDisk; // total number of entries in the central dir on this disk + u16 TotalEntries; // total number of entries in the central dir + u32 Size; // size of the central directory + u32 Offset; // offset of start of centraldirectory with respect to the starting disk number + u16 CommentLength; // zipfile comment length // zipfile comment (variable size) } PACK_STRUCT; @@ -211,18 +211,23 @@ namespace io protected: - IReadFile* File; - //! reads the next file header from a ZIP file, returns false if there are no more headers. - bool scanZipHeader(); + /* if ignoreGPBits is set, the item will be read despite missing + file information. This is used when reading items from the central + directory. */ + bool scanZipHeader(bool ignoreGPBits=false); //! the same but for gzip files bool scanGZipHeader(); - bool IsGZip; + bool scanCentralDirectoryHeader(); + + IReadFile* File; // holds extended info about files core::array FileInfo; + + bool IsGZip; }; diff --git a/source/Irrlicht/IAttribute.h b/source/Irrlicht/IAttribute.h index 0a62c5da..84f3d25a 100644 --- a/source/Irrlicht/IAttribute.h +++ b/source/Irrlicht/IAttribute.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/IBurningShader.cpp b/source/Irrlicht/IBurningShader.cpp index 3045a0d4..c960cf66 100644 --- a/source/Irrlicht/IBurningShader.cpp +++ b/source/Irrlicht/IBurningShader.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h @@ -101,7 +101,7 @@ namespace video // select mignify and magnify ( lodLevel ) //SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS it->lodLevel = lodLevel; - it->data = (tVideoSample*) it->Texture->lock(true, + it->data = (tVideoSample*) it->Texture->lock(ETLM_READ_ONLY, core::s32_clamp ( lodLevel + SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS, 0, SOFTWARE_DRIVER_2_MIPMAPPING_MAX - 1 )); // prepare for optimal fixpoint diff --git a/source/Irrlicht/IBurningShader.h b/source/Irrlicht/IBurningShader.h index aaea2f24..4d023c3b 100644 --- a/source/Irrlicht/IBurningShader.h +++ b/source/Irrlicht/IBurningShader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/IDepthBuffer.h b/source/Irrlicht/IDepthBuffer.h index 04dc6689..fbc09d77 100644 --- a/source/Irrlicht/IDepthBuffer.h +++ b/source/Irrlicht/IDepthBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/IImagePresenter.h b/source/Irrlicht/IImagePresenter.h index 75077137..9f2b090f 100644 --- a/source/Irrlicht/IImagePresenter.h +++ b/source/Irrlicht/IImagePresenter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/ISceneNodeAnimatorFinishing.h b/source/Irrlicht/ISceneNodeAnimatorFinishing.h index 60d1033d..50ecbf97 100644 --- a/source/Irrlicht/ISceneNodeAnimatorFinishing.h +++ b/source/Irrlicht/ISceneNodeAnimatorFinishing.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2008 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/ITriangleRenderer.h b/source/Irrlicht/ITriangleRenderer.h index 36f975d6..bc502a94 100644 --- a/source/Irrlicht/ITriangleRenderer.h +++ b/source/Irrlicht/ITriangleRenderer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/IZBuffer.h b/source/Irrlicht/IZBuffer.h index e9654450..ad612ae8 100644 --- a/source/Irrlicht/IZBuffer.h +++ b/source/Irrlicht/IZBuffer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/Irrlicht-gcc.cbp b/source/Irrlicht/Irrlicht-gcc.cbp index a746658e..efcbfe71 100644 --- a/source/Irrlicht/Irrlicht-gcc.cbp +++ b/source/Irrlicht/Irrlicht-gcc.cbp @@ -423,25 +423,41 @@ + + + + + + + + + + + + + + + + @@ -458,7 +474,9 @@ + + @@ -470,10 +488,14 @@ + + + + @@ -488,9 +510,20 @@ + + + + + + + + + + + @@ -502,6 +535,7 @@ + @@ -510,6 +544,7 @@ + @@ -527,17 +562,22 @@ + + + + + @@ -818,22 +858,29 @@ + + + + + + + diff --git a/source/Irrlicht/Irrlicht.aps b/source/Irrlicht/Irrlicht.aps new file mode 100644 index 00000000..601d2949 Binary files /dev/null and b/source/Irrlicht/Irrlicht.aps differ diff --git a/source/Irrlicht/Irrlicht.cpp b/source/Irrlicht/Irrlicht.cpp index 682feb47..35c34df9 100644 --- a/source/Irrlicht/Irrlicht.cpp +++ b/source/Irrlicht/Irrlicht.cpp @@ -1,10 +1,10 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #include "IrrCompileConfig.h" -static const char* const copyright = "Irrlicht Engine (c) 2002-2009 Nikolaus Gebhardt"; +static const char* const copyright = "Irrlicht Engine (c) 2002-2011 Nikolaus Gebhardt"; #ifdef _IRR_WINDOWS_ #include diff --git a/source/Irrlicht/Irrlicht.rc b/source/Irrlicht/Irrlicht.rc new file mode 100644 index 00000000..d8809434 Binary files /dev/null and b/source/Irrlicht/Irrlicht.rc differ diff --git a/source/Irrlicht/Irrlicht10.0.sln b/source/Irrlicht/Irrlicht10.0.sln new file mode 100644 index 00000000..f3dcbb4e --- /dev/null +++ b/source/Irrlicht/Irrlicht10.0.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release - Fast FPU|Win32 = Release - Fast FPU|Win32 + Release - Fast FPU|x64 = Release - Fast FPU|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Static lib - Debug|Win32 = Static lib - Debug|Win32 + Static lib - Debug|x64 = Static lib - Debug|x64 + Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 + Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 + Static lib - Release|Win32 = Static lib - Release|Win32 + Static lib - Release|x64 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 + {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/source/Irrlicht/Irrlicht10.0.vcxproj b/source/Irrlicht/Irrlicht10.0.vcxproj new file mode 100644 index 00000000..59db7c6c --- /dev/null +++ b/source/Irrlicht/Irrlicht10.0.vcxproj @@ -0,0 +1,1523 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release - Fast FPU + Win32 + + + Release - Fast FPU + x64 + + + Release + Win32 + + + Release + x64 + + + SDL-Debug + Win32 + + + SDL-Debug + x64 + + + Static lib - Debug + Win32 + + + Static lib - Debug + x64 + + + Static lib - Release - Fast FPU + Win32 + + + Static lib - Release - Fast FPU + x64 + + + Static lib - Release + Win32 + + + Static lib - Release + x64 + + + + Irrlicht + {E08E042A-6C45-411B-92BE-3CC31331019F} + Irrlicht + + + + DynamicLibrary + NotSet + + + DynamicLibrary + NotSet + Windows7.1SDK + + + StaticLibrary + MultiByte + true + + + StaticLibrary + MultiByte + true + Windows7.1SDK + + + StaticLibrary + MultiByte + true + + + StaticLibrary + MultiByte + true + Windows7.1SDK + + + StaticLibrary + NotSet + + + StaticLibrary + NotSet + Windows7.1SDK + + + DynamicLibrary + MultiByte + true + + + DynamicLibrary + MultiByte + true + Windows7.1SDK + + + DynamicLibrary + MultiByte + true + + + DynamicLibrary + MultiByte + true + Windows7.1SDK + + + DynamicLibrary + NotSet + + + DynamicLibrary + NotSet + Windows7.1SDK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + false + false + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + false + false + ..\..\lib\Win32-VisualStudio\ + ..\..\lib\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + ..\..\lib\Win32-VisualStudio\ + ..\..\lib\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + ..\..\lib\Win32-VisualStudio\ + ..\..\lib\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + ..\..\bin\Win32-VisualStudio\ + ..\..\bin\Win64-VisualStudio\ + obj\$(Configuration)\ + obj\$(Configuration)64\ + true + true + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + obj\$(Configuration)\ + obj\$(Configuration)64\ + true + true + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + $(DXSDK_DIR)include;$(IncludePath) + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Debug/Irrlicht.tlb + + + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + Disabled + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + true + + + /MACHINE:I386 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win32-visualstudio\Irrlicht.dll + %(AdditionalLibraryDirectories) + libci.lib;%(IgnoreSpecificDefaultLibraries) + true + + + ..\..\lib\Win32-visualstudio\Irrlicht.lib + 1.8.0.alpha + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\..\Debug/Irrlicht.tlb + + + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + Disabled + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + true + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win64-visualstudio\Irrlicht.dll + %(AdditionalLibraryDirectories) + libci.lib;%(IgnoreSpecificDefaultLibraries) + true + + + ..\..\lib\Win64-visualstudio\Irrlicht.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Release/Irrlicht.tlb + + + MaxSpeed + OnlyExplicitInline + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Level3 + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + /MACHINE:I386 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win32-visualstudio\Irrlicht.dll + libci.lib;%(IgnoreSpecificDefaultLibraries) + false + + + ..\..\lib\Win32-visualstudio\Irrlicht.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\..\Release/Irrlicht.tlb + + + MaxSpeed + OnlyExplicitInline + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Level3 + + + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win64-visualstudio\Irrlicht.dll + libci.lib;%(IgnoreSpecificDefaultLibraries) + false + + + ..\..\lib\Win64-visualstudio\Irrlicht.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Release/Irrlicht.tlb + + + Full + AnySuitable + true + Speed + true + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + false + MultiThreaded + Default + false + false + StreamingSIMDExtensions2 + Fast + false + Level3 + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + /MACHINE:I386 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win32-visualstudio\Irrlicht.dll + libci.lib;%(IgnoreSpecificDefaultLibraries) + false + true + + + ..\..\lib\Win32-visualstudio\Irrlicht.lib + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\..\Release/Irrlicht.tlb + + + Full + AnySuitable + true + Speed + true + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + false + MultiThreaded + Default + false + false + StreamingSIMDExtensions2 + Fast + false + Level3 + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win64-visualstudio\Irrlicht.dll + libci.lib;%(IgnoreSpecificDefaultLibraries) + false + true + + + ..\..\lib\Win64-visualstudio\Irrlicht.lib + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Debug/Irrlicht.tlb + + + Disabled + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win32-visualstudio\Irrlicht.lib + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\..\Debug/Irrlicht.tlb + + + Disabled + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win64-visualstudio\Irrlicht.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Release/Irrlicht.tlb + + + MaxSpeed + OnlyExplicitInline + false + false + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Level3 + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win32-visualstudio\Irrlicht.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\..\Release/Irrlicht.tlb + + + MaxSpeed + OnlyExplicitInline + false + false + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Level3 + + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win64-visualstudio\Irrlicht.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Release/Irrlicht.tlb + + + Full + AnySuitable + true + Speed + true + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Fast + false + Level3 + + + FastCall + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win32-visualstudio\Irrlicht.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\..\Release/Irrlicht.tlb + + + Full + AnySuitable + true + Speed + true + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + Fast + false + Level3 + + + FastCall + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + winmm.lib;%(AdditionalDependencies) + ..\..\lib\Win64-visualstudio\Irrlicht.lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\..\Debug/Irrlicht.tlb + + + Disabled + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions) + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + true + + + /MACHINE:I386 %(AdditionalOptions) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win32-visualstudio\Irrlicht.dll + %(AdditionalLibraryDirectories) + libci.lib;%(IgnoreSpecificDefaultLibraries) + true + + + ..\..\lib\Win32-visualstudio\Irrlicht.lib + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\..\Debug/Irrlicht.tlb + + + Disabled + ..\..\include;zlib;%(AdditionalIncludeDirectories) + WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions) + + + EnableFastChecks + MultiThreadedDebug + false + false + Level3 + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c07 + + + true + + + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) + ..\..\bin\Win64-visualstudio\Irrlicht.dll + %(AdditionalLibraryDirectories) + libci.lib;%(IgnoreSpecificDefaultLibraries) + true + + + ..\..\lib\Win64-visualstudio\Irrlicht.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/Irrlicht10.0.vcxproj.filters b/source/Irrlicht/Irrlicht10.0.vcxproj.filters new file mode 100644 index 00000000..d1cd03a2 --- /dev/null +++ b/source/Irrlicht/Irrlicht10.0.vcxproj.filters @@ -0,0 +1,2205 @@ + + + + + {b5bde5d3-f9e4-4036-8c28-2f4e8cd03846} + + + {0b0937fb-2270-4e3e-a94f-f92bc0fa74ae} + + + {67300400-93d5-4a7e-8b59-7c0d7b1f6d75} + + + {feb206b9-81b6-45c0-b4e5-9e637fe060e7} + + + {af459bf5-2849-4a0e-9a21-91acbbf1c6b5} + + + {aa649d49-922d-4118-8574-f05c13d67706} + + + {a72cb2e5-a5c3-41bc-9c86-fdbdae8f7866} + + + {72c30315-bbc0-4109-9ccd-fb7107ba316a} + + + {1fcdc900-911d-4b7a-9328-afce5bbe44fa} + + + {41e16cbf-c3cb-4d74-8aef-c0416b6b9d7f} + + + {b84f01e5-ae3c-457b-8d96-b3e271800162} + + + {eca36d94-d8fb-477d-a0dc-b5498c9686d7} + + + {67826246-df05-4523-9191-5286f9157963} + + + {659a61d5-7ab3-4aa3-95ca-879780810b4e} + + + {f65e8d89-c715-4794-8c2d-22f2b57cffb0} + + + {3cb7865d-a5e9-4b22-8f54-dde759b88c51} + + + {919fcfa4-4277-4c88-8bfc-4bfcfcbb1b65} + + + {834213c7-9515-49de-aa27-8d3ed9c0c87a} + + + {19838bc4-396f-4d23-ad1b-3bb652e33e6d} + + + {a9ca9d4d-7678-4687-b78b-15236c0dcf53} + + + {d694e7b0-0fb0-4685-ace7-56d9ec65a3d0} + + + {e2571a61-945c-4509-b47c-daea464916ab} + + + {1354e9fa-cea6-461e-af7f-9940bb5f0a2f} + + + {ac7af7ba-0e6b-4da4-a695-a0070a4da974} + + + {1173499e-79e8-4c34-8046-abc325e2f2a9} + + + {ca095ff3-25e4-4852-ab55-af28c602cd8a} + + + {1c8bd90a-8361-4478-8942-a062450ef209} + + + {128cac28-b6f8-49e7-87f5-ee15951d0396} + + + {6f10ce97-ed8b-47bc-a189-f2262eb467e4} + + + {5d58bc55-284e-4880-9226-85083e65d660} + + + {064ee182-9f07-4026-ac22-c141ae2c7281} + + + {6e842906-e193-451d-8716-12eaafabd0d8} + + + {799f220e-3a58-4788-876b-88c175b69871} + + + {da421793-4674-481c-be46-f7a44e78aee5} + + + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\video + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\core + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\io + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\scene + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + include\gui + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\video + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr\extern + + + Irrlicht\irr\extern + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + include\scene + + + + + + doc + + + doc + + + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\loaders + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\sceneNodes + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\particleSystem + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\collision + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\animators + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\scene\writers + + + Irrlicht\video + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\Software + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\OpenGL + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Direct3D8 + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Writer + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Null\Loader + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Direct3D9 + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\video\Burning Video + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr + + + Irrlicht\irr\extern + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\zlib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\jpeglib + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\libpng + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\aesGladman + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\extern\bzip2 + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\irr\device + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\io + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + Irrlicht\gui + + + + + + \ No newline at end of file diff --git a/source/Irrlicht/Irrlicht7.1.vcproj b/source/Irrlicht/Irrlicht7.1.vcproj index ef918cbe..28fc05e6 100644 --- a/source/Irrlicht/Irrlicht7.1.vcproj +++ b/source/Irrlicht/Irrlicht7.1.vcproj @@ -612,7 +612,7 @@ RelativePath=".\..\..\include\IAnimatedMeshMD2.h"> + RelativePath=".\..\..\include\IAnimatedMeshMD3.h"> @@ -2183,9 +2183,6 @@ - - @@ -2246,9 +2243,6 @@ - - diff --git a/source/Irrlicht/Irrlicht8.0.vcproj b/source/Irrlicht/Irrlicht8.0.vcproj index 23cdb89b..3215ef37 100644 --- a/source/Irrlicht/Irrlicht8.0.vcproj +++ b/source/Irrlicht/Irrlicht8.0.vcproj @@ -866,7 +866,7 @@ > - - @@ -3160,10 +3156,6 @@ RelativePath="jpeglib\jdhuff.c" > - - diff --git a/source/Irrlicht/Irrlicht9.0.vcproj b/source/Irrlicht/Irrlicht9.0.vcproj index 941827fe..80845205 100644 --- a/source/Irrlicht/Irrlicht9.0.vcproj +++ b/source/Irrlicht/Irrlicht9.0.vcproj @@ -993,7 +993,7 @@ > - - @@ -2998,10 +2994,6 @@ RelativePath="jpeglib\jdhuff.c" > - - diff --git a/source/Irrlicht/Irrlicht_mobile6.vcproj b/source/Irrlicht/Irrlicht_mobile6.vcproj index addb2170..44bd8aed 100644 --- a/source/Irrlicht/Irrlicht_mobile6.vcproj +++ b/source/Irrlicht/Irrlicht_mobile6.vcproj @@ -593,7 +593,7 @@ > - - @@ -2767,10 +2763,6 @@ RelativePath="jpeglib\jdhuff.c" > - - diff --git a/source/Irrlicht/MacOSX/AppDelegate.h b/source/Irrlicht/MacOSX/AppDelegate.h index 38dbbc18..7d800102 100644 --- a/source/Irrlicht/MacOSX/AppDelegate.h +++ b/source/Irrlicht/MacOSX/AppDelegate.h @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/MacOSX/AppDelegate.mm b/source/Irrlicht/MacOSX/AppDelegate.mm index 0160935c..be03c1d9 100644 --- a/source/Irrlicht/MacOSX/AppDelegate.mm +++ b/source/Irrlicht/MacOSX/AppDelegate.mm @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h index d5f88205..9106c52d 100644 --- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h +++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm index b2e4bb76..fe869fcd 100644 --- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm +++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/MacOSX/OSXClipboard.h b/source/Irrlicht/MacOSX/OSXClipboard.h index eeb0c962..534a9ee4 100644 --- a/source/Irrlicht/MacOSX/OSXClipboard.h +++ b/source/Irrlicht/MacOSX/OSXClipboard.h @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/MacOSX/OSXClipboard.mm b/source/Irrlicht/MacOSX/OSXClipboard.mm index fbc8bfb5..71369f92 100644 --- a/source/Irrlicht/MacOSX/OSXClipboard.mm +++ b/source/Irrlicht/MacOSX/OSXClipboard.mm @@ -1,4 +1,5 @@ -// Copyright (C) 2005-2009 Etienne Petitjean +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2011 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h diff --git a/source/Irrlicht/Octree.h b/source/Irrlicht/Octree.h index b02db0ba..693d6bc6 100644 --- a/source/Irrlicht/Octree.h +++ b/source/Irrlicht/Octree.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/S2DVertex.h b/source/Irrlicht/S2DVertex.h index 79b2caba..1f35fa8e 100644 --- a/source/Irrlicht/S2DVertex.h +++ b/source/Irrlicht/S2DVertex.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/S4DVertex.h b/source/Irrlicht/S4DVertex.h index 1ded847d..68466ffd 100644 --- a/source/Irrlicht/S4DVertex.h +++ b/source/Irrlicht/S4DVertex.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/SoftwareDriver2_compile_config.h b/source/Irrlicht/SoftwareDriver2_compile_config.h index 7d0ca1ea..ebede360 100644 --- a/source/Irrlicht/SoftwareDriver2_compile_config.h +++ b/source/Irrlicht/SoftwareDriver2_compile_config.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/SoftwareDriver2_helper.h b/source/Irrlicht/SoftwareDriver2_helper.h index e1e39d8a..802cf03d 100644 --- a/source/Irrlicht/SoftwareDriver2_helper.h +++ b/source/Irrlicht/SoftwareDriver2_helper.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt / Thomas Alten +// Copyright (C) 2002-2011 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h diff --git a/source/Irrlicht/bzip2/CHANGES b/source/Irrlicht/bzip2/CHANGES index 6e4f65e2..81e97ca6 100644 --- a/source/Irrlicht/bzip2/CHANGES +++ b/source/Irrlicht/bzip2/CHANGES @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -317,3 +317,11 @@ Fixes some minor bugs since the last version, 1.0.3. ~~~~~~~~~~~~~~~~~ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 diff --git a/source/Irrlicht/bzip2/LICENSE b/source/Irrlicht/bzip2/LICENSE index f420cffb..cc614178 100644 --- a/source/Irrlicht/bzip2/LICENSE +++ b/source/Irrlicht/bzip2/LICENSE @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2007 Julian R Seward. All +documentation, are copyright (C) 1996-2010 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37,6 +37,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.5 of 10 December 2007 +bzip2/libbzip2 version 1.0.6 of 6 September 2010 -------------------------------------------------------------------------- diff --git a/source/Irrlicht/bzip2/Makefile b/source/Irrlicht/bzip2/Makefile index eb09753c..9754ddf2 100644 --- a/source/Irrlicht/bzip2/Makefile +++ b/source/Irrlicht/bzip2/Makefile @@ -2,8 +2,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c distclean: clean rm -f manual.ps manual.html manual.pdf -DISTNAME=bzip2-1.0.5 +DISTNAME=bzip2-1.0.6 dist: check manual rm -f $(DISTNAME) ln -s -f . $(DISTNAME) diff --git a/source/Irrlicht/bzip2/Makefile-libbz2_so b/source/Irrlicht/bzip2/Makefile-libbz2_so index 9a13c77e..e58791b3 100644 --- a/source/Irrlicht/bzip2/Makefile-libbz2_so +++ b/source/Irrlicht/bzip2/Makefile-libbz2_so @@ -1,6 +1,6 @@ # This Makefile builds a shared version of the library, -# libbz2.so.1.0.4, with soname libbz2.so.1.0, +# libbz2.so.1.0.6, with soname libbz2.so.1.0, # at least on x86-Linux (RedHat 7.2), # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). # Please see the README file for some important info @@ -10,8 +10,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -35,13 +35,13 @@ OBJS= blocksort.o \ bzlib.o all: $(OBJS) - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS) - $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4 + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 rm -f libbz2.so.1.0 - ln -s libbz2.so.1.0.4 libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 clean: - rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared blocksort.o: blocksort.c $(CC) $(CFLAGS) -c blocksort.c diff --git a/source/Irrlicht/bzip2/README b/source/Irrlicht/bzip2/README index e17a84e0..9fb0f636 100644 --- a/source/Irrlicht/bzip2/README +++ b/source/Irrlicht/bzip2/README @@ -6,8 +6,8 @@ This version is fully compatible with the previous public releases. This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -181,6 +181,10 @@ WHAT'S NEW IN 1.0.5 ? See the CHANGES file. +WHAT'S NEW IN 1.0.6 ? + + See the CHANGES file. + I hope you find bzip2 useful. Feel free to contact me at jseward@bzip.org @@ -208,3 +212,4 @@ Cambridge, UK. 15 February 2005 (bzip2, version 1.0.3) 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) diff --git a/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS b/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS index 22b95c6c..667d0d6d 100644 --- a/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS +++ b/source/Irrlicht/bzip2/README.COMPILATION.PROBLEMS @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms of the license contained in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.5 should compile without problems on the vast majority of +bzip2-1.0.6 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file diff --git a/source/Irrlicht/bzip2/README.XML.STUFF b/source/Irrlicht/bzip2/README.XML.STUFF index 1a5b4c55..3a57f3fa 100644 --- a/source/Irrlicht/bzip2/README.XML.STUFF +++ b/source/Irrlicht/bzip2/README.XML.STUFF @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/blocksort.c b/source/Irrlicht/bzip2/blocksort.c index bd2dec15..d0d662cd 100644 --- a/source/Irrlicht/bzip2/blocksort.c +++ b/source/Irrlicht/bzip2/blocksort.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/bzcompress.c b/source/Irrlicht/bzip2/bzcompress.c index 8c80a079..caf76960 100644 --- a/source/Irrlicht/bzip2/bzcompress.c +++ b/source/Irrlicht/bzip2/bzcompress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/bzip2.1 b/source/Irrlicht/bzip2/bzip2.1 index a313f2d5..ce3a78e6 100644 --- a/source/Irrlicht/bzip2/bzip2.1 +++ b/source/Irrlicht/bzip2/bzip2.1 @@ -1,7 +1,7 @@ .PU .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 .br bzcat \- decompresses files to stdout .br @@ -405,11 +405,11 @@ I/O error messages are not as helpful as they could be. tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.4 of +This manual page pertains to version 1.0.6 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions -0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, but with the following +0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. diff --git a/source/Irrlicht/bzip2/bzip2.1.preformatted b/source/Irrlicht/bzip2/bzip2.1.preformatted index 15e16e50..63c33be9 100644 --- a/source/Irrlicht/bzip2/bzip2.1.preformatted +++ b/source/Irrlicht/bzip2/bzip2.1.preformatted @@ -3,7 +3,7 @@ bzip2(1) bzip2(1) NNAAMMEE - bzip2, bunzip2 − a block‐sorting file compressor, v1.0.4 + bzip2, bunzip2 − a block‐sorting file compressor, v1.0.6 bzcat − decompresses files to stdout bzip2recover − recovers data from damaged bzip2 files @@ -348,11 +348,11 @@ CCAAVVEEAATTSS but the details of what the problem is sometimes seem rather misleading. - This manual page pertains to version 1.0.4 of _b_z_i_p_2_. Com­ + This manual page pertains to version 1.0.6 of _b_z_i_p_2_. Com­ pressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, - 1.0.2 and 1.0.3, but with the following exception: 0.9.0 + 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. diff --git a/source/Irrlicht/bzip2/bzip2.c b/source/Irrlicht/bzip2/bzip2.c index 39041073..6de9d1d1 100644 --- a/source/Irrlicht/bzip2/bzip2.c +++ b/source/Irrlicht/bzip2/bzip2.c @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -1605,11 +1605,11 @@ void license ( void ) "bzip2, a block-sorting file compressor. " "Version %s.\n" " \n" - " Copyright (C) 1996-2007 by Julian Seward.\n" + " Copyright (C) 1996-2010 by Julian Seward.\n" " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.5 source distribution.\n" + " in the bzip2-1.0.6 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" diff --git a/source/Irrlicht/bzip2/bzip2.txt b/source/Irrlicht/bzip2/bzip2.txt index 4fb9c743..d2deb394 100644 --- a/source/Irrlicht/bzip2/bzip2.txt +++ b/source/Irrlicht/bzip2/bzip2.txt @@ -1,6 +1,6 @@ NAME - bzip2, bunzip2 - a block-sorting file compressor, v1.0.4 + bzip2, bunzip2 - a block-sorting file compressor, v1.0.6 bzcat - decompresses files to stdout bzip2recover - recovers data from damaged bzip2 files @@ -345,11 +345,11 @@ CAVEATS but the details of what the problem is sometimes seem rather misleading. - This manual page pertains to version 1.0.4 of bzip2. Com- + This manual page pertains to version 1.0.6 of bzip2. Com- pressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, - 1.0.2 and 1.0.3, but with the following exception: 0.9.0 + 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. diff --git a/source/Irrlicht/bzip2/bzip2recover.c b/source/Irrlicht/bzip2/bzip2recover.c index 5f6d6218..f9de0496 100644 --- a/source/Irrlicht/bzip2/bzip2recover.c +++ b/source/Irrlicht/bzip2/bzip2recover.c @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -313,7 +313,7 @@ Int32 main ( Int32 argc, Char** argv ) inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", diff --git a/source/Irrlicht/bzip2/bzlib.c b/source/Irrlicht/bzip2/bzlib.c index af2fbbe7..d85e734e 100644 --- a/source/Irrlicht/bzip2/bzlib.c +++ b/source/Irrlicht/bzip2/bzlib.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/bzlib.h b/source/Irrlicht/bzip2/bzlib.h index 186d8b5f..acb1935e 100644 --- a/source/Irrlicht/bzip2/bzlib.h +++ b/source/Irrlicht/bzip2/bzlib.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/bzlib_private.h b/source/Irrlicht/bzip2/bzlib_private.h index 23427879..5d0217f4 100644 --- a/source/Irrlicht/bzip2/bzlib_private.h +++ b/source/Irrlicht/bzip2/bzlib_private.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.5, 10-Dec-2007" +#define BZ_VERSION "1.0.6, 6-Sept-2010" typedef char Char; typedef unsigned char Bool; diff --git a/source/Irrlicht/bzip2/crctable.c b/source/Irrlicht/bzip2/crctable.c index 215687b2..1fea7e94 100644 --- a/source/Irrlicht/bzip2/crctable.c +++ b/source/Irrlicht/bzip2/crctable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/decompress.c b/source/Irrlicht/bzip2/decompress.c index bba5e0fa..311f5668 100644 --- a/source/Irrlicht/bzip2/decompress.c +++ b/source/Irrlicht/bzip2/decompress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -381,6 +381,13 @@ Int32 BZ2_decompress ( DState* s ) es = -1; N = 1; do { + /* Check that N doesn't get too big, so that es doesn't + go negative. The maximum value that can be + RUNA/RUNB encoded is equal to the block size (post + the initial RLE), viz, 900k, so bounding N at 2 + million should guard against overflow without + rejecting any legitimate inputs. */ + if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR); if (nextSym == BZ_RUNA) es = es + (0+1) * N; else if (nextSym == BZ_RUNB) es = es + (1+1) * N; N = N * 2; @@ -485,15 +492,28 @@ Int32 BZ2_decompress ( DState* s ) RETURN(BZ_DATA_ERROR); /*-- Set up cftab to facilitate generation of T^(-1) --*/ + /* Check: unzftab entries in range. */ + for (i = 0; i <= 255; i++) { + if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) + RETURN(BZ_DATA_ERROR); + } + /* Actually generate cftab. */ s->cftab[0] = 0; for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; + /* Check: cftab entries in range. */ for (i = 0; i <= 256; i++) { if (s->cftab[i] < 0 || s->cftab[i] > nblock) { /* s->cftab[i] can legitimately be == nblock */ RETURN(BZ_DATA_ERROR); } } + /* Check: cftab entries non-descending. */ + for (i = 1; i <= 256; i++) { + if (s->cftab[i-1] > s->cftab[i]) { + RETURN(BZ_DATA_ERROR); + } + } s->state_out_len = 0; s->state_out_ch = 0; diff --git a/source/Irrlicht/bzip2/entities.xml b/source/Irrlicht/bzip2/entities.xml index e9e0553b..4b28f346 100644 --- a/source/Irrlicht/bzip2/entities.xml +++ b/source/Irrlicht/bzip2/entities.xml @@ -1,9 +1,9 @@ - + - - + + diff --git a/source/Irrlicht/bzip2/format.pl b/source/Irrlicht/bzip2/format.pl index 1928d157..f169fd9d 100755 --- a/source/Irrlicht/bzip2/format.pl +++ b/source/Irrlicht/bzip2/format.pl @@ -4,8 +4,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. diff --git a/source/Irrlicht/bzip2/huffman.c b/source/Irrlicht/bzip2/huffman.c index 87e79e38..2283fdbc 100644 --- a/source/Irrlicht/bzip2/huffman.c +++ b/source/Irrlicht/bzip2/huffman.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/mk251.c b/source/Irrlicht/bzip2/mk251.c index 39e94c05..c9c36f6c 100644 --- a/source/Irrlicht/bzip2/mk251.c +++ b/source/Irrlicht/bzip2/mk251.c @@ -9,8 +9,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/randtable.c b/source/Irrlicht/bzip2/randtable.c index 068b7636..6d624599 100644 --- a/source/Irrlicht/bzip2/randtable.c +++ b/source/Irrlicht/bzip2/randtable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/spewG.c b/source/Irrlicht/bzip2/spewG.c index 5892b92c..14a36493 100644 --- a/source/Irrlicht/bzip2/spewG.c +++ b/source/Irrlicht/bzip2/spewG.c @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/unzcrash.c b/source/Irrlicht/bzip2/unzcrash.c index a1b75463..7041da51 100644 --- a/source/Irrlicht/bzip2/unzcrash.c +++ b/source/Irrlicht/bzip2/unzcrash.c @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/source/Irrlicht/bzip2/xmlproc.sh b/source/Irrlicht/bzip2/xmlproc.sh index 53841773..ca284ea9 100755 --- a/source/Irrlicht/bzip2/xmlproc.sh +++ b/source/Irrlicht/bzip2/xmlproc.sh @@ -5,8 +5,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. diff --git a/source/Irrlicht/dmfsupport.h b/source/Irrlicht/dmfsupport.h index c43df714..9f16a062 100644 --- a/source/Irrlicht/dmfsupport.h +++ b/source/Irrlicht/dmfsupport.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/glext.h b/source/Irrlicht/glext.h index d1b88566..2e2c0d61 100644 --- a/source/Irrlicht/glext.h +++ b/source/Irrlicht/glext.h @@ -29,9 +29,9 @@ extern "C" { */ /* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated $Date: 2010-02-10 22:22:53 -0800 (Wed, 10 Feb 2010) $ */ +/* glext.h last updated $Date: 2010-11-03 18:59:30 -0700 (Wed, 03 Nov 2010) $ */ /* Current version at http://www.opengl.org/registry/ */ -#define GL_GLEXT_VERSION 59 +#define GL_GLEXT_VERSION 66 /* Function declaration macros - to move into glplatform.h */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) @@ -774,7 +774,7 @@ extern "C" { /* Reuse tokens from ARB_copy_buffer */ /* reuse GL_COPY_READ_BUFFER */ /* reuse GL_COPY_WRITE_BUFFER */ -/* Would reuse tokens from ARB_draw_instanced, but it has none */ +/* Reuse tokens from ARB_draw_instanced (none) */ /* Reuse tokens from ARB_uniform_buffer_object */ /* reuse GL_UNIFORM_BUFFER */ /* reuse GL_UNIFORM_BUFFER_BINDING */ @@ -835,8 +835,8 @@ extern "C" { /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ /* Reuse tokens from ARB_depth_clamp */ /* reuse GL_DEPTH_CLAMP */ -/* Would reuse tokens from ARB_draw_elements_base_vertex, but it has none */ -/* Would reuse tokens from ARB_fragment_coord_conventions, but it has none */ +/* Reuse tokens from ARB_draw_elements_base_vertex (none) */ +/* Reuse tokens from ARB_fragment_coord_conventions (none) */ /* Reuse tokens from ARB_provoking_vertex */ /* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ /* reuse GL_FIRST_VERTEX_CONVENTION */ @@ -887,17 +887,18 @@ extern "C" { #endif #ifndef GL_VERSION_3_3 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE /* Reuse tokens from ARB_blend_func_extended */ /* reuse GL_SRC1_COLOR */ /* reuse GL_ONE_MINUS_SRC1_COLOR */ /* reuse GL_ONE_MINUS_SRC1_ALPHA */ /* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ -/* Would reuse tokens from ARB_explicit_attrib_location, but it has none */ +/* Reuse tokens from ARB_explicit_attrib_location (none) */ /* Reuse tokens from ARB_occlusion_query2 */ /* reuse GL_ANY_SAMPLES_PASSED */ /* Reuse tokens from ARB_sampler_objects */ /* reuse GL_SAMPLER_BINDING */ -/* Would reuse tokens from ARB_shader_bit_encoding, but it has none */ +/* Reuse tokens from ARB_shader_bit_encoding (none) */ /* Reuse tokens from ARB_texture_rgb10_a2ui */ /* reuse GL_RGB10_A2UI */ /* Reuse tokens from ARB_texture_swizzle */ @@ -914,6 +915,19 @@ extern "C" { #endif #ifndef GL_VERSION_4_0 +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +/* Reuse tokens from ARB_texture_query_lod (none) */ +/* Reuse tokens from ARB_draw_buffers_blend (none) */ /* Reuse tokens from ARB_draw_indirect */ /* reuse GL_DRAW_INDIRECT_BUFFER */ /* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ @@ -980,7 +994,7 @@ extern "C" { /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ /* reuse GL_TESS_EVALUATION_SHADER */ /* reuse GL_TESS_CONTROL_SHADER */ -/* Would reuse tokens from ARB_texture_buffer_object_rgb32, but it has none */ +/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ /* Reuse tokens from ARB_transform_feedback2 */ /* reuse GL_TRANSFORM_FEEDBACK */ /* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ @@ -991,6 +1005,48 @@ extern "C" { /* reuse GL_MAX_VERTEX_STREAMS */ #endif +#ifndef GL_VERSION_4_1 +/* Reuse tokens from ARB_ES2_compatibility */ +/* reuse GL_FIXED */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ +/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ +/* reuse GL_LOW_FLOAT */ +/* reuse GL_MEDIUM_FLOAT */ +/* reuse GL_HIGH_FLOAT */ +/* reuse GL_LOW_INT */ +/* reuse GL_MEDIUM_INT */ +/* reuse GL_HIGH_INT */ +/* reuse GL_SHADER_COMPILER */ +/* reuse GL_NUM_SHADER_BINARY_FORMATS */ +/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ +/* reuse GL_MAX_VARYING_VECTORS */ +/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ +/* Reuse tokens from ARB_get_program_binary */ +/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ +/* reuse GL_PROGRAM_BINARY_LENGTH */ +/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ +/* reuse GL_PROGRAM_BINARY_FORMATS */ +/* Reuse tokens from ARB_separate_shader_objects */ +/* reuse GL_VERTEX_SHADER_BIT */ +/* reuse GL_FRAGMENT_SHADER_BIT */ +/* reuse GL_GEOMETRY_SHADER_BIT */ +/* reuse GL_TESS_CONTROL_SHADER_BIT */ +/* reuse GL_TESS_EVALUATION_SHADER_BIT */ +/* reuse GL_ALL_SHADER_BITS */ +/* reuse GL_PROGRAM_SEPARABLE */ +/* reuse GL_ACTIVE_PROGRAM */ +/* reuse GL_PROGRAM_PIPELINE_BINDING */ +/* Reuse tokens from ARB_shader_precision (none) */ +/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ +/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ +/* reuse GL_MAX_VIEWPORTS */ +/* reuse GL_VIEWPORT_SUBPIXEL_BITS */ +/* reuse GL_VIEWPORT_BOUNDS_RANGE */ +/* reuse GL_LAYER_PROVOKING_VERTEX */ +/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ +/* reuse GL_UNDEFINED_VERTEX */ +#endif + #ifndef GL_ARB_multitexture #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 @@ -1785,22 +1841,21 @@ extern "C" { #endif #ifndef GL_ARB_draw_buffers_blend -//#define GL_@@@ 0x9110 #endif #ifndef GL_ARB_sample_shading -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_SAMPLE_SHADING_ARB 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 #endif #ifndef GL_ARB_texture_cube_map_array -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F #endif #ifndef GL_ARB_texture_gather @@ -1879,7 +1934,7 @@ extern "C" { #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_MAX_VERTEX_STREAMS 0x8E71 +/* reuse GL_MAX_VERTEX_STREAMS */ #endif #ifndef GL_ARB_gpu_shader_fp64 @@ -1967,6 +2022,122 @@ extern "C" { #ifndef GL_ARB_transform_feedback3 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#endif + +#ifndef GL_ARB_ES2_compatibility +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#endif + +#ifndef GL_ARB_shader_precision +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +/* reuse GL_RGB32I */ +/* reuse GL_DOUBLE_VEC2 */ +/* reuse GL_DOUBLE_VEC3 */ +/* reuse GL_DOUBLE_VEC4 */ +/* reuse GL_DOUBLE_MAT2 */ +/* reuse GL_DOUBLE_MAT3 */ +/* reuse GL_DOUBLE_MAT4 */ +/* reuse GL_DOUBLE_MAT2x3 */ +/* reuse GL_DOUBLE_MAT2x4 */ +/* reuse GL_DOUBLE_MAT3x2 */ +/* reuse GL_DOUBLE_MAT3x4 */ +/* reuse GL_DOUBLE_MAT4x2 */ +/* reuse GL_DOUBLE_MAT4x3 */ +#endif + +#ifndef GL_ARB_viewport_array +/* reuse GL_SCISSOR_BOX */ +/* reuse GL_VIEWPORT */ +/* reuse GL_DEPTH_RANGE */ +/* reuse GL_SCISSOR_TEST */ +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +/* reuse GL_FIRST_VERTEX_CONVENTION */ +/* reuse GL_LAST_VERTEX_CONVENTION */ +/* reuse GL_PROVOKING_VERTEX */ +#endif + +#ifndef GL_ARB_cl_event +#define GL_SYNC_CL_EVENT_ARB 0x8240 +#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 +#endif + +#ifndef GL_ARB_debug_output +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +#endif + +#ifndef GL_ARB_robustness +/* reuse GL_NO_ERROR */ +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + +#ifndef GL_ARB_shader_stencil_export #endif #ifndef GL_EXT_abgr @@ -3790,9 +3961,9 @@ extern "C" { #endif #ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A +#define GL_ELEMENT_ARRAY_APPLE 0x8A0C +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E #endif #ifndef GL_APPLE_fence @@ -3809,6 +3980,7 @@ extern "C" { #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CLIENT_APPLE 0x85B4 #define GL_STORAGE_CACHED_APPLE 0x85BE #define GL_STORAGE_SHARED_APPLE 0x85BF #endif @@ -4313,6 +4485,12 @@ extern "C" { #define GL_SEPARATE_ATTRIBS_NV 0x8C8D #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +#define GL_LAYER_NV 0x8DAA +#define GL_NEXT_BUFFER_NV -2 +#define GL_SKIP_COMPONENTS4_NV -3 +#define GL_SKIP_COMPONENTS3_NV -4 +#define GL_SKIP_COMPONENTS2_NV -5 +#define GL_SKIP_COMPONENTS1_NV -6 #endif #ifndef GL_EXT_bindable_uniform @@ -4650,6 +4828,9 @@ extern "C" { #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 +#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 +#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 +#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 #endif #ifndef GL_NV_texture_barrier @@ -4659,7 +4840,190 @@ extern "C" { #endif #ifndef GL_AMD_seamless_cubemap_per_texture -/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS_ARB */ +/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ +#endif + +#ifndef GL_AMD_conservative_depth +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 +#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A +#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B +#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C +#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D +#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E +#define GL_IMAGE_1D_EXT 0x904C +#define GL_IMAGE_2D_EXT 0x904D +#define GL_IMAGE_3D_EXT 0x904E +#define GL_IMAGE_2D_RECT_EXT 0x904F +#define GL_IMAGE_CUBE_EXT 0x9050 +#define GL_IMAGE_BUFFER_EXT 0x9051 +#define GL_IMAGE_1D_ARRAY_EXT 0x9052 +#define GL_IMAGE_2D_ARRAY_EXT 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 +#define GL_INT_IMAGE_1D_EXT 0x9057 +#define GL_INT_IMAGE_2D_EXT 0x9058 +#define GL_INT_IMAGE_3D_EXT 0x9059 +#define GL_INT_IMAGE_2D_RECT_EXT 0x905A +#define GL_INT_IMAGE_CUBE_EXT 0x905B +#define GL_INT_IMAGE_BUFFER_EXT 0x905C +#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D +#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C +#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D +#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 +#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 +#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +/* reuse GL_DOUBLE */ +#define GL_DOUBLE_VEC2_EXT 0x8FFC +#define GL_DOUBLE_VEC3_EXT 0x8FFD +#define GL_DOUBLE_VEC4_EXT 0x8FFE +#define GL_DOUBLE_MAT2_EXT 0x8F46 +#define GL_DOUBLE_MAT3_EXT 0x8F47 +#define GL_DOUBLE_MAT4_EXT 0x8F48 +#define GL_DOUBLE_MAT2x3_EXT 0x8F49 +#define GL_DOUBLE_MAT2x4_EXT 0x8F4A +#define GL_DOUBLE_MAT3x2_EXT 0x8F4B +#define GL_DOUBLE_MAT3x4_EXT 0x8F4C +#define GL_DOUBLE_MAT4x2_EXT 0x8F4D +#define GL_DOUBLE_MAT4x3_EXT 0x8F4E +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C +#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F +#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 +#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +/* reuse GL_PATCHES */ +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 +/* reuse GL_READ_WRITE */ +/* reuse GL_WRITE_ONLY */ +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 +#define GL_TESS_CONTROL_PROGRAM_NV 0x891E +#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F +#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 +#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +/* reuse GL_INT64_NV */ +/* reuse GL_UNSIGNED_INT64_NV */ +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_COVERAGE_SAMPLES_NV 0x80A9 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_DATA_BUFFER_AMD 0x9151 +#define GL_PERFORMANCE_MONITOR_AMD 0x9152 +#define GL_QUERY_OBJECT_AMD 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 +#define GL_SAMPLER_OBJECT_AMD 0x9155 +#endif + +#ifndef GL_AMD_debug_output +#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 +#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 +#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 +#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A +#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B +#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C +#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D +#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E +#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F +#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_SURFACE_STATE_NV 0x86EB +#define GL_SURFACE_REGISTERED_NV 0x86FD +#define GL_SURFACE_MAPPED_NV 0x8700 +#define GL_WRITE_DISCARD_NV 0x88BE +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E +#define GL_DEPTH_CLAMP_FAR_AMD 0x901F #endif @@ -4741,12 +5105,30 @@ typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; #endif -#ifndef ARB_sync +#ifndef GL_ARB_sync typedef int64_t GLint64; typedef uint64_t GLuint64; typedef struct __GLsync *GLsync; #endif +#ifndef GL_ARB_cl_event +/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ +struct _cl_context; +struct _cl_event; +#endif + +#ifndef GL_ARB_debug_output +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#endif + +#ifndef GL_AMD_debug_output +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#endif + +#ifndef GL_NV_vdpau_interop +typedef GLintptr GLvdpauSurfaceNV; +#endif + #ifndef GL_VERSION_1_2 #define GL_VERSION_1_2 1 #ifdef GL_GLEXT_PROTOTYPES @@ -4943,7 +5325,7 @@ typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); #define GL_VERSION_1_4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); @@ -4951,7 +5333,7 @@ GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); @@ -5091,7 +5473,7 @@ typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); @@ -5185,7 +5567,7 @@ GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); @@ -5448,12 +5830,10 @@ typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); #endif @@ -5469,18 +5849,49 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum atta /* ARB_texture_swizzle (no entry points) */ /* ARB_timer_query */ /* ARB_vertex_type_2_10_10_10_rev */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); #endif #ifndef GL_VERSION_4_0 #define GL_VERSION_4_0 1 /* OpenGL 4.0 also reuses entry points from these extensions: */ +/* ARB_texture_query_lod (no entry points) */ +/* ARB_draw_indirect */ /* ARB_gpu_shader5 (no entry points) */ /* ARB_gpu_shader_fp64 */ /* ARB_shader_subroutine */ /* ARB_tessellation_shader */ /* ARB_texture_buffer_object_rgb32 (no entry points) */ +/* ARB_texture_cube_map_array (no entry points) */ +/* ARB_texture_gather (no entry points) */ /* ARB_transform_feedback2 */ /* ARB_transform_feedback3 */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMinSampleShading (GLclampf value); +GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +/* OpenGL 4.1 also reuses entry points from these extensions: */ +/* ARB_ES2_compatibility */ +/* ARB_get_program_binary */ +/* ARB_separate_shader_objects */ +/* ARB_shader_precision (no entry points) */ +/* ARB_vertex_attrib_64bit */ +/* ARB_viewport_array */ #endif #ifndef GL_ARB_multitexture @@ -6303,23 +6714,23 @@ typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); #ifndef GL_ARB_draw_buffers_blend #define GL_ARB_draw_buffers_blend 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); +GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); #endif #ifndef GL_ARB_sample_shading #define GL_ARB_sample_shading 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLclampf value); +GLAPI void APIENTRY glMinSampleShadingARB (GLclampf value); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); #endif #ifndef GL_ARB_texture_cube_map_array @@ -6352,6 +6763,10 @@ typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); #endif +#ifndef GL_ARB_texture_compression_bptc +#define GL_ARB_texture_compression_bptc 1 +#endif + #ifndef GL_ARB_blend_func_extended #define GL_ARB_blend_func_extended 1 #ifdef GL_GLEXT_PROTOTYPES @@ -6362,13 +6777,21 @@ typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, G typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); #endif +#ifndef GL_ARB_explicit_attrib_location +#define GL_ARB_explicit_attrib_location 1 +#endif + +#ifndef GL_ARB_occlusion_query2 +#define GL_ARB_occlusion_query2 1 +#endif + #ifndef GL_ARB_sampler_objects #define GL_ARB_sampler_objects 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLenum unit, GLuint sampler); +GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); @@ -6378,12 +6801,12 @@ GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIfv (GLuint sampler, GLenum pname, GLfloat *params); +GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLenum unit, GLuint sampler); +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); @@ -6393,7 +6816,15 @@ typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum p typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_texture_rgb10_a2ui +#define GL_ARB_texture_rgb10_a2ui 1 +#endif + +#ifndef GL_ARB_texture_swizzle +#define GL_ARB_texture_swizzle 1 #endif #ifndef GL_ARB_timer_query @@ -6500,6 +6931,10 @@ typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); #endif +#ifndef GL_ARB_gpu_shader5 +#define GL_ARB_gpu_shader5 1 +#endif + #ifndef GL_ARB_gpu_shader_fp64 #define GL_ARB_gpu_shader_fp64 1 #ifdef GL_GLEXT_PROTOTYPES @@ -6521,23 +6956,6 @@ GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboole GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); @@ -6557,23 +6975,6 @@ typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei co typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); #endif #ifndef GL_ARB_shader_subroutine @@ -6608,6 +7009,10 @@ typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); #endif +#ifndef GL_ARB_texture_buffer_object_rgb32 +#define GL_ARB_texture_buffer_object_rgb32 1 +#endif + #ifndef GL_ARB_transform_feedback2 #define GL_ARB_transform_feedback2 1 #ifdef GL_GLEXT_PROTOTYPES @@ -6642,6 +7047,284 @@ typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); #endif +#ifndef GL_ARB_ES2_compatibility +#define GL_ARB_ES2_compatibility 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glReleaseShaderCompiler (void); +GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI void APIENTRY glDepthRangef (GLclampf n, GLclampf f); +GLAPI void APIENTRY glClearDepthf (GLclampf d); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLclampf d); +#endif + +#ifndef GL_ARB_get_program_binary +#define GL_ARB_get_program_binary 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +#endif + +#ifndef GL_ARB_separate_shader_objects +#define GL_ARB_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); +GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); +GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); +GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); +GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); +GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif + +#ifndef GL_ARB_vertex_attrib_64bit +#define GL_ARB_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +#endif + +#ifndef GL_ARB_viewport_array +#define GL_ARB_viewport_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); +GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); +GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); +GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); +GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +#endif + +#ifndef GL_ARB_cl_event +#define GL_ARB_cl_event 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +#endif + +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif + +#ifndef GL_ARB_robustness +#define GL_ARB_robustness 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); +GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +#endif + +#ifndef GL_ARB_shader_stencil_export +#define GL_ARB_shader_stencil_export 1 +#endif + #ifndef GL_EXT_abgr #define GL_EXT_abgr 1 #endif @@ -7453,10 +8136,10 @@ typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); #ifndef GL_EXT_multi_draw_arrays #define GL_EXT_multi_draw_arrays 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); #endif @@ -8089,8 +8772,8 @@ GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdoubl GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLuint count, const GLdouble *v); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLuint count, const GLfloat *v); +GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); @@ -8154,8 +8837,8 @@ typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint in typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); @@ -9279,11 +9962,12 @@ GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *att GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); @@ -9291,11 +9975,12 @@ typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, cons typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); #endif #ifndef GL_EXT_bindable_uniform @@ -9547,6 +10232,9 @@ GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); +GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); @@ -9573,6 +10261,23 @@ GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenu GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); @@ -9734,6 +10439,9 @@ typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); @@ -9760,6 +10468,23 @@ typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint frameb typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); #endif #ifndef GL_EXT_vertex_array_bgra @@ -9813,7 +10538,7 @@ GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsS GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); +GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); @@ -9825,7 +10550,7 @@ typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLs typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); +typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); @@ -10066,6 +10791,246 @@ typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); #define GL_AMD_seamless_cubemap_per_texture 1 #endif +#ifndef GL_AMD_conservative_depth +#define GL_AMD_conservative_depth 1 +#endif + +#ifndef GL_EXT_shader_image_load_store +#define GL_EXT_shader_image_load_store 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +#endif + +#ifndef GL_EXT_vertex_attrib_64bit +#define GL_EXT_vertex_attrib_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); +GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +#endif + +#ifndef GL_NV_gpu_program5 +#define GL_NV_gpu_program5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +#endif + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif + +#ifndef GL_NV_shader_buffer_store +#define GL_NV_shader_buffer_store 1 +#endif + +#ifndef GL_NV_tessellation_program5 +#define GL_NV_tessellation_program5 1 +#endif + +#ifndef GL_NV_vertex_attrib_integer_64bit +#define GL_NV_vertex_attrib_integer_64bit 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +#endif + +#ifndef GL_NV_multisample_coverage +#define GL_NV_multisample_coverage 1 +#endif + +#ifndef GL_AMD_name_gen_delete +#define GL_AMD_name_gen_delete 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +#endif + +#ifndef GL_AMD_debug_output +#define GL_AMD_debug_output 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +#endif + +#ifndef GL_NV_vdpau_interop +#define GL_NV_vdpau_interop 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +GLAPI void APIENTRY glVDPAUFiniNV (void); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +#endif + +#ifndef GL_AMD_transform_feedback3_lines_triangles +#define GL_AMD_transform_feedback3_lines_triangles 1 +#endif + +#ifndef GL_AMD_depth_clamp_separate +#define GL_AMD_depth_clamp_separate 1 +#endif + #ifdef __cplusplus } diff --git a/source/Irrlicht/glxext.h b/source/Irrlicht/glxext.h index ee369156..de6d9575 100644 --- a/source/Irrlicht/glxext.h +++ b/source/Irrlicht/glxext.h @@ -48,9 +48,9 @@ extern "C" { /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glxext.h last updated 2010/02/10 */ +/* glxext.h last updated 2010/08/06 */ /* Current version at http://www.opengl.org/registry/ */ -#define GLX_GLXEXT_VERSION 27 +#define GLX_GLXEXT_VERSION 32 #ifndef GLX_VERSION_1_3 #define GLX_WINDOW_BIT 0x00000001 @@ -124,11 +124,19 @@ extern "C" { #define GLX_SAMPLES_ARB 100001 #endif +#ifndef GLX_ARB_vertex_buffer_object +#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 +#endif + #ifndef GLX_ARB_fbconfig_float #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 +#endif + #ifndef GLX_ARB_create_context #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 @@ -143,6 +151,13 @@ extern "C" { #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 #endif +#ifndef GLX_ARB_create_context_robustness +#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 +#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 +#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 +#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 +#endif + #ifndef GLX_SGIS_multisample #define GLX_SAMPLE_BUFFERS_SGIS 100000 #define GLX_SAMPLES_SGIS 100001 @@ -403,6 +418,28 @@ extern "C" { #define GLX_FLIP_COMPLETE_INTEL 0x8182 #endif +#ifndef GLX_NV_multisample_coverage +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 +#endif + +#ifndef GLX_AMD_gpu_association +#define GLX_GPU_VENDOR_AMD 0x1F00 +#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 +#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 +#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 +#define GLX_GPU_RAM_AMD 0x21A3 +#define GLX_GPU_CLOCK_AMD 0x21A4 +#define GLX_GPU_NUM_PIPES_AMD 0x21A5 +#define GLX_GPU_NUM_SIMD_AMD 0x21A6 +#define GLX_GPU_NUM_RB_AMD 0x21A7 +#define GLX_GPU_NUM_SPI_AMD 0x21A8 +#endif + +#ifndef GLX_EXT_create_context_es2_profile +#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 +#endif + /*************************************************************/ @@ -547,6 +584,10 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam #define GLX_ARB_fbconfig_float 1 #endif +#ifndef GLX_ARB_framebuffer_sRGB +#define GLX_ARB_framebuffer_sRGB 1 +#endif + #ifndef GLX_ARB_create_context #define GLX_ARB_create_context 1 #ifdef GLX_GLXEXT_PROTOTYPES @@ -559,6 +600,10 @@ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBCo #define GLX_ARB_create_context_profile 1 #endif +#ifndef GLX_ARB_create_context_robustness +#define GLX_ARB_create_context_robustness 1 +#endif + #ifndef GLX_SGIS_multisample #define GLX_SGIS_multisample 1 #endif @@ -936,6 +981,10 @@ typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, #define GLX_INTEL_swap_event 1 #endif +#ifndef GLX_NV_multisample_coverage +#define GLX_NV_multisample_coverage 1 +#endif + #ifdef __cplusplus } diff --git a/source/Irrlicht/irrXML.cpp b/source/Irrlicht/irrXML.cpp index b31850e3..287e60a3 100644 --- a/source/Irrlicht/irrXML.cpp +++ b/source/Irrlicht/irrXML.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2009 Nikolaus Gebhardt +// Copyright (C) 2002-2011 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h diff --git a/source/Irrlicht/libpng/ANNOUNCE b/source/Irrlicht/libpng/ANNOUNCE index cefb26a9..0a71a8d8 100644 --- a/source/Irrlicht/libpng/ANNOUNCE +++ b/source/Irrlicht/libpng/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.4.3 - June 26, 2010 +Libpng 1.4.4 - September 23, 2010 This is a public release of libpng, intended for use in production codes. @@ -8,29 +8,55 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - libpng-1.4.3.tar.xz (LZMA-compressed, recommended) - libpng-1.4.3.tar.gz - libpng-1.4.3.tar.bz2 + libpng-1.4.4.tar.xz (LZMA-compressed, recommended) + libpng-1.4.4.tar.gz + libpng-1.4.4.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lpng143.zip - lpng143.7z + lpng144.zip + lpng144.7z Other information: - libpng-1.4.3-README.txt - libpng-1.4.3-LICENSE.txt + libpng-1.4.4-README.txt + libpng-1.4.4-LICENSE.txt -Changes since the last public release (1.4.2): - Added missing quotation marks in the aix block of configure.ac - The new "vstudio" project was missing from the zip and 7z distributions. - Rewrote png_process_IDAT_data to consistently treat extra data as warnings - and handle end conditions more cleanly. - Removed the now-redundant check for out-of-bounds new_row from example.c - Changed char *msg to PNG_CONST char *msg in pngrutil.c - Stop memory leak when reading a malformed sCAL chunk. +Changes since the last public release (1.4.3): + Removed extraneous new_push_process_row.c file. + Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 + Removed some newly-added TAB characters from pngpread.c. + Fixed some indentation in pngpread.c and pngrutil.c + Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) + Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') + Put "#ifndef PNG_EXTERN, #endif" around "#define PNG_EXTERN" in pngpriv.h + Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 + Moved the definition of png_snprintf() outside of the enclosing + #ifdef blocks in pngconf.h + Made a special case "#define PNGAPI" in pngconf.h for WATCOM. + Removed reference to cbuilder5/* from Makefile.in and Makefile.am + Updated the read macros and functions from 1.5.0beta38. + Updated projects/visualc71 so it can find scripts/pnglibconf.h + Removed unused png_mem_* defines from pngconf.h. + Correct use of _WINDOWS_ in pngconf.h + Don't try to use version-script with cygwin/mingw. + Revised contrib/gregbook to work under cygwin/mingw. + Updated prebuilt aclocal.m4 and ltmain.sh + Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) + Updated CMakelists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for + installing libpng in /usr/lib64 (Funda Wang). + Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* + Revised CMakeLists.txt to make symlinks instead of copies when installing. + Moved "#include pngusr.h" ahead of PNG_USER_PRIVATEBUILD test in pngconf.h + Eliminated a deprecated reference to png_ptr->io_ptr in pngtest.c + Eliminated new unnecessary #if tests regarding the sCAL chunk from pngrutil.c + Updated the xcode project to work with libpng-1.4.x and added iOS targets + for simulator and device (Philippe Hausler). + Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, + $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE + Rebuilt configure scripts with automake-1.11.1 instead of automake-1.11. + Removed unused mkinstalldirs file. Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/source/Irrlicht/libpng/CHANGES b/source/Irrlicht/libpng/CHANGES index be63e408..67c7b7fa 100644 --- a/source/Irrlicht/libpng/CHANGES +++ b/source/Irrlicht/libpng/CHANGES @@ -2610,6 +2610,76 @@ version 1.4.3rc03 [June 23, 2010] version 1.4.3 [June 26, 2010] Updated some of the "last changed" dates. +version 1.4.4beta01 [July 12, 2010] + Removed extraneous new_push_process_row.c file. + Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 + Removed some newly-added TAB characters from pngpread.c. + Fixed some indentation in pngpread.c and pngrutil.c + Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) + Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') + Put "#ifndef PNG_EXTERN, #endif" around "#define PNG_EXTERN" in pngpriv.h + +version 1.4.4beta02 [July 24, 2010] + Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 + Moved the definition of png_snprintf() outside of the enclosing + #ifdef blocks in pngconf.h + Added a special case typedef of png_longjmp_ptr for WATCOM. + +version 1.4.4beta03 [July 24, 2010] + Removed reference to cbuilder5/* from Makefile.in and Makefile.am + Eliminated the new special case typedef of png_longjmp_ptr for WATCOM + and made a special case "#define PNGAPI" in pngconf.h instead. + +version 1.4.4beta04 [July 31, 2010] + Updated the read macros and functions from 1.5.0beta38. + +version 1.4.4beta05 [August 6, 2010] + Updated projects/visualc71 so it can find scripts/pnglibconf.h + Removed unused png_mem_* defines from pngconf.h. + Correct use of _WINDOWS_ in pngconf.h + +version 1.4.4beta06 [August 11, 2010] + Don't try to use version-script with cygwin/mingw. + Revised contrib/gregbook to work under cygwin/mingw. + +version 1.4.4beta07 [August 26, 2010] + Updated prebuilt aclocal.m4 and ltmain.sh + Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) + Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for + installing libpng in /usr/lib64 (Funda Wang). + Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* + Revised CMakeLists.txt to make symlinks instead of copies when installing. + Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman) + Moved "#include pngusr.h" ahead of PNG_USER_PRIVATEBUILD test in pngconf.h + Eliminated a deprecated reference to png_ptr->io_ptr in pngtest.c + Eliminated new unnecessary #if tests regarding the sCAL chunk from pngrutil.c + +version 1.4.4beta08 [September 2, 2010] + Updated the xcode project to work with libpng-1.4.x and added iOS targets + for simulator and device (Philippe Hausler). + +version 1.4.4rc01 [September 10, 2010] + No changes. + +version 1.4.4rc02 [September 13, 2010] + Revised CMakeLists.txt (Philip Lowman). + +version 1.4.4rc03 [September 14, 2010] + Removed an extraneous close-double-quote from CMakeLists.txt + Eliminated another deprecated reference to png_ptr->io_ptr in pngtest.c + +version 1.4.4rc04 [September 16, 2010] + Fixed indentation and removed debugging message from CMakeLists.txt + Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, + $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE + +version 1.4.4rc05 [September 20, 2010] + Rebuilt configure scripts with automake-1.11.1 instead of automake-1.11. + Removed unused mkinstalldirs file. + +version 1.4.4 [September 23, 2010] + No changes. + Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement). diff --git a/source/Irrlicht/libpng/CMakeLists.txt b/source/Irrlicht/libpng/CMakeLists.txt index eb561c90..d86ef379 100644 --- a/source/Irrlicht/libpng/CMakeLists.txt +++ b/source/Irrlicht/libpng/CMakeLists.txt @@ -1,14 +1,19 @@ -cmake_minimum_required(VERSION 2.4.3) +cmake_minimum_required(VERSION 2.4.4) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING - "Choose the type of build, options are: - None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) - Debug - Release - RelWithDebInfo - MinSizeRel.") + if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # workaround CMake 2.4.x bug + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") + else() + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose the type of build, options are: + None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) + Debug + Release + RelWithDebInfo + MinSizeRel.") + endif() endif() project(libpng C) @@ -22,7 +27,7 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 4) -set(PNGLIB_RELEASE 3) +set(PNGLIB_RELEASE 4) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) @@ -101,7 +106,7 @@ set(CMAKE_DEBUG_POSTFIX "d") set(libpng_sources png.h pngconf.h - pngpriv.h + pngpriv.h png.c pngerror.c pngget.c @@ -167,6 +172,7 @@ if(PNG_SHARED) if(MSVC) # msvc does not append 'lib' - do it here to have consistent name set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib") + set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib") endif() target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY}) endif() @@ -179,6 +185,7 @@ if(PNG_STATIC) # msvc does not append 'lib' - do it here to have consistent name set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib") endif() + target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY}) endif() @@ -190,55 +197,116 @@ if(PNG_TESTS AND PNG_SHARED) # does not work with msvc due to png_lib_ver issue add_executable(pngtest ${pngtest_sources}) target_link_libraries(pngtest ${PNG_LIB_NAME}) - add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) + add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) endif() +# +# Set a variable with CMake code which: +# Creates a symlink from src to dest (if possible) or alternatively +# copies if different. +macro(_png_generate_symlink_code CODE SRC DEST) + if(WIN32 AND NOT CYGWIN) + set(_png_gsc_message "Copying ${SRC} to ${DEST} if needed") + set(_png_gsc_operation "copy_if_different") + else() + set(_png_gsc_message "Symlinking ${SRC} to ${DEST}") + set(_png_gsc_operation "create_symlink") + endif() + + set(${CODE} " + message(STATUS \"${_png_gsc_message}\") + execute_process(COMMAND \${CMAKE_COMMAND} -E ${_png_gsc_operation} + \"${SRC}\" \"${DEST}\") + ") +endmacro() # CREATE PKGCONFIG FILES # we use the same files like ./configure, so we have to set its vars +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) +endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX}) -set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(libdir ${CMAKE_INSTALL_LIBDIR}) set(includedir ${CMAKE_INSTALL_PREFIX}/include) +set(LIBS "-lz -lm") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) +_png_generate_symlink_code(PNG_PC_INSTALL_CODE ${PNGLIB_NAME}.pc libpng.pc) +install(CODE ${PNG_PC_INSTALL_CODE}) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in - ${CMAKE_CURRENT_BINARY_DIR}/libpng-config) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in - ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config) + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) +_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE ${PNGLIB_NAME}-config libpng-config) +install(CODE ${PNG_CONFIG_INSTALL_CODE}) # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 14.${PNGLIB_RELEASE}.1.4.3 +# VERSION 14.${PNGLIB_RELEASE}.1.4.4 VERSION 14.${PNGLIB_RELEASE}.0 SOVERSION 14 CLEAN_DIRECT_OUTPUT 1) endif() if(PNG_STATIC) - if(NOT WIN32) - # that's uncool on win32 - it overwrites our static import lib... + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. + if(NOT MSVC) set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME} CLEAN_DIRECT_OUTPUT 1) endif() endif() +# If CMake > 2.4.x, we set a variable used below to export +# targets to an export file. +# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2 +if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4) + set(PNG_EXPORT_RULE EXPORT libpng) +elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof + set(PNG_EXPORT_RULE EXPORT libpng) +endif() + # INSTALL if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) if(PNG_SHARED) install(TARGETS ${PNG_LIB_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + ${PNG_EXPORT_RULE} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # Create a symlink for libpng.dll.a => libpng14.dll.a on Cygwin + if(CYGWIN) + _png_generate_symlink_code(PNG_SHARED_IMPLIB_INSTALL_CODE + ${PNGLIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX} + libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}) + install(CODE ${PNG_SHARED_IMPLIB_INSTALL_CODE}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if(NOT WIN32) + _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE + ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} + libpng${CMAKE_SHARED_LIBRARY_SUFFIX}) + install(CODE ${PNG_SHARED_INSTALL_CODE}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif() + if(PNG_STATIC) install(TARGETS ${PNG_LIB_NAME_STATIC} - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + ${PNG_EXPORT_RULE} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(NOT WIN32 OR CYGWIN) + _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE + ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} + libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) + install(CODE ${PNG_STATIC_INSTALL_CODE}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif() endif() @@ -253,19 +321,28 @@ if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL ) endif() if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) # Install man pages - install(FILES libpng.3 libpngpf.3 DESTINATION man/man3) - install(FILES png.5 DESTINATION man/man5) + if(NOT PNG_MAN_DIR) + set(PNG_MAN_DIR "share/man") + endif() + install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) + install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) # Install pkg-config files install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc - DESTINATION lib/pkgconfig) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng-config + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc - DESTINATION lib/pkgconfig) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin) endif() +# On versions of CMake that support it, create an export file CMake +# users can include() to import our targets +if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL ) + install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) +endif() + # what's with libpng.txt and all the extra files? diff --git a/source/Irrlicht/libpng/INSTALL b/source/Irrlicht/libpng/INSTALL index 3e2c0386..7bfe5842 100644 --- a/source/Irrlicht/libpng/INSTALL +++ b/source/Irrlicht/libpng/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.4.3 - June 26, 2010 +Installing libpng version 1.4.4 - September 23, 2010 On Unix/Linux and similar systems, you can simply type @@ -46,7 +46,7 @@ to have access to the zlib.h and zconf.h include files that correspond to the version of zlib that's installed. You can rename the directories that you downloaded (they -might be called "libpng-1.4.3" or "libpng14" and "zlib-1.2.3" +might be called "libpng-1.4.4" or "libpng14" and "zlib-1.2.3" or "zlib123") so that you have directories called "zlib" and "libpng". Your directory structure should look like this: @@ -62,7 +62,7 @@ Your directory structure should look like this: configure.ac, configure, Makefile.am, Makefile.in, autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, libpng-config.in, aclocal.m4, config.h.in, config.sub, - depcomp, install-sh, mkinstalldirs, test-pngtest.sh + depcomp, install-sh, test-pngtest.sh contrib gregbook pngminim @@ -73,6 +73,7 @@ Your directory structure should look like this: cbuilder5 (Borland) visualc6 (msvc) visualc71 + vstudio xcode scripts makefile.* diff --git a/source/Irrlicht/libpng/LICENSE b/source/Irrlicht/libpng/LICENSE index 06ce0301..4766a874 100644 --- a/source/Irrlicht/libpng/LICENSE +++ b/source/Irrlicht/libpng/LICENSE @@ -10,8 +10,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are -Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +libpng versions 1.2.6, August 15, 2004, through 1.4.4, September 23, 2010, are +Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -June 26, 2010 +September 23, 2010 diff --git a/source/Irrlicht/libpng/README b/source/Irrlicht/libpng/README index 4cf825fd..5d355519 100644 --- a/source/Irrlicht/libpng/README +++ b/source/Irrlicht/libpng/README @@ -1,4 +1,4 @@ -README for libpng version 1.4.3 - June 26, 2010 (shared library 14.0) +README for libpng version 1.4.4 - September 23, 2010 (shared library 14.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -185,9 +185,9 @@ Files in this distribution: makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng14.so.14.1.4.3) + (gcc, creates libpng14.so.14.1.4.4) makefile.linux => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.3) + (gcc, creates libpng14.so.14.1.4.4) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with ansi2knr (Requires ansi2knr.c from @@ -209,12 +209,12 @@ Files in this distribution: makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sggcc => Silicon Graphics - (gcc, creates libpng14.so.14.1.4.3) + (gcc, creates libpng14.so.14.1.4.4) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng14.so.14.1.4.3) + (gcc, creates libpng14.so.14.1.4.4) makefile.so9 => Solaris 9 makefile - (gcc, creates libpng14.so.14.1.4.3) + (gcc, creates libpng14.so.14.1.4.4) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc diff --git a/source/Irrlicht/libpng/configure b/source/Irrlicht/libpng/configure index 7027f28d..e3c2aa71 100644 --- a/source/Irrlicht/libpng/configure +++ b/source/Irrlicht/libpng/configure @@ -1,13 +1,13 @@ #!/bin/sh echo " There is no \"configure\" script in this distribution of - libpng-1.4.3. + libpng-1.4.4. Instead, please copy the appropriate makefile for your system from the \"scripts\" directory. Read the INSTALL file for more details. Update, July 2004: you can get a \"configure\" based distribution from the libpng distribution sites. Download the file - libpng-1.4.3.tar.gz, libpng-1.4.3.tar.xz, or libpng-1.4.3.tar.bz2 + libpng-1.4.4.tar.gz, libpng-1.4.4.tar.xz, or libpng-1.4.4.tar.bz2 " diff --git a/source/Irrlicht/libpng/contrib/gregbook/README b/source/Irrlicht/libpng/contrib/gregbook/README index a5072b4d..10f6fdb0 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/README +++ b/source/Irrlicht/libpng/contrib/gregbook/README @@ -165,7 +165,7 @@ RUNNING THE PROGRAMS: (VERY) BRIEF INTRO rpng is a simple PNG viewer that can display transparent PNGs with a specified background color; for example, - rpng -bgcolor #ff0000 toucan.png + rpng -bgcolor \#ff0000 toucan.png would display the image with a red background. rpng2 is a progressive viewer that simulates a web browser in some respects; it can display diff --git a/source/Irrlicht/libpng/contrib/gregbook/readpng2.c b/source/Irrlicht/libpng/contrib/gregbook/readpng2.c index 26acee57..a4d75bb9 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/readpng2.c +++ b/source/Irrlicht/libpng/contrib/gregbook/readpng2.c @@ -138,7 +138,7 @@ int readpng2_init(mainprog_info *mainprog_ptr) * version recognizes more chunks, add them to this list. If a * future version of readpng2.c recognizes more chunks, delete them * from this list. */ - static const png_byte chunks_to_ignore[] = { + static /* const */ png_byte chunks_to_ignore[] = { 99, 72, 82, 77, '\0', /* cHRM */ 104, 73, 83, 84, '\0', /* hIST */ 105, 67, 67, 80, '\0', /* iCCP */ diff --git a/source/Irrlicht/libpng/contrib/gregbook/rpng-win.c b/source/Irrlicht/libpng/contrib/gregbook/rpng-win.c index 5d3eb893..1c22282c 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/rpng-win.c +++ b/source/Irrlicht/libpng/contrib/gregbook/rpng-win.c @@ -85,7 +85,33 @@ #include #include #include +#ifdef __CYGWIN__ +/* getch replacement. Turns out, we don't really need this, + * but leave it here if we ever enable any of the uses of + * _getch in the main code + */ +#include +#include +#include +int repl_getch( void ) +{ + char ch; + int fd = fileno(stdin); + struct termio old_tty, new_tty; + + ioctl(fd, TCGETA, &old_tty); + new_tty = old_tty; + new_tty.c_lflag &= ~(ICANON | ECHO | ISIG); + ioctl(fd, TCSETA, &new_tty); + fread(&ch, 1, sizeof(ch), stdin); + ioctl(fd, TCSETA, &old_tty); + + return ch; +} +#define _getch repl_getch +#else #include /* only for _getch() */ +#endif /* #define DEBUG : this enables the Trace() macros */ @@ -153,7 +179,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) filename = (char *)NULL; - +#ifndef __CYGWIN__ /* First reenable console output, which normally goes to the bit bucket * for windowed apps. Closing the console window will terminate the * app. Thanks to David.Geldreich@realviz.com for supplying the magical @@ -162,6 +188,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) AllocConsole(); freopen("CONOUT$", "a", stderr); freopen("CONOUT$", "a", stdout); +#endif /* Next set the default value for our display-system exponent, i.e., @@ -279,7 +306,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) /* print usage screen if any errors up to this point */ if (error) { +#ifndef __CYGWIN__ int ch; +#endif fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); readpng_version_info(); @@ -293,11 +322,15 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" "\t\t used with transparent images\n" "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" +#ifndef __CYGWIN__ "Press Q or Esc to quit this usage screen.\n" +#endif "\n", PROGNAME, default_display_exponent); +#ifndef __CYGWIN__ do ch = _getch(); while (ch != 'q' && ch != 'Q' && ch != 0x1B); +#endif exit(1); } @@ -333,18 +366,24 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) if (error) { +#ifndef __CYGWIN__ int ch; +#endif fprintf(stderr, PROGNAME ": aborting.\n"); +#ifndef __CYGWIN__ do ch = _getch(); while (ch != 'q' && ch != 'Q' && ch != 0x1B); +#endif exit(2); } else { fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); +#ifndef __CYGWIN__ fprintf(stderr, "\n [console window: closing this window will terminate %s]\n\n", PROGNAME); +#endif } @@ -417,7 +456,12 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) /* wait for the user to tell us when to quit */ printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); +#ifndef __CYGWIN__ + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n" +#else + "Done. Press mouse button 1 (within image window) to quit.\n" +#endif + ); fflush(stdout); while (GetMessage(&msg, NULL, 0, 0)) { diff --git a/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c b/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c index 7824c41f..1859556d 100644 --- a/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c +++ b/source/Irrlicht/libpng/contrib/gregbook/rpng2-win.c @@ -96,7 +96,33 @@ #include #include /* only for PvdM background code */ #include +#ifdef __CYGWIN__ +/* getch replacement. Turns out, we don't really need this, + * but leave it here if we ever enable any of the uses of + * _getch in the main code + */ +#include +#include +#include +int repl_getch( void ) +{ + char ch; + int fd = fileno(stdin); + struct termio old_tty, new_tty; + + ioctl(fd, TCGETA, &old_tty); + new_tty = old_tty; + new_tty.c_lflag &= ~(ICANON | ECHO | ISIG); + ioctl(fd, TCSETA, &new_tty); + fread(&ch, 1, sizeof(ch), stdin); + ioctl(fd, TCSETA, &old_tty); + + return ch; +} +#define _getch repl_getch +#else #include /* only for _getch() */ +#endif /* all for PvdM background code: */ #ifndef PI @@ -270,7 +296,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) filename = (char *)NULL; memset(&rpng2_info, 0, sizeof(mainprog_info)); - +#ifndef __CYGWIN__ /* Next reenable console output, which normally goes to the bit bucket * for windowed apps. Closing the console window will terminate the * app. Thanks to David.Geldreich@realviz.com for supplying the magical @@ -279,7 +305,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) AllocConsole(); freopen("CONOUT$", "a", stderr); freopen("CONOUT$", "a", stdout); - +#endif /* Set the default value for our display-system exponent, i.e., the * product of the CRT exponent and the exponent corresponding to @@ -413,7 +439,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) /* print usage screen if any errors up to this point */ if (error) { +#ifndef __CYGWIN__ int ch; +#endif fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); readpng2_version_info(); @@ -432,16 +460,23 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) " -timing\tenables delay for every block read, to simulate modem\n" "\t\t download of image (~36 Kbps)\n" "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" +#ifndef __CYGWIN__ "Press Q or Esc to quit this usage screen. ", +#else + , +#endif PROGNAME, -#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) +#if (defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)) && \ + !(defined(__CYGWIN__) || defined(__MINGW32__)) (int)strlen(PROGNAME), " ", #endif (int)strlen(PROGNAME), " ", default_display_exponent, num_bgpat); fflush(stderr); +#ifndef __CYGWIN__ do ch = _getch(); while (ch != 'q' && ch != 'Q' && ch != 0x1B); +#endif exit(1); } @@ -478,18 +513,24 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) if (error) { +#ifndef __CYGWIN__ int ch; +#endif fprintf(stderr, PROGNAME ": aborting.\n"); +#ifndef __CYGWIN__ do ch = _getch(); while (ch != 'q' && ch != 'Q' && ch != 0x1B); +#endif exit(2); } else { fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); +#ifndef __CYGWIN__ fprintf(stderr, "\n [console window: closing this window will terminate %s]\n\n", PROGNAME); +#endif fflush(stderr); } @@ -1132,7 +1173,12 @@ static void rpng2_win_finish_display() rpng2_info.state = kDone; printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); +#ifndef __CYGWIN__ + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n" +#else + "Done. Press mouse button 1 (within image window) to quit.\n" +#endif + ); fflush(stdout); } diff --git a/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h b/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h index ed10ea88..8d8d8ff1 100644 --- a/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h +++ b/source/Irrlicht/libpng/contrib/pngminim/decoder/pngusr.h @@ -12,10 +12,6 @@ #ifndef MINRDPNGCONF_H #define MINRDPNGCONF_H -#ifdef NJET - /* No 16-bit support beyond reading with strip_16 */ -#endif - #define PNG_NO_WARNINGS #define png_warning(s1,s2) "" #define png_chunk_warning(s1,s2) "" diff --git a/source/Irrlicht/libpng/libpng-1.4.3.txt b/source/Irrlicht/libpng/libpng-1.4.4.txt similarity index 97% rename from source/Irrlicht/libpng/libpng-1.4.3.txt rename to source/Irrlicht/libpng/libpng-1.4.4.txt index f1eefbbb..5a16b69c 100644 --- a/source/Irrlicht/libpng/libpng-1.4.3.txt +++ b/source/Irrlicht/libpng/libpng-1.4.4.txt @@ -1,9 +1,9 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.4.3 - June 26, 2010 + libpng version 1.4.4 - September 23, 2010 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2009 Glenn Randers-Pehrson + Copyright (c) 1998-2010 Glenn Randers-Pehrson This document is released under the libpng license. For conditions of distribution and use, see the disclaimer @@ -11,9 +11,9 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010 + libpng versions 0.97, January 1998, through 1.4.4 - September 23, 2010 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2009 Glenn Randers-Pehrson + Copyright (c) 1998-2010 Glenn Randers-Pehrson libpng 1.0 beta 6 version 0.96 May 28, 1997 Updated and distributed by Andreas Dilger @@ -903,7 +903,7 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. -As of libpng version 1.4.3, not all possible expansions are supported. +As of libpng version 1.4.4, not all possible expansions are supported. In the following table, the 01 means grayscale with depth<8, 31 means indexed with depth<8, other numerals represent the color type, "T" means @@ -3297,13 +3297,13 @@ Other rules can be inferred by inspecting the libpng source. XIII. Y2K Compliance in libpng -June 26, 2010 +September 23, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.4.3 are Y2K compliant. It is my belief that earlier +upward through 1.4.4 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that diff --git a/source/Irrlicht/libpng/libpng.3 b/source/Irrlicht/libpng/libpng.3 index 049df515..4e918b70 100644 --- a/source/Irrlicht/libpng/libpng.3 +++ b/source/Irrlicht/libpng/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "June 26, 2010" +.TH LIBPNG 3 "September 23, 2010" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.4.3 +libpng \- Portable Network Graphics (PNG) Reference Library 1.4.4 .SH SYNOPSIS \fI\fB @@ -785,10 +785,10 @@ Following is a copy of the libpng.txt file that accompanies libpng. .SH LIBPNG.TXT libpng.txt - A description on how to use and modify libpng - libpng version 1.4.3 - June 26, 2010 + libpng version 1.4.4 - September 23, 2010 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2009 Glenn Randers-Pehrson + Copyright (c) 1998-2010 Glenn Randers-Pehrson This document is released under the libpng license. For conditions of distribution and use, see the disclaimer @@ -796,9 +796,9 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010 + libpng versions 0.97, January 1998, through 1.4.4 - September 23, 2010 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2009 Glenn Randers-Pehrson + Copyright (c) 1998-2010 Glenn Randers-Pehrson libpng 1.0 beta 6 version 0.96 May 28, 1997 Updated and distributed by Andreas Dilger @@ -1688,7 +1688,7 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. -As of libpng version 1.4.3, not all possible expansions are supported. +As of libpng version 1.4.4, not all possible expansions are supported. In the following table, the 01 means grayscale with depth<8, 31 means indexed with depth<8, other numerals represent the color type, "T" means @@ -4082,13 +4082,13 @@ Other rules can be inferred by inspecting the libpng source. .SH XIII. Y2K Compliance in libpng -June 26, 2010 +September 23, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.4.3 are Y2K compliant. It is my belief that earlier +upward through 1.4.4 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that @@ -4272,6 +4272,8 @@ the first widely used release: 1.4.3beta01-05 14 10403 14.so.14.3[.0] 1.4.3rc01-03 14 10403 14.so.14.3[.0] 1.4.3 14 10403 14.so.14.3[.0] + 1.4.4beta01-08 14 10404 14.so.14.4[.0] + 1.4.4rc01-06 14 10404 14.so.14.4[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -4284,7 +4286,7 @@ version 1.0.6j; from then on they were given the upcoming public release number plus "betaNN" or "rcN". .SH "SEE ALSO" -libpngpf(3), png(5) +.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .LP .IR libpng : .IP @@ -4327,7 +4329,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.4.3 - June 26, 2010: +Libpng version 1.4.4 - September 23, 2010: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -4350,7 +4352,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are +libpng versions 1.2.6, August 15, 2004, through 1.4.4, September 23, 2010, are Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -4449,7 +4451,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -June 26, 2010 +September 23, 2010 .\" end of man page diff --git a/source/Irrlicht/libpng/libpngpf.3 b/source/Irrlicht/libpng/libpngpf.3 index d627b956..b6035d12 100644 --- a/source/Irrlicht/libpng/libpngpf.3 +++ b/source/Irrlicht/libpng/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "June 26, 2010" +.TH LIBPNGPF 3 "September 23, 2010" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.4.3 +libpng \- Portable Network Graphics (PNG) Reference Library 1.4.4 (private functions) .SH SYNOPSIS \fB#include \fP @@ -803,6 +803,6 @@ are listed alphabetically here as an aid to libpng maintainers. See png.h for more information on these functions. .SH SEE ALSO -libpng(3), png(5) +.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .SH AUTHOR Glenn Randers-Pehrson diff --git a/source/Irrlicht/libpng/new_push_process_row.c b/source/Irrlicht/libpng/new_push_process_row.c deleted file mode 100644 index 8f4ef721..00000000 --- a/source/Irrlicht/libpng/new_push_process_row.c +++ /dev/null @@ -1,204 +0,0 @@ -void /* PRIVATE */ -png_push_process_row(png_structp png_ptr) -{ - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->iwidth; - png_ptr->row_info.channels = png_ptr->channels; - png_ptr->row_info.bit_depth = png_ptr->bit_depth; - png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; - - png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth, - png_ptr->row_info.width); - - png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); - - png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); - - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) - png_do_read_transformations(png_ptr); - -#ifdef PNG_READ_INTERLACING_SUPPORTED - /* Blow up interlaced rows to full size */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - if (png_ptr->pass < 6) -/* old interface (pre-1.0.9): - png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - */ - png_do_read_interlace(png_ptr); - - switch (png_ptr->pass) - { - case 0: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 0; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); /* Updates png_ptr->pass */ - } - - if (png_ptr->pass == 2) /* Pass 1 might be empty */ - { - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - - if (png_ptr->pass == 4 && png_ptr->height <= 4) - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - - if (png_ptr->pass == 6 && png_ptr->height <= 4) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - - break; - } - - case 1: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 1; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - - if (png_ptr->pass == 2) /* Skip top 4 generated rows */ - { - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - - break; - } - - case 2: - { - int i; - - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - - if (png_ptr->pass == 4) /* Pass 3 might be empty */ - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - - break; - } - - case 3: - { - int i; - - for (i = 0; i < 4 && png_ptr->pass == 3; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - - if (png_ptr->pass == 4) /* Skip top two generated rows */ - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - - break; - } - - case 4: - { - int i; - - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - - if (png_ptr->pass == 6) /* Pass 5 might be empty */ - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - - break; - } - - case 5: - { - int i; - - for (i = 0; i < 2 && png_ptr->pass == 5; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - - if (png_ptr->pass == 6) /* Skip top generated row */ - { - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - - break; - } - case 6: - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - - if (png_ptr->pass != 6) - break; - - png_push_have_row(png_ptr, NULL); - png_read_push_finish_row(png_ptr); - } - } - } - else -#endif - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } -} diff --git a/source/Irrlicht/libpng/png.5 b/source/Irrlicht/libpng/png.5 index ea219b92..36fe7394 100644 --- a/source/Irrlicht/libpng/png.5 +++ b/source/Irrlicht/libpng/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "June 26, 2010" +.TH PNG 5 "September 23, 2010" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION @@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous platforms. .SH "SEE ALSO" -.IR libpng(3), zlib(3), deflate(5), and zlib(5) +.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .LP PNG specification (second edition), November 2003: .IP diff --git a/source/Irrlicht/libpng/png.c b/source/Irrlicht/libpng/png.c index 239615da..4b027649 100644 --- a/source/Irrlicht/libpng/png.c +++ b/source/Irrlicht/libpng/png.c @@ -17,7 +17,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_3 Your_png_h_is_not_version_1_4_3; +typedef version_1_4_4 Your_png_h_is_not_version_1_4_4; /* Version information for C files. This had better match the version * string defined in png.h. @@ -551,13 +551,13 @@ png_get_copyright(png_structp png_ptr) #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.4.3 - June 26, 2010" PNG_STRING_NEWLINE \ + "libpng version 1.4.4 - September 23, 2010" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE); #else - return ((png_charp) "libpng version 1.4.3 - June 26, 2010\ + return ((png_charp) "libpng version 1.4.4 - September 23, 2010\ Copyright (c) 1998-2010 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); diff --git a/source/Irrlicht/libpng/png.h b/source/Irrlicht/libpng/png.h index ef6dc8e4..f46e97ce 100644 --- a/source/Irrlicht/libpng/png.h +++ b/source/Irrlicht/libpng/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.4.3 - June 26, 2010 + * libpng version 1.4.4 - September 23, 2010 * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -11,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010: Glenn + * libpng versions 0.97, January 1998, through 1.4.4 - September 23, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -145,6 +145,8 @@ * 1.4.3beta01-05 14 10403 14.so.14.3[.0] * 1.4.3rc01-03 14 10403 14.so.14.3[.0] * 1.4.3 14 10403 14.so.14.3[.0] + * 1.4.4beta01-08 14 10404 14.so.14.4[.0] + * 1.4.4rc01-06 14 10404 14.so.14.4[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -176,7 +178,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are + * libpng versions 1.2.6, August 15, 2004, through 1.4.4, September 23, 2010, are * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: @@ -288,13 +290,13 @@ * Y2K compliance in libpng: * ========================= * - * June 26, 2010 + * September 23, 2010 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.4.3 are Y2K compliant. It is my belief that earlier + * upward through 1.4.4 are Y2K compliant. It is my belief that earlier * versions were also Y2K compliant. * * Libpng only has three year fields. One is a 2-byte unsigned integer @@ -350,9 +352,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.4.3" +#define PNG_LIBPNG_VER_STRING "1.4.4" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.4.3 - June 26, 2010\n" + " libpng version 1.4.4 - September 23, 2010\n" #define PNG_LIBPNG_VER_SONUM 14 #define PNG_LIBPNG_VER_DLLNUM 14 @@ -360,7 +362,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 4 -#define PNG_LIBPNG_VER_RELEASE 3 +#define PNG_LIBPNG_VER_RELEASE 4 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ @@ -390,7 +392,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10403 /* 1.4.3 */ +#define PNG_LIBPNG_VER 10404 /* 1.4.4 */ #ifndef PNG_VERSION_INFO_ONLY /* Include the compression library's header */ @@ -1474,7 +1476,7 @@ struct png_struct_def /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef png_structp version_1_4_3; +typedef png_structp version_1_4_4; typedef png_struct FAR * FAR * png_structpp; @@ -1485,12 +1487,12 @@ typedef png_struct FAR * FAR * png_structpp; */ /* Returns the version number of the library */ -extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); +PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); /* Tell lib we have already handled the first magic bytes. * Handling more than 8 bytes from the beginning of the file is an error. */ -extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, int num_bytes)); /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a @@ -1498,7 +1500,7 @@ extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ -extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, +PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling @@ -1507,19 +1509,19 @@ extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, #define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n)) /* Allocate and initialize png_ptr struct for reading, and any other memory. */ -extern PNG_EXPORT(png_structp,png_create_read_struct) +PNG_EXPORT(png_structp,png_create_read_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; /* Allocate and initialize png_ptr struct for writing, and any other memory */ -extern PNG_EXPORT(png_structp,png_create_write_struct) +PNG_EXPORT(png_structp,png_create_write_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; -extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size) +PNG_EXPORT(png_size_t,png_get_compression_buffer_size) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_compression_buffer_size) +PNG_EXPORT(void,png_set_compression_buffer_size) PNGARG((png_structp png_ptr, png_size_t size)); /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp @@ -1533,7 +1535,7 @@ extern PNG_EXPORT(void,png_set_compression_buffer_size) * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ -extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) +PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); # define png_jmpbuf(png_ptr) \ @@ -1545,170 +1547,170 @@ extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) #ifdef PNG_READ_SUPPORTED /* Reset the compression stream */ -extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); +PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); #endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_structp,png_create_read_struct_2) +PNG_EXPORT(png_structp,png_create_read_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; -extern PNG_EXPORT(png_structp,png_create_write_struct_2) +PNG_EXPORT(png_structp,png_create_write_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; #endif /* Write the PNG file signature. */ -extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr)); /* Write a PNG chunk - size, type, (optional) data, CRC. */ -extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ -extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, png_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ -extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); /* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); /* Allocate and initialize the info structure */ -extern PNG_EXPORT(png_infop,png_create_info_struct) +PNG_EXPORT(png_infop,png_create_info_struct) PNGARG((png_structp png_ptr)) PNG_ALLOCATED; -extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, +PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, png_size_t png_info_struct_size)); /* Writes all the PNG information before the image. */ -extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ -extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED -extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) +PNG_EXPORT(png_charp,png_convert_to_rfc1123) PNGARG((png_structp png_ptr, png_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ -extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, +PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, struct tm FAR * ttime)); /* Convert from time_t to png_time. Uses gmtime() */ -extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, +PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, time_t ttime)); #endif /* PNG_CONVERT_tIME_SUPPORTED */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ -extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp +PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ -extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ -extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, int error_action, double red, double green )); #endif -extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green )); -extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp +PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp png_ptr)); #endif -extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, +PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, png_colorp palette)); #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ #define PNG_FILLER_BEFORE 0 #define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, png_uint_32 filler, int flags)); #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swap bytes in 16-bit depth files. */ -extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ -extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ -extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) /* Converts files to legal bit depths. */ -extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, png_color_8p true_bits)); #endif #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) /* Have the code handle the interlacing. Returns the number of passes. */ -extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); +PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) /* Invert monochrome files */ -extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)); #endif @@ -1720,14 +1722,14 @@ extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, #ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip the second byte of information from a 16-bit depth file. */ -extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED /* Turn on quantizing, and reduce the palette to the number of colors * available. Prior to libpng-1.4.2, this was png_set_dither(). */ -extern PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_quantize)); #endif @@ -1737,7 +1739,7 @@ extern PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, #ifdef PNG_READ_GAMMA_SUPPORTED /* Handle gamma correction. Screen_gamma=(display_exponent) */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, double screen_gamma, double default_file_gamma)); #endif #endif @@ -1745,73 +1747,73 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, #ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ -extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); +PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); /* Flush the current PNG output buffer */ -extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); #endif /* Optional update palette with requested transformations */ -extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); +PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); /* Optional call to update the users info structure */ -extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ -extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ -extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, png_bytep row, png_bytep display_row)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ -extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, png_bytepp image)); #endif /* Write a row of image data */ -extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, png_bytep row)); /* Write a few rows of image data */ -extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)); /* Write the image data */ -extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, png_bytepp image)); /* Write the end of the PNG file. */ -extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ -extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* Free any memory associated with the png_info_struct */ -extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp +PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_write_struct) +PNG_EXPORT(void,png_destroy_write_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* Set the libpng method of handling chunk CRC errors */ -extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, int crit_action, int ancil_action)); /* Values for png_set_crc_action() to say how to handle CRC errors in @@ -1841,7 +1843,7 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, /* Set the filtering method(s) used by libpng. Currently, the only valid * value for "method" is 0. */ -extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, +PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, int filters)); /* Flags for png_set_filter() to say which filters to use. The flags @@ -1898,7 +1900,7 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, * to the UNWEIGHTED method, but with added encoding time/computation. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, png_doublep filter_costs)); #endif @@ -1919,19 +1921,19 @@ extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ -extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, int level)); -extern PNG_EXPORT(void,png_set_compression_mem_level) +PNG_EXPORT(void,png_set_compression_mem_level) PNGARG((png_structp png_ptr, int mem_level)); -extern PNG_EXPORT(void,png_set_compression_strategy) +PNG_EXPORT(void,png_set_compression_strategy) PNGARG((png_structp png_ptr, int strategy)); -extern PNG_EXPORT(void,png_set_compression_window_bits) +PNG_EXPORT(void,png_set_compression_window_bits) PNGARG((png_structp png_ptr, int window_bits)); -extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, int method)); /* These next functions are called for input/output, memory, and error @@ -1945,7 +1947,7 @@ extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); #endif @@ -1957,11 +1959,11 @@ extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, * default function will be used. */ -extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ -extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); /* Replace the default data output functions with a user supplied one(s). * If buffered output is not used, then output_flush_fn can be set to NULL. @@ -1973,54 +1975,54 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); * default flush function, which uses the standard *FILE structure, will * be used. */ -extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ -extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ -extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, png_read_status_ptr read_row_fn)); -extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ -extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ -extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp +PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp +PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp +PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ -extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr) +PNG_EXPORT(png_voidp,png_get_user_transform_ptr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); -extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp +PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp png_ptr)); #endif @@ -2028,45 +2030,45 @@ extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ -extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); /* Returns the user pointer associated with the push read functions */ -extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) +PNG_EXPORT(png_voidp,png_get_progressive_ptr) PNGARG((png_structp png_ptr)); /* Function to be called when data becomes available */ -extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); /* Function that combines rows. Not very much different than the * png_combine_row() call. Is this even used????? */ -extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, png_bytep old_row, png_bytep new_row)); #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Added at libpng version 1.4.0 */ -extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Added at libpng version 1.2.4 */ -extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Frees a pointer allocated by png_malloc() */ -extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); +PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); /* Free data that was allocated internally */ -extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); /* Reassign responsibility for freeing existing data, whether allocated * by libpng or by the application */ -extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 @@ -2088,45 +2090,45 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; -extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, png_voidp ptr)); #endif #ifndef PNG_NO_ERROR_TEXT /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, png_const_charp error_message)) PNG_NORETURN; /* The same, but the chunk name is prepended to the error string. */ -extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, png_const_charp error_message)) PNG_NORETURN; #else /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; +PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; #endif /* Non-fatal error in libpng. Can continue, but may have a problem. */ -extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); /* Non-fatal error in libpng, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); #ifdef PNG_BENIGN_ERRORS_SUPPORTED /* Benign error in libpng. Can continue, but may have a problem. * User can choose whether to handle as a fatal error or as a warning. */ -extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr, png_const_charp warning_message)); /* Same, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr, png_const_charp warning_message)); -extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp +PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp png_ptr, int allowed)); #endif @@ -2143,108 +2145,108 @@ extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp * png_info_struct. */ /* Returns "flag" if chunk data is valid in info_ptr. */ -extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ -extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Set row_pointers, which is an array of pointers to scanlines for use * by png_write_png(). */ -extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)); #endif /* Returns number of color channels in image. */ -extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp +PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image height in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp +PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image bit_depth. */ -extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp +PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image color_type. */ -extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp +PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image filter_type. */ -extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp +PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image interlace_type. */ -extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp +PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image compression_type. */ -extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp +PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ -extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp +PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp +PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp +PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns pixel aspect ratio, computed from pHYs chunk data. */ #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp +PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ -extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp +PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp +PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp +PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp +PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* PNG_EASY_ACCESS_SUPPORTED */ /* Returns pointer to signature string read from PNG header */ -extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double *white_x, double *white_y, double *red_x, double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point @@ -2254,12 +2256,12 @@ extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, @@ -2269,131 +2271,131 @@ extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double *file_gamma)); #endif -extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma)); #endif #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double file_gamma)); #endif -extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)); #endif -extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method)); -extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_method, int compression_method, int filter_method)); #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif -extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette)); -extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)); #endif #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int *intent)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); -extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen)); /* Note to maintainer: profile should be png_bytepp */ #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)); /* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ -extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text)); #endif @@ -2405,28 +2407,28 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, */ #ifdef PNG_TEXT_SUPPORTED -extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep mod_time)); #endif #ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep trans_alpha, int num_trans, png_color_16p trans_color)); #endif @@ -2436,11 +2438,11 @@ extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, +PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); #endif #endif @@ -2448,11 +2450,11 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, +PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); #endif #endif @@ -2468,17 +2470,17 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, = 2: keep only if safe-to-copy = 3: keep even if unsafe-to-copy */ -extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp +PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks)); PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep chunk_name)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, +PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); -extern PNG_EXPORT(void, png_set_unknown_chunk_location) +PNG_EXPORT(void, png_set_unknown_chunk_location) PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp +PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); #endif @@ -2486,29 +2488,29 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp * If you need to turn it off for a chunk that your application has freed, * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ -extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, +PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, png_infop info_ptr, int mask)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ -extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, +PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); -extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, +PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); #endif -extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp +PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp +PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp png_ptr, png_uint_32 mng_features_permitted)); #endif @@ -2522,27 +2524,27 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp * messages before passing them to the error or warning handler. */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp +PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp png_ptr, png_uint_32 strip_mode)); #endif /* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED -extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp +PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); -extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp +PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp +PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp png_ptr)); /* Added in libpng-1.4.0 */ -extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp +PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp png_ptr, png_uint_32 user_chunk_cache_max)); -extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) +PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) PNGARG((png_structp png_ptr)); /* Added in libpng-1.4.1 */ -extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp +PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp png_ptr, png_alloc_size_t user_chunk_cache_max)); -extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) +PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) PNGARG((png_structp png_ptr)); #endif @@ -2570,9 +2572,9 @@ png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); /* Added in libpng-1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr)); +PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) +PNG_EXPORT(png_bytep,png_get_io_chunk_name) PNGARG((png_structp png_ptr)); /* The flags returned by png_get_io_state() are the following: */ @@ -2638,7 +2640,6 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) * The png_get_int_32() routine assumes we are using two's complement * format for negative values, which is almost certainly true. */ -/* We could make special-case BIG_ENDIAN macros that do direct reads here */ # define png_get_uint_32(buf) \ (((png_uint_32)(*(buf)) << 24) + \ ((png_uint_32)(*((buf) + 1)) << 16) + \ @@ -2647,35 +2648,32 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) # define png_get_uint_16(buf) \ (((png_uint_32)(*(buf)) << 8) + \ ((png_uint_32)(*((buf) + 1)))) -#ifdef PNG_GET_INT_32_SUPPORTED # define png_get_int_32(buf) \ - (((png_int_32)(*(buf)) << 24) + \ - ((png_int_32)(*((buf) + 1)) << 16) + \ - ((png_int_32)(*((buf) + 2)) << 8) + \ - ((png_int_32)(*((buf) + 3)))) -#endif + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffff)+1)) \ + : (png_int_32)png_get_uint_32(buf))) #else -extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); -extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); +PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); +PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); #ifdef PNG_GET_INT_32_SUPPORTED -extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); +PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); #endif #endif -extern PNG_EXPORT(png_uint_32,png_get_uint_31) +PNG_EXPORT(png_uint_32,png_get_uint_31) PNGARG((png_structp png_ptr, png_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ -extern PNG_EXPORT(void,png_save_uint_32) +PNG_EXPORT(void,png_save_uint_32) PNGARG((png_bytep buf, png_uint_32 i)); -extern PNG_EXPORT(void,png_save_int_32) +PNG_EXPORT(void,png_save_int_32) PNGARG((png_bytep buf, png_int_32 i)); /* Place a 16-bit number into a buffer in PNG byte order. * The parameter is declared unsigned int, not png_uint_16, * just to avoid potential problems on pre-ANSI C compilers. */ -extern PNG_EXPORT(void,png_save_uint_16) +PNG_EXPORT(void,png_save_uint_16) PNGARG((png_bytep buf, unsigned int i)); /* No png_save_int_16 -- may be added if there's a real need for it. */ diff --git a/source/Irrlicht/libpng/pngconf.h b/source/Irrlicht/libpng/pngconf.h index 2ebe72d0..7d178024 100644 --- a/source/Irrlicht/libpng/pngconf.h +++ b/source/Irrlicht/libpng/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.4.3 - June 26, 2010 + * libpng version 1.4.4 - September 23, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -44,14 +44,14 @@ * includes the resource compiler for Windows DLL configurations. */ #ifdef PNG_USER_CONFIG +# include "pngusr.h" # ifndef PNG_USER_PRIVATEBUILD # define PNG_USER_PRIVATEBUILD # endif -# include "pngusr.h" #endif /* - * If you create a private DLL you need to define in "pngusr.h" the followings: + * If you create a private DLL you should define in "pngusr.h" the following: * #define PNG_USER_PRIVATEBUILD * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." @@ -59,7 +59,7 @@ * distinguish your DLL from those of the official release. These * correspond to the trailing letters that come after the version * number and must match your private DLL name> - * e.g. // private DLL "libpng13gx.dll" + * e.g. // private DLL "libpng14gx.dll" * #define PNG_USER_DLLFNAME_POSTFIX "gx" * * The following macros are also at your disposal if you want to complete the @@ -269,11 +269,19 @@ * #define PNG_NO_STDIO */ +#ifdef _WIN32_WCE +# define PNG_NO_CONSOLE_IO +# define PNG_NO_STDIO +# define PNG_NO_TIME_RFC1123 +# ifdef PNG_DEBUG +# undef PNG_DEBUG +# endif +#endif + #if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED) # define PNG_STDIO_SUPPORTED #endif - #ifdef PNG_BUILD_DLL # if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO) # define PNG_NO_CONSOLE_IO @@ -439,7 +447,7 @@ /* The following uses const char * instead of char * for error * and warning message functions, so some compilers won't complain. - * If you do not want to use const, define PNG_NO_CONST here. + * If you do not want to use const, define PNG_NO_CONST. */ #ifndef PNG_CONST @@ -454,8 +462,10 @@ * library that you will not be using. I wish I could figure out how to * automate this, but I can't do that without making it seriously hard * on the users. So if you are not using an ability, change the #define - * to and #undef, and that part of the library will not be compiled. If - * your linker can't find a function, you may want to make sure the + * to an #undef, or pass in PNG_NO_feature and that part of the library + * will not be compiled. + + * If your linker can't find a function, you may want to make sure the * ability is defined here. Some of these depend upon some others being * defined. I haven't figured out all the interactions here, so you may * have to experiment awhile to get everything to compile. If you are @@ -1114,7 +1124,7 @@ typedef unsigned char png_byte; #else typedef size_t png_size_t; #endif -#define png_sizeof(x) sizeof(x) +#define png_sizeof(x) (sizeof (x)) /* The following is needed for medium model support. It cannot be in the * pngpriv.h header. Needs modification for other compilers besides @@ -1236,6 +1246,13 @@ typedef char FAR * FAR * FAR * png_charppp; # define PNG_DLL #endif +/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", + * you may get warnings regarding the linkage of png_zalloc and png_zfree. + * Don't ignore those warnings; you must also reset the default calling + * convention in your compiler to match your PNGAPI, and you must build + * zlib and your applications the same way you build libpng. + */ + #ifdef __CYGWIN__ # undef PNGAPI # define PNGAPI __cdecl @@ -1243,14 +1260,11 @@ typedef char FAR * FAR * FAR * png_charppp; # define PNG_IMPEXP #endif -#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */ - -/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", - * you may get warnings regarding the linkage of png_zalloc and png_zfree. - * Don't ignore those warnings; you must also reset the default calling - * convention in your compiler to match your PNGAPI, and you must build - * zlib and your applications the same way you build libpng. - */ +#ifdef __WATCOMC__ +# ifndef PNGAPI +# define PNGAPI +# endif +#endif #if defined(__MINGW32__) && !defined(PNG_MODULEDEF) # ifndef PNG_NO_MODULEDEF @@ -1335,6 +1349,8 @@ typedef char FAR * FAR * FAR * png_charppp; # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol #endif +#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */ + /* Support for compiler specific function attributes. These are used * so that where compiler support is available incorrect use of API * functions in png.h will generate compiler warnings. @@ -1412,7 +1428,7 @@ typedef char FAR * FAR * FAR * png_charppp; /* memory model/platform independent fns */ #ifndef PNG_ABORT -# ifdef _WINDOWS_ +# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) # define PNG_ABORT() ExitProcess(0) # else # define PNG_ABORT() abort() @@ -1433,7 +1449,8 @@ typedef char FAR * FAR * FAR * png_charppp; # define png_memset _fmemset # define png_sprintf sprintf #else -# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ +# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) +# /* Favor Windows over C runtime fns */ # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) # define png_strcpy lstrcpyA @@ -1453,31 +1470,32 @@ typedef char FAR * FAR * FAR * png_charppp; # define png_memcpy memcpy # define png_memset memset # define png_sprintf sprintf -# ifndef PNG_NO_SNPRINTF -# ifdef _MSC_VER -# define png_snprintf _snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 _snprintf -# define png_snprintf6 _snprintf -# else -# define png_snprintf snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 snprintf -# define png_snprintf6 snprintf -# endif -# else - /* You don't have or don't want to use snprintf(). Caution: Using - * sprintf instead of snprintf exposes your application to accidental - * or malevolent buffer overflows. If you don't have snprintf() - * as a general rule you should provide one (you can get one from - * Portable OpenSSH). - */ -# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) -# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) -# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ - sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) -# endif # endif #endif +#ifndef PNG_NO_SNPRINTF +# ifdef _MSC_VER +# define png_snprintf _snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 _snprintf +# define png_snprintf6 _snprintf +# else +# define png_snprintf snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 snprintf +# define png_snprintf6 snprintf +# endif +#else + /* You don't have or don't want to use snprintf(). Caution: Using + * sprintf instead of snprintf exposes your application to accidental + * or malevolent buffer overflows. If you don't have snprintf() + * as a general rule you should provide one (you can get one from + * Portable OpenSSH). + */ +# define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1) +# define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2) +# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ + png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) +#endif + /* png_alloc_size_t is guaranteed to be no smaller than png_size_t, * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32 * to png_alloc_size_t are not necessary; in fact, it is recommended @@ -1488,22 +1506,19 @@ typedef char FAR * FAR * FAR * png_charppp; * to encounter practical situations that require such conversions. */ #if defined(__TURBOC__) && !defined(__FLAT__) -# define png_mem_alloc farmalloc -# define png_mem_free farfree typedef unsigned long png_alloc_size_t; #else # if defined(_MSC_VER) && defined(MAXSEG_64K) -# define png_mem_alloc(s) halloc(s, 1) -# define png_mem_free hfree typedef unsigned long png_alloc_size_t; # else -# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) -# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s) -# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p) - typedef DWORD png_alloc_size_t; + /* This is an attempt to detect an old Windows system where (int) is + * actually 16 bits, in that case png_malloc must have an argument with a + * bigger size to accomodate the requirements of the library. + */ +# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \ + (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) + typedef DWORD png_alloc_size_t; # else -# define png_mem_alloc malloc -# define png_mem_free free typedef png_size_t png_alloc_size_t; # endif # endif diff --git a/source/Irrlicht/libpng/pngpread.c b/source/Irrlicht/libpng/pngpread.c index ed5d82c6..61683cc7 100644 --- a/source/Irrlicht/libpng/pngpread.c +++ b/source/Irrlicht/libpng/pngpread.c @@ -843,7 +843,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, * or the stream marked as finished. */ while (png_ptr->zstream.avail_in > 0 && - !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) { int ret; @@ -872,49 +872,49 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, /* Check for any failure before proceeding. */ if (ret != Z_OK && ret != Z_STREAM_END) { - /* Terminate the decompression. */ - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + /* Terminate the decompression. */ + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; /* This may be a truncated stream (missing or - * damaged end code). Treat that as a warning. - */ + * damaged end code). Treat that as a warning. + */ if (png_ptr->row_number >= png_ptr->num_rows || - png_ptr->pass > 6) - png_warning(png_ptr, "Truncated compressed data in IDAT"); - else - png_error(png_ptr, "Decompression error in IDAT"); + png_ptr->pass > 6) + png_warning(png_ptr, "Truncated compressed data in IDAT"); + else + png_error(png_ptr, "Decompression error in IDAT"); - /* Skip the check on unprocessed input */ + /* Skip the check on unprocessed input */ return; } /* Did inflate output any data? */ if (png_ptr->zstream.next_out != png_ptr->row_buf) { - /* Is this unexpected data after the last row? - * If it is, artificially terminate the LZ output - * here. - */ + /* Is this unexpected data after the last row? + * If it is, artificially terminate the LZ output + * here. + */ if (png_ptr->row_number >= png_ptr->num_rows || - png_ptr->pass > 6) + png_ptr->pass > 6) { - /* Extra data. */ - png_warning(png_ptr, "Extra compressed data in IDAT"); + /* Extra data. */ + png_warning(png_ptr, "Extra compressed data in IDAT"); png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - /* Do no more processing; skip the unprocessed - * input check below. - */ + /* Do no more processing; skip the unprocessed + * input check below. + */ return; - } + } - /* Do we have a complete row? */ - if (png_ptr->zstream.avail_out == 0) - png_push_process_row(png_ptr); + /* Do we have a complete row? */ + if (png_ptr->zstream.avail_out == 0) + png_push_process_row(png_ptr); } /* And check for the end of the stream. */ if (ret == Z_STREAM_END) - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; } /* All the data should have been processed, if anything @@ -988,7 +988,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass == 6 && png_ptr->height <= 4) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1028,7 +1028,7 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 4 && png_ptr->pass == 2; i++) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1078,13 +1078,13 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } if (png_ptr->pass == 6) /* Pass 5 might be empty */ { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1103,7 +1103,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass == 6) /* Skip top generated row */ { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1117,7 +1117,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass != 6) break; - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } diff --git a/source/Irrlicht/libpng/pngpriv.h b/source/Irrlicht/libpng/pngpriv.h index b1b6a99b..ebf8e530 100644 --- a/source/Irrlicht/libpng/pngpriv.h +++ b/source/Irrlicht/libpng/pngpriv.h @@ -1,7 +1,7 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.4.3 - June 26, 2010 + * libpng version 1.4.4 - September 23, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -28,14 +28,16 @@ #include +#ifndef PNG_EXTERN /* The functions exported by PNG_EXTERN are internal functions, which * aren't usually used outside the library (as far as I know), so it is * debatable if they should be exported at all. In the future, when it * is possible to have run-time registry of chunk-handling functions, * some of these will be made available again. -#define PNG_EXTERN extern +# define PNG_EXTERN extern */ -#define PNG_EXTERN +# define PNG_EXTERN +#endif /* Other defines specific to compilers can go here. Try to keep * them inside an appropriate ifdef/endif pair for portability. @@ -75,10 +77,6 @@ #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ defined(_WIN32) || defined(__WIN32__) # include /* defines _WINDOWS_ macro */ -/* I have no idea why is this necessary... */ -# ifdef _MSC_VER -# include -# endif #endif /* Various modes of operation. Note that after an init, mode is set to @@ -672,7 +670,7 @@ PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_READ_iCCP_SUPPORTED -extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, +PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif /* PNG_READ_iCCP_SUPPORTED */ @@ -707,7 +705,7 @@ PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_READ_sPLT_SUPPORTED -extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, +PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif /* PNG_READ_sPLT_SUPPORTED */ @@ -828,14 +826,14 @@ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, int filter_type)); /* Free all memory used by the read (old method - NOT DLL EXPORTED) */ -extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, +PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)); /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr)); #ifdef USE_FAR_KEYWORD /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, +PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, int check)); #endif /* USE_FAR_KEYWORD */ diff --git a/source/Irrlicht/libpng/pngrutil.c b/source/Irrlicht/libpng/pngrutil.c index db5ec0c3..6a7437ef 100644 --- a/source/Irrlicht/libpng/pngrutil.c +++ b/source/Irrlicht/libpng/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.3 [June 26, 2010] + * Last changed in libpng 1.4.4 [August 26, 2010] * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -30,38 +30,41 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf) } #ifndef PNG_USE_READ_MACROS /* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ -png_uint_32 PNGAPI -png_get_uint_32(png_bytep buf) +png_uint_32 (PNGAPI +png_get_uint_32)(png_bytep buf) { - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); + png_uint_32 i = + ((png_uint_32)(*(buf )) << 24) + + ((png_uint_32)(*(buf + 1)) << 16) + + ((png_uint_32)(*(buf + 2)) << 8) + + ((png_uint_32)(*(buf + 3)) ) ; return (i); } /* Grab a signed 32-bit integer from a buffer in big-endian format. The - * data is stored in the PNG file in two's complement format, and it is - * assumed that the machine format for signed integers is the same. + * data is stored in the PNG file in two's complement format and there + * is no guarantee that a 'png_int_32' is exactly 32 bits, therefore + * the following code does a two's complement to native conversion. */ -png_int_32 PNGAPI -png_get_int_32(png_bytep buf) +png_int_32 (PNGAPI +png_get_int_32)(png_bytep buf) { - png_int_32 i = ((png_int_32)(*buf) << 24) + - ((png_int_32)(*(buf + 1)) << 16) + - ((png_int_32)(*(buf + 2)) << 8) + - (png_int_32)(*(buf + 3)); + png_uint_32 u = png_get_uint_32(buf); + if ((u & 0x80000000) == 0) /* non-negative */ + return u; - return (i); + u = (u ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ + return -(png_int_32)u; } /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ -png_uint_16 PNGAPI -png_get_uint_16(png_bytep buf) +png_uint_16 (PNGAPI +png_get_uint_16)(png_bytep buf) { - png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + - (png_uint_16)(*(buf + 1))); + png_uint_16 i = + ((png_uint_32)(*buf) << 8) + + ((png_uint_32)(*(buf + 1))); return (i); } @@ -1128,20 +1131,20 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (profile_size > profile_length) { +#ifdef PNG_STDIO_SUPPORTED + char umsg[50]; +#endif png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; png_warning(png_ptr, "Ignoring truncated iCCP profile"); #ifdef PNG_STDIO_SUPPORTED - { - char umsg[50]; - png_snprintf(umsg, 50, "declared profile size = %lu", - (unsigned long)profile_size); - png_warning(png_ptr, umsg); - png_snprintf(umsg, 50, "actual profile length = %lu", - (unsigned long)profile_length); - png_warning(png_ptr, umsg); - } + png_snprintf(umsg, 50, "declared profile size = %lu", + (unsigned long)profile_size); + png_warning(png_ptr, umsg); + png_snprintf(umsg, 50, "actual profile length = %lu", + (unsigned long)profile_length); + png_warning(png_ptr, umsg); #endif return; } @@ -1875,9 +1878,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_warning(png_ptr, "malformed height string in sCAL chunk"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); -#endif return; } #else @@ -1888,9 +1888,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_warning(png_ptr, "Out of memory while processing sCAL chunk height"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) png_free(png_ptr, swidth); -#endif return; } png_memcpy(sheight, ep, png_strlen(ep)); diff --git a/source/Irrlicht/libpng/pngtest.c b/source/Irrlicht/libpng/pngtest.c index 35a4c7db..b76de0e9 100644 --- a/source/Irrlicht/libpng/pngtest.c +++ b/source/Irrlicht/libpng/pngtest.c @@ -302,7 +302,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) /* Check if data really is near. If so, use usual code. */ n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); if ((png_bytep)n_data == data) { check = fread(n_data, 1, length, io_ptr); @@ -351,8 +351,10 @@ static void pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; + png_FILE_p io_ptr; + io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); - check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr); + check = fwrite(data, 1, length, io_ptr); if (check != length) { png_error(png_ptr, "Write Error"); @@ -1627,4 +1629,4 @@ main(int argc, char *argv[]) } /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_3 your_png_h_is_not_version_1_4_3; +typedef version_1_4_4 your_png_h_is_not_version_1_4_4; diff --git a/source/Irrlicht/libpng/pngtrans.c b/source/Irrlicht/libpng/pngtrans.c index d604a7a4..bdc10a26 100644 --- a/source/Irrlicht/libpng/pngtrans.c +++ b/source/Irrlicht/libpng/pngtrans.c @@ -673,5 +673,5 @@ png_get_user_transform_ptr(png_structp png_ptr) #endif } #endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || - PNG_WRITE_USER_TRANSFORM_SUPPORTED */ + PNG_WRITE_USER_TRANSFORM_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj b/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj index ce03e683..e08346b7 100644 --- a/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj +++ b/source/Irrlicht/libpng/projects/visualc71/libpng.vcproj @@ -17,7 +17,7 @@ + AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/> + AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/> + AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/> @@ -210,10 +210,10 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png" diff --git a/source/Irrlicht/libpng/projects/visualc71/zlib.vcproj b/source/Irrlicht/libpng/projects/visualc71/zlib.vcproj index 23e0ac56..614b869e 100644 --- a/source/Irrlicht/libpng/projects/visualc71/zlib.vcproj +++ b/source/Irrlicht/libpng/projects/visualc71/zlib.vcproj @@ -17,7 +17,7 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\zlib" - PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" @@ -62,7 +62,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\zlib" - PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -107,9 +107,9 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\..\zlib" - PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" StringPooling="TRUE" - RuntimeLibrary="2" + RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" WarningLevel="3" CompileAs="1"/> @@ -146,9 +146,9 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\zlib" - PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS" BasicRuntimeChecks="3" - RuntimeLibrary="3" + RuntimeLibrary="1" WarningLevel="3" DebugInformationFormat="4" CompileAs="1"/> @@ -196,7 +196,16 @@ RelativePath="..\..\..\zlib\deflate.c"> + RelativePath="..\..\..\zlib\gzlib.c"> + + + + + + diff --git a/source/Irrlicht/libpng/projects/vstudio/readme.txt b/source/Irrlicht/libpng/projects/vstudio/readme.txt index d3f4ab8b..51ebb3f6 100644 --- a/source/Irrlicht/libpng/projects/vstudio/readme.txt +++ b/source/Irrlicht/libpng/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.4.3 - June 26, 2010 +libpng version 1.4.4 - September 23, 2010 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/source/Irrlicht/libpng/projects/vstudio/zlib.props b/source/Irrlicht/libpng/projects/vstudio/zlib.props index fc619f91..5eb1576f 100644 --- a/source/Irrlicht/libpng/projects/vstudio/zlib.props +++ b/source/Irrlicht/libpng/projects/vstudio/zlib.props @@ -2,7 +2,7 @@