Fully integrate gles renderer with our irrlicht version.

This commit is contained in:
Deve 2016-07-05 00:25:03 +02:00
parent 9ceab23c5f
commit 4132177132
17 changed files with 640 additions and 4939 deletions

View File

@ -15,8 +15,8 @@ endif()
if(APPLE)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
add_definitions(-DNDEBUG=1 -DIRRLICHT_EXPORTS=1 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES)
@ -53,145 +53,481 @@ endif()
set(IRRLICHT_SOURCES
source/Irrlicht/CGeometryCreator.cpp
source/Irrlicht/C3DSMeshFileLoader.cpp
source/Irrlicht/CParticleSystemSceneNode.cpp
source/Irrlicht/CSceneNodeAnimatorDelete.cpp
source/Irrlicht/CGUICheckBox.cpp
source/Irrlicht/COGLES2MaterialRenderer.cpp
source/Irrlicht/CGUIButton.cpp
source/Irrlicht/CAnimatedMeshSceneNode.cpp
source/Irrlicht/CSkinnedMesh.cpp
source/Irrlicht/CSceneNodeAnimatorTexture.cpp
source/Irrlicht/CParticleBoxEmitter.cpp
source/Irrlicht/CTriangleBBSelector.cpp
source/Irrlicht/CGUIComboBox.cpp
source/Irrlicht/CGUIFileOpenDialog.cpp
source/Irrlicht/CLimitReadFile.cpp
source/Irrlicht/CParticleGravityAffector.cpp
source/Irrlicht/CGUIMeshViewer.cpp
source/Irrlicht/os.cpp
source/Irrlicht/CParticleCylinderEmitter.cpp
source/Irrlicht/COpenGLExtensionHandler.cpp
source/Irrlicht/CParticleRotationAffector.cpp
source/Irrlicht/COGLES2NormalMapRenderer.cpp
source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp
source/Irrlicht/COpenGLParallaxMapRenderer.cpp
source/Irrlicht/CGUIImage.cpp
source/Irrlicht/CVideoModeList.cpp
source/Irrlicht/COctreeSceneNode.cpp
source/Irrlicht/COGLES2Texture.cpp
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
source/Irrlicht/CImageWriterBMP.cpp
source/Irrlicht/CMeshCache.cpp
source/Irrlicht/CIrrDeviceFB.cpp
source/Irrlicht/COpenGLDriver.cpp
source/Irrlicht/COctreeTriangleSelector.cpp
source/Irrlicht/CGUIMenu.cpp
source/Irrlicht/CMetaTriangleSelector.cpp
source/Irrlicht/CFileList.cpp
source/Irrlicht/CImageWriterJPG.cpp
source/Irrlicht/CImageLoaderJPG.cpp
source/Irrlicht/CParticlePointEmitter.cpp
source/Irrlicht/CTerrainTriangleSelector.cpp
source/Irrlicht/COGLES2FixedPipelineRenderer.cpp
source/Irrlicht/CAndroidAssetReader.cpp
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp
source/Irrlicht/COGLES2Renderer2D.cpp
source/Irrlicht/CGUIStaticText.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneManager.cpp
source/Irrlicht/CGUITreeView.cpp
source/Irrlicht/CDefaultGUIElementFactory.cpp
source/Irrlicht/CSceneCollisionManager.cpp
source/Irrlicht/CGUIInOutFader.cpp
source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp
source/Irrlicht/CColorConverter.cpp
source/Irrlicht/CLogger.cpp
source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp
source/Irrlicht/CGUIModalScreen.cpp
source/Irrlicht/CSkyDomeSceneNode.cpp
source/Irrlicht/CAndroidAssetFileArchive.cpp
source/Irrlicht/CGUITabControl.cpp
source/Irrlicht/CNullDriver.cpp
source/Irrlicht/CGUISpriteBank.cpp
source/Irrlicht/COGLES2Driver.cpp
source/Irrlicht/CLightSceneNode.cpp
source/Irrlicht/CBoneSceneNode.cpp
source/Irrlicht/CGUITable.cpp
source/Irrlicht/CParticleAttractionAffector.cpp
source/Irrlicht/CImage.cpp
source/Irrlicht/CB3DMeshFileLoader.cpp
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
source/Irrlicht/CGUIScrollBar.cpp
source/Irrlicht/CSkyBoxSceneNode.cpp
source/Irrlicht/CTerrainSceneNode.cpp
source/Irrlicht/COSOperator.cpp
source/Irrlicht/CImageLoaderPNG.cpp
source/Irrlicht/CMountPointReader.cpp
source/Irrlicht/CParticleSphereEmitter.cpp
source/Irrlicht/CDummyTransformationSceneNode.cpp
source/Irrlicht/CDefaultSceneNodeFactory.cpp
source/Irrlicht/CParticleFadeOutAffector.cpp
source/Irrlicht/CGUIEditBox.cpp
source/Irrlicht/COGLES2ParallaxMapRenderer.cpp
source/Irrlicht/CXMLReader.cpp
source/Irrlicht/COGLESDriver.cpp
source/Irrlicht/CIrrDeviceAndroid.cpp
source/Irrlicht/COGLESTexture.cpp
source/Irrlicht/CGUIWindow.cpp
source/Irrlicht/CParticleMeshEmitter.cpp
source/Irrlicht/CGUIEnvironment.cpp
source/Irrlicht/CTarReader.cpp
source/Irrlicht/CMeshManipulator.cpp
source/Irrlicht/CGUISpinBox.cpp
source/Irrlicht/CImageLoaderBMP.cpp
source/Irrlicht/CIrrDeviceWin32.cpp
source/Irrlicht/CTriangleSelector.cpp
source/Irrlicht/COpenGLSLMaterialRenderer.cpp
source/Irrlicht/CIrrDeviceStub.cpp
source/Irrlicht/irrXML.cpp
source/Irrlicht/COpenGLTexture.cpp
source/Irrlicht/CAndroidAssetReader.cpp
source/Irrlicht/CAnimatedMeshSceneNode.cpp
source/Irrlicht/CAttributes.cpp
source/Irrlicht/COGLES2ExtensionHandler.cpp
source/Irrlicht/COGLESExtensionHandler.cpp
source/Irrlicht/CImageWriterPNG.cpp
source/Irrlicht/CZBuffer.cpp
source/Irrlicht/CParticleRingEmitter.cpp
source/Irrlicht/CFileSystem.cpp
source/Irrlicht/COpenGLShaderMaterialRenderer.cpp
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/CCubeSceneNode.cpp
source/Irrlicht/CReadFile.cpp
source/Irrlicht/CZipReader.cpp
source/Irrlicht/CSphereSceneNode.cpp
source/Irrlicht/CGUIMessageBox.cpp
source/Irrlicht/CGUIContextMenu.cpp
source/Irrlicht/CGUIListBox.cpp
source/Irrlicht/CGUIToolBar.cpp
source/Irrlicht/CCameraSceneNode.cpp
source/Irrlicht/CXMeshFileLoader.cpp
source/Irrlicht/CParticleScaleAffector.cpp
source/Irrlicht/CB3DMeshFileLoader.cpp
source/Irrlicht/CBillboardSceneNode.cpp
source/Irrlicht/Irrlicht.cpp
source/Irrlicht/CBoneSceneNode.cpp
source/Irrlicht/CCameraSceneNode.cpp
source/Irrlicht/CColorConverter.cpp
source/Irrlicht/CCubeSceneNode.cpp
source/Irrlicht/CDefaultGUIElementFactory.cpp
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp
source/Irrlicht/CDefaultSceneNodeFactory.cpp
source/Irrlicht/CDummyTransformationSceneNode.cpp
source/Irrlicht/CEmptySceneNode.cpp
source/Irrlicht/CMemoryFile.cpp
source/Irrlicht/CFileList.cpp
source/Irrlicht/CFileSystem.cpp
source/Irrlicht/CFPSCounter.cpp
source/Irrlicht/CGUISkin.cpp
source/Irrlicht/CGeometryCreator.cpp
source/Irrlicht/CGUIButton.cpp
source/Irrlicht/CGUICheckBox.cpp
source/Irrlicht/CGUIColorSelectDialog.cpp
source/Irrlicht/CWaterSurfaceSceneNode.cpp
source/Irrlicht/CIrrDeviceConsole.cpp
source/Irrlicht/CTextSceneNode.cpp
source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp
source/Irrlicht/CGUIComboBox.cpp
source/Irrlicht/CGUIContextMenu.cpp
source/Irrlicht/CGUIEditBox.cpp
source/Irrlicht/CGUIEnvironment.cpp
source/Irrlicht/CGUIFileOpenDialog.cpp
source/Irrlicht/CGUIFont.cpp
source/Irrlicht/CWriteFile.cpp
source/Irrlicht/CMeshSceneNode.cpp
source/Irrlicht/CXMLWriter.cpp
source/Irrlicht/CGUIImage.cpp
source/Irrlicht/CGUIImageList.cpp
source/Irrlicht/CGUIInOutFader.cpp
source/Irrlicht/CGUIListBox.cpp
source/Irrlicht/CGUIMenu.cpp
source/Irrlicht/CGUIMeshViewer.cpp
source/Irrlicht/CGUIMessageBox.cpp
source/Irrlicht/CGUIModalScreen.cpp
source/Irrlicht/CGUIScrollBar.cpp
source/Irrlicht/CGUISkin.cpp
source/Irrlicht/CGUISpinBox.cpp
source/Irrlicht/CGUISpriteBank.cpp
source/Irrlicht/CGUIStaticText.cpp
source/Irrlicht/CGUITabControl.cpp
source/Irrlicht/CGUITable.cpp
source/Irrlicht/CGUIToolBar.cpp
source/Irrlicht/CGUITreeView.cpp
source/Irrlicht/CGUIWindow.cpp
source/Irrlicht/CImage.cpp
source/Irrlicht/CImageLoaderBMP.cpp
source/Irrlicht/CImageLoaderJPG.cpp
source/Irrlicht/CImageLoaderPNG.cpp
source/Irrlicht/CImageWriterBMP.cpp
source/Irrlicht/CImageWriterJPG.cpp
source/Irrlicht/CImageWriterPNG.cpp
source/Irrlicht/CIrrDeviceAndroid.cpp
source/Irrlicht/CIrrDeviceConsole.cpp
source/Irrlicht/CIrrDeviceFB.cpp
source/Irrlicht/CIrrDeviceLinux.cpp
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/CIrrDeviceStub.cpp
source/Irrlicht/CIrrDeviceWin32.cpp
source/Irrlicht/CLightSceneNode.cpp
source/Irrlicht/CLimitReadFile.cpp
source/Irrlicht/CLogger.cpp
source/Irrlicht/CMemoryFile.cpp
source/Irrlicht/CMeshCache.cpp
source/Irrlicht/CMeshManipulator.cpp
source/Irrlicht/CMeshSceneNode.cpp
source/Irrlicht/CMetaTriangleSelector.cpp
source/Irrlicht/CMountPointReader.cpp
source/Irrlicht/CNullDriver.cpp
source/Irrlicht/COctreeSceneNode.cpp
source/Irrlicht/COctreeTriangleSelector.cpp
source/Irrlicht/COGLES2Driver.cpp
source/Irrlicht/COGLES2ExtensionHandler.cpp
source/Irrlicht/COGLES2FixedPipelineRenderer.cpp
source/Irrlicht/COGLES2MaterialRenderer.cpp
source/Irrlicht/COGLES2NormalMapRenderer.cpp
source/Irrlicht/COGLES2ParallaxMapRenderer.cpp
source/Irrlicht/COGLES2Renderer2D.cpp
source/Irrlicht/COGLES2Texture.cpp
source/Irrlicht/COGLESDriver.cpp
source/Irrlicht/COGLESExtensionHandler.cpp
source/Irrlicht/COGLESTexture.cpp
source/Irrlicht/COpenGLDriver.cpp
source/Irrlicht/COpenGLExtensionHandler.cpp
source/Irrlicht/COpenGLParallaxMapRenderer.cpp
source/Irrlicht/COpenGLShaderMaterialRenderer.cpp
source/Irrlicht/COpenGLSLMaterialRenderer.cpp
source/Irrlicht/COpenGLTexture.cpp
source/Irrlicht/COSOperator.cpp
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
source/Irrlicht/CParticleAttractionAffector.cpp
source/Irrlicht/CParticleBoxEmitter.cpp
source/Irrlicht/CParticleCylinderEmitter.cpp
source/Irrlicht/CParticleFadeOutAffector.cpp
source/Irrlicht/CParticleGravityAffector.cpp
source/Irrlicht/CParticleMeshEmitter.cpp
source/Irrlicht/CParticlePointEmitter.cpp
source/Irrlicht/CParticleRingEmitter.cpp
source/Irrlicht/CParticleRotationAffector.cpp
source/Irrlicht/CParticleScaleAffector.cpp
source/Irrlicht/CParticleSphereEmitter.cpp
source/Irrlicht/CParticleSystemSceneNode.cpp
source/Irrlicht/CReadFile.cpp
source/Irrlicht/CSceneCollisionManager.cpp
source/Irrlicht/CSceneManager.cpp
source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp
source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
source/Irrlicht/CSceneNodeAnimatorDelete.cpp
source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp
source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp
source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp
source/Irrlicht/CSceneNodeAnimatorRotation.cpp
source/Irrlicht/CSceneNodeAnimatorTexture.cpp
source/Irrlicht/CSkinnedMesh.cpp
source/Irrlicht/CSkyBoxSceneNode.cpp
source/Irrlicht/CSkyDomeSceneNode.cpp
source/Irrlicht/CSphereSceneNode.cpp
source/Irrlicht/CTarReader.cpp
source/Irrlicht/CTerrainSceneNode.cpp
source/Irrlicht/CTerrainTriangleSelector.cpp
source/Irrlicht/CTextSceneNode.cpp
source/Irrlicht/CTriangleBBSelector.cpp
source/Irrlicht/CTriangleSelector.cpp
source/Irrlicht/CVideoModeList.cpp
source/Irrlicht/CWaterSurfaceSceneNode.cpp
source/Irrlicht/CWriteFile.cpp
source/Irrlicht/CXMLReader.cpp
source/Irrlicht/CXMLWriter.cpp
source/Irrlicht/CZBuffer.cpp
source/Irrlicht/CZipReader.cpp
source/Irrlicht/Irrlicht.cpp
source/Irrlicht/irrXML.cpp
source/Irrlicht/os.cpp
source/Irrlicht/BuiltInFont.h
source/Irrlicht/CAndroidAssetFileArchive.h
source/Irrlicht/CAndroidAssetReader.h
source/Irrlicht/CAnimatedMeshSceneNode.h
source/Irrlicht/CAttributeImpl.h
source/Irrlicht/CAttributes.h
source/Irrlicht/CB3DMeshFileLoader.h
source/Irrlicht/CBillboardSceneNode.h
source/Irrlicht/CBlit.h
source/Irrlicht/CBoneSceneNode.h
source/Irrlicht/CCameraSceneNode.h
source/Irrlicht/CColorConverter.h
source/Irrlicht/CCubeSceneNode.h
source/Irrlicht/CDefaultGUIElementFactory.h
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h
source/Irrlicht/CDefaultSceneNodeFactory.h
source/Irrlicht/CDummyTransformationSceneNode.h
source/Irrlicht/CEmptySceneNode.h
source/Irrlicht/CFileList.h
source/Irrlicht/CFileSystem.h
source/Irrlicht/CFPSCounter.h
source/Irrlicht/CGeometryCreator.h
source/Irrlicht/CGUIButton.h
source/Irrlicht/CGUICheckBox.h
source/Irrlicht/CGUIColorSelectDialog.h
source/Irrlicht/CGUIComboBox.h
source/Irrlicht/CGUIContextMenu.h
source/Irrlicht/CGUIEditBox.h
source/Irrlicht/CGUIEnvironment.h
source/Irrlicht/CGUIFileOpenDialog.h
source/Irrlicht/CGUIFont.h
source/Irrlicht/CGUIImage.h
source/Irrlicht/CGUIImageList.h
source/Irrlicht/CGUIInOutFader.h
source/Irrlicht/CGUIListBox.h
source/Irrlicht/CGUIMenu.h
source/Irrlicht/CGUIMeshViewer.h
source/Irrlicht/CGUIMessageBox.h
source/Irrlicht/CGUIModalScreen.h
source/Irrlicht/CGUIScrollBar.h
source/Irrlicht/CGUISkin.h
source/Irrlicht/CGUISpinBox.h
source/Irrlicht/CGUISpriteBank.h
source/Irrlicht/CGUIStaticText.h
source/Irrlicht/CGUITabControl.h
source/Irrlicht/CGUITable.h
source/Irrlicht/CGUIToolBar.h
source/Irrlicht/CGUITreeView.h
source/Irrlicht/CGUIWindow.h
source/Irrlicht/CImage.h
source/Irrlicht/CImageLoaderBMP.h
source/Irrlicht/CImageLoaderJPG.h
source/Irrlicht/CImageLoaderPNG.h
source/Irrlicht/CImageWriterBMP.h
source/Irrlicht/CImageWriterJPG.h
source/Irrlicht/CImageWriterPNG.h
source/Irrlicht/CIrrDeviceAndroid.h
source/Irrlicht/CIrrDeviceConsole.h
source/Irrlicht/CIrrDeviceFB.h
source/Irrlicht/CIrrDeviceLinux.h
source/Irrlicht/CIrrDeviceSDL.h
source/Irrlicht/CIrrDeviceStub.h
source/Irrlicht/CIrrDeviceWin32.h
source/Irrlicht/CLightSceneNode.h
source/Irrlicht/CLimitReadFile.h
source/Irrlicht/CLogger.h
source/Irrlicht/CMemoryFile.h
source/Irrlicht/CMeshCache.h
source/Irrlicht/CMeshManipulator.h
source/Irrlicht/CMeshSceneNode.h
source/Irrlicht/CMetaTriangleSelector.h
source/Irrlicht/CMountPointReader.h
source/Irrlicht/CNullDriver.h
source/Irrlicht/COctreeSceneNode.h
source/Irrlicht/COctreeTriangleSelector.h
source/Irrlicht/COGLES2Driver.h
source/Irrlicht/COGLES2ExtensionHandler.h
source/Irrlicht/COGLES2FixedPipelineRenderer.h
source/Irrlicht/COGLES2MaterialRenderer.h
source/Irrlicht/COGLES2NormalMapRenderer.h
source/Irrlicht/COGLES2ParallaxMapRenderer.h
source/Irrlicht/COGLES2Renderer2D.h
source/Irrlicht/COGLES2Texture.h
source/Irrlicht/COGLESDriver.h
source/Irrlicht/COGLESExtensionHandler.h
source/Irrlicht/COGLESMaterialRenderer.h
source/Irrlicht/COGLESTexture.h
source/Irrlicht/COpenGLDriver.h
source/Irrlicht/COpenGLExtensionHandler.h
source/Irrlicht/COpenGLMaterialRenderer.h
source/Irrlicht/COpenGLParallaxMapRenderer.h
source/Irrlicht/COpenGLShaderMaterialRenderer.h
source/Irrlicht/COpenGLSLMaterialRenderer.h
source/Irrlicht/COpenGLTexture.h
source/Irrlicht/COSOperator.h
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.h
source/Irrlicht/CParticleAttractionAffector.h
source/Irrlicht/CParticleBoxEmitter.h
source/Irrlicht/CParticleCylinderEmitter.h
source/Irrlicht/CParticleFadeOutAffector.h
source/Irrlicht/CParticleGravityAffector.h
source/Irrlicht/CParticleMeshEmitter.h
source/Irrlicht/CParticlePointEmitter.h
source/Irrlicht/CParticleRingEmitter.h
source/Irrlicht/CParticleRotationAffector.h
source/Irrlicht/CParticleScaleAffector.h
source/Irrlicht/CParticleSphereEmitter.h
source/Irrlicht/CParticleSystemSceneNode.h
source/Irrlicht/CReadFile.h
source/Irrlicht/CSceneCollisionManager.h
source/Irrlicht/CSceneManager.h
source/Irrlicht/CSceneNodeAnimatorCameraFPS.h
source/Irrlicht/CSceneNodeAnimatorCameraMaya.h
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.h
source/Irrlicht/CSceneNodeAnimatorDelete.h
source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
source/Irrlicht/CSceneNodeAnimatorFlyStraight.h
source/Irrlicht/CSceneNodeAnimatorFollowSpline.h
source/Irrlicht/CSceneNodeAnimatorRotation.h
source/Irrlicht/CSceneNodeAnimatorTexture.h
source/Irrlicht/CSkinnedMesh.h
source/Irrlicht/CSkyBoxSceneNode.h
source/Irrlicht/CSkyDomeSceneNode.h
source/Irrlicht/CSphereSceneNode.h
source/Irrlicht/CTarReader.h
source/Irrlicht/CTerrainSceneNode.h
source/Irrlicht/CTerrainTriangleSelector.h
source/Irrlicht/CTextSceneNode.h
source/Irrlicht/CTimer.h
source/Irrlicht/CTriangleBBSelector.h
source/Irrlicht/CTriangleSelector.h
source/Irrlicht/CVideoModeList.h
source/Irrlicht/CWaterSurfaceSceneNode.h
source/Irrlicht/CWriteFile.h
source/Irrlicht/CXMLReader.h
source/Irrlicht/CXMLReaderImpl.h
source/Irrlicht/CXMLWriter.h
source/Irrlicht/CZBuffer.h
source/Irrlicht/CZipReader.h
source/Irrlicht/dmfsupport.h
source/Irrlicht/gles2-ext.h
source/Irrlicht/glext.h
source/Irrlicht/glxext.h
source/Irrlicht/IAttribute.h
source/Irrlicht/IImagePresenter.h
source/Irrlicht/ISceneNodeAnimatorFinishing.h
source/Irrlicht/ITriangleRenderer.h
source/Irrlicht/IZBuffer.h
source/Irrlicht/MacOSX/AppDelegate.h
source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
source/Irrlicht/MacOSX/OSXClipboard.h
source/Irrlicht/Octree.h
source/Irrlicht/os.h
source/Irrlicht/resource.h
source/Irrlicht/S2DVertex.h
source/Irrlicht/S4DVertex.h
source/Irrlicht/SoftwareDriver2_compile_config.h
source/Irrlicht/SoftwareDriver2_helper.h
source/Irrlicht/wglext.h
include/aabbox3d.h
include/CDynamicMeshBuffer.h
include/CIndexBuffer.h
include/CMeshBuffer.h
include/coreutil.h
include/CVertexBuffer.h
include/dimension2d.h
include/driverChoice.h
include/EAttributes.h
include/ECullingTypes.h
include/EDebugSceneTypes.h
include/EDeviceTypes.h
include/EDriverFeatures.h
include/EDriverTypes.h
include/EGUIAlignment.h
include/EGUIElementTypes.h
include/EHardwareBufferFlags.h
include/EMaterialFlags.h
include/EMaterialTypes.h
include/EMeshWriterEnums.h
include/EMessageBoxFlags.h
include/EPrimitiveTypes.h
include/ESceneNodeAnimatorTypes.h
include/ESceneNodeTypes.h
include/EShaderTypes.h
include/ETerrainElements.h
include/EVertexAttributes.h
include/fast_atof.h
include/heapsort.h
include/IAnimatedMesh.h
include/IAnimatedMeshSceneNode.h
include/IAttributeExchangingObject.h
include/IAttributes.h
include/IBillboardSceneNode.h
include/IBillboardTextSceneNode.h
include/IBoneSceneNode.h
include/ICameraSceneNode.h
include/ICursorControl.h
include/IDummyTransformationSceneNode.h
include/IDynamicMeshBuffer.h
include/IEventReceiver.h
include/IFileArchive.h
include/IFileList.h
include/IFileSystem.h
include/IGeometryCreator.h
include/IGPUProgrammingServices.h
include/IGUIButton.h
include/IGUICheckBox.h
include/IGUIColorSelectDialog.h
include/IGUIComboBox.h
include/IGUIContextMenu.h
include/IGUIEditBox.h
include/IGUIElementFactory.h
include/IGUIElement.h
include/IGUIEnvironment.h
include/IGUIFileOpenDialog.h
include/IGUIFontBitmap.h
include/IGUIFont.h
include/IGUIImage.h
include/IGUIImageList.h
include/IGUIInOutFader.h
include/IGUIListBox.h
include/IGUIMeshViewer.h
include/IGUIScrollBar.h
include/IGUISkin.h
include/IGUISpinBox.h
include/IGUISpriteBank.h
include/IGUIStaticText.h
include/IGUITabControl.h
include/IGUITable.h
include/IGUIToolbar.h
include/IGUITreeView.h
include/IGUIWindow.h
include/IImage.h
include/IImageLoader.h
include/IImageWriter.h
include/IIndexBuffer.h
include/ILightManager.h
include/ILightSceneNode.h
include/ILogger.h
include/IMaterialRenderer.h
include/IMaterialRendererServices.h
include/IMeshBuffer.h
include/IMeshCache.h
include/IMesh.h
include/IMeshLoader.h
include/IMeshManipulator.h
include/IMeshSceneNode.h
include/IMeshWriter.h
include/IMetaTriangleSelector.h
include/IOSOperator.h
include/IParticleAffector.h
include/IParticleAnimatedMeshSceneNodeEmitter.h
include/IParticleAttractionAffector.h
include/IParticleBoxEmitter.h
include/IParticleCylinderEmitter.h
include/IParticleEmitter.h
include/IParticleFadeOutAffector.h
include/IParticleGravityAffector.h
include/IParticleMeshEmitter.h
include/IParticleRingEmitter.h
include/IParticleRotationAffector.h
include/IParticleSphereEmitter.h
include/IParticleSystemSceneNode.h
include/IRandomizer.h
include/IReadFile.h
include/IReferenceCounted.h
include/irrAllocator.h
include/irrArray.h
include/IrrCompileConfig.h
include/IrrlichtDevice.h
include/irrlicht.h
include/irrList.h
include/irrMap.h
include/irrMath.h
include/irrpack.h
include/irrString.h
include/irrTypes.h
include/irrunpack.h
include/irrXML.h
include/ISceneCollisionManager.h
include/ISceneLoader.h
include/ISceneManager.h
include/ISceneNodeAnimatorCameraFPS.h
include/ISceneNodeAnimatorCameraMaya.h
include/ISceneNodeAnimatorCollisionResponse.h
include/ISceneNodeAnimatorFactory.h
include/ISceneNodeAnimator.h
include/ISceneNodeFactory.h
include/ISceneNode.h
include/ISceneUserDataSerializer.h
include/IShaderConstantSetCallBack.h
include/ISkinnedMesh.h
include/ITerrainSceneNode.h
include/ITextSceneNode.h
include/ITexture.h
include/ITimer.h
include/ITriangleSelector.h
include/IVertexBuffer.h
include/IVideoDriver.h
include/IVideoModeList.h
include/IWriteFile.h
include/IXMLReader.h
include/IXMLWriter.h
include/Keycodes.h
include/line2d.h
include/line3d.h
include/matrix4.h
include/path.h
include/plane3d.h
include/position2d.h
include/quaternion.h
include/rect.h
include/S3DVertex.h
include/SAnimatedMesh.h
include/SceneParameters.h
include/SColor.h
include/SExposedVideoData.h
include/SIrrCreationParameters.h
include/SKeyMap.h
include/SLight.h
include/SMaterial.h
include/SMaterialLayer.h
include/SMeshBuffer.h
include/SMeshBufferLightMap.h
include/SMeshBufferTangents.h
include/SMesh.h
include/SParticle.h
include/SSharedMeshBuffer.h
include/SSkinMeshBuffer.h
include/SVertexIndex.h
include/SVertexManipulator.h
include/SViewFrustum.h
include/triangle3d.h
include/utfwrapping.h
include/vector2d.h
include/vector3d.h
)
if(APPLE)
set(IRRLICHT_SOURCES
${IRRLICHT_SOURCES}

View File

@ -10,6 +10,15 @@ namespace irr
namespace video
{
//! Flag for mesh (mainly karts in STK) to use specific render type
enum E_RENDER_TYPE
{
ERT_DEFAULT = 0,
ERT_TRANSPARENT,
ERT_RED,
ERT_BLUE
};
//! Abstracted and easy to use fixed function/programmable pipeline material modes.
enum E_MATERIAL_TYPE
{

View File

@ -582,6 +582,9 @@ struct SEvent
struct SJoystickEvent JoystickEvent;
struct SLogEvent LogEvent;
struct SUserEvent UserEvent;
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
struct SInputMethodEvent InputMethodEvent;
#endif
};
};

View File

@ -37,9 +37,11 @@ public:
virtual void setBasicRenderStates(const SMaterial& material,
const SMaterial& lastMaterial,
bool resetAllRenderstates) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! Return an index constant for the vertex shader based on a name.
virtual s32 getVertexShaderConstantID(const c8* name) = 0;
#endif
//! Sets a constant for the vertex shader based on a name.
/** This can be used if you used a high level shader language like GLSL
@ -61,15 +63,28 @@ public:
services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16);
}
\endcode
\param index Index of the variable
\param name Name of the variable
\param floats Pointer to array of floats
\param count Amount of floats in array.
\return True if successful.
*/
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count) = 0;
#else
virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count) = 0;
#endif
//! Bool interface for the above.
#ifndef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count) = 0;
#endif
//! Int interface for the above.
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count) = 0;
#else
virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count) = 0;
#endif
//! Sets a vertex shader constant.
/** Can be used if you created a shader using pixel/vertex shader
@ -78,22 +93,37 @@ public:
\param startRegister: First register to be set
\param constantAmount: Amount of registers to be set. One register consists of 4 floats. */
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! Return an index constant for the pixel shader based on a name.
virtual s32 getPixelShaderConstantID(const c8* name) = 0;
#endif
//! Sets a constant for the pixel shader based on a name.
/** This can be used if you used a high level shader language like GLSL
or HLSL to create a shader. See setVertexShaderConstant() for an
example on how to use this.
\param index Index of the variable
\param name Name of the variable
\param floats Pointer to array of floats
\param count Amount of floats in array.
\return True if successful. */
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count) = 0;
#else
virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count) = 0;
#endif
//! Bool interface for the above.
#ifndef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count) = 0;
#endif
//! Int interface for the above.
#ifdef _IRR_COMPILE_WITH_OGLES2_
virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count) = 0;
#else
virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count) = 0;
#endif
//! Sets a pixel shader constant.
/** Can be used if you created a shader using pixel/vertex shader
@ -102,7 +132,8 @@ public:
\param startRegister First register to be set.
\param constantAmount Amount of registers to be set. One register consists of 4 floats. */
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
#ifdef _IRR_COMPILE_WITH_OGLES2_
//! \deprecated. This method may be removed by Irrlicht 2.0
_IRR_DEPRECATED_ bool setVertexShaderConstant(const c8* name, const f32* floats, int count)
{
@ -126,6 +157,7 @@ public:
{
return setPixelShaderConstant(getPixelShaderConstantID(name), ints, count);
}
#endif
//! Get pointer to the IVideoDriver interface
/** \return Pointer to the IVideoDriver interface */

View File

@ -23,6 +23,9 @@ namespace scene
class IMesh : public virtual IReferenceCounted
{
public:
IMesh() : m_rt(video::ERT_DEFAULT) {}
virtual ~IMesh() {}
//! Get the amount of mesh buffers.
/** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */
@ -66,6 +69,15 @@ namespace scene
indices have changed. Otherwise, changes won't be updated
on the GPU in the next render cycle. */
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
//! Set the mesh to use a specific render type (mainly karts in STK)
/** \param t New render type for the mesh. */
void setRenderType(video::E_RENDER_TYPE t) { m_rt = t; }
//! Get the specific render type for the mesh (mainly karts in STK)
video::E_RENDER_TYPE getRenderType() const { return m_rt; }
private:
video::E_RENDER_TYPE m_rt;
};
} // end namespace scene

View File

@ -45,6 +45,7 @@
//! 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_
@ -118,17 +119,12 @@
#define _IRR_COMPILE_ANDROID_ASSET_READER_
#endif
#if defined(__SVR4) && defined(__sun)
#define _IRR_SOLARIS_PLATFORM_
#if defined(__sparc)
#define __BIG_ENDIAN__
#endif
#endif
#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_ANDROID_PLATFORM_)
#ifndef _IRR_SOLARIS_PLATFORM_
#if !defined(__linux__) && !defined(__FreeBSD__)
#define _IRR_LINUX_PLATFORM_
#endif
#endif
#define _IRR_POSIX_API_
#define _IRR_COMPILE_WITH_X11_DEVICE_
#endif
@ -144,19 +140,6 @@
//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht.
#define _IRR_MATERIAL_MAX_TEXTURES_ 8
//! Whether to support XML and XML-based formats (irrmesh, collada...)
#define _IRR_COMPILE_WITH_XML_
#ifdef NO_IRR_COMPILE_WITH_XML_
#undef _IRR_COMPILE_WITH_XML_
#endif
//! Add a leak-hunter to Irrlicht which helps finding unreleased reference counted objects.
//! NOTE: This is slow and should only be used for debugging
//#define _IRR_COMPILE_WITH_LEAK_HUNTER_
#ifdef NO_IRR_COMPILE_WITH_LEAK_HUNTER_
#undef _IRR_COMPILE_WITH_LEAK_HUNTER_
#endif
//! Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to
//! compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9.
/** If you only want to use the software device or opengl you can disable those defines.
@ -177,25 +160,14 @@ headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one.
//! Define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ if you want to use DirectInput for joystick handling.
/** This only applies to Windows devices, currently only supported under Win32 device.
If not defined, Windows Multimedia library is used, which offers also broad support for joystick devices. */
#define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#endif
// can't get this to compile currently under borland, can be removed if someone has a better solution
#if defined(__BORLANDC__)
#ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#endif
//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
// #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
@ -242,21 +214,6 @@ define out. */
#endif
#endif
//! Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver
/** 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. */
@ -348,7 +305,7 @@ the engine will no longer read .jpeg images. */
//! 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_
//#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
#undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
#endif
@ -364,83 +321,19 @@ the engine will no longer read .png images. */
//! 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_
//#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,
it is possible to debug all D3D9 shaders in VisualStudio. All shaders
(which have been generated in memory or read from archives for example) will be emitted
into a temporary file at runtime for this purpose. To debug your shaders, choose
Debug->Direct3D->StartWithDirect3DDebugging in Visual Studio, and for every shader a
file named 'irr_dbg_shader_%%.vsh' or 'irr_dbg_shader_%%.psh' will be created. Drag'n'drop
the file you want to debug into visual studio. That's it. You can now set breakpoints and
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
for this shader model is not available anymore in SDKs after Oct2006. You need to
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_COMPILE_WITH_CG_ to enable Cg Shading Language support
//#define _IRR_COMPILE_WITH_CG_
#ifdef NO_IRR_COMPILE_WITH_CG_
#undef _IRR_COMPILE_WITH_CG_
#endif
#if !defined(_IRR_COMPILE_WITH_OPENGL_) && !defined(_IRR_COMPILE_WITH_DIRECT3D_9_)
#undef _IRR_COMPILE_WITH_CG_
#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
tool <http://developer.nvidia.com/object/nvperfhud_home.html>. */
#undef _IRR_USE_NVIDIA_PERFHUD_
//! Define one of the three setting for Burning's Video Software Rasterizer
/** So if we were marketing guys we could say Irrlicht has 4 Software-Rasterizers.
In a Nutshell:
All Burnings Rasterizers use 32 Bit Backbuffer, 32Bit Texture & 32 Bit Z or WBuffer,
16 Bit/32 Bit can be adjusted on a global flag.
BURNINGVIDEO_RENDERER_BEAUTIFUL
32 Bit + Vertexcolor + Lighting + Per Pixel Perspective Correct + SubPixel/SubTexel Correct +
Bilinear Texturefiltering + WBuffer
BURNINGVIDEO_RENDERER_FAST
32 Bit + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + WBuffer +
Bilinear Dithering TextureFiltering + WBuffer
BURNINGVIDEO_RENDERER_ULTRA_FAST
16Bit + SubPixel/SubTexel Correct + ZBuffer
*/
#define BURNINGVIDEO_RENDERER_BEAUTIFUL
//#define BURNINGVIDEO_RENDERER_FAST
//#define BURNINGVIDEO_RENDERER_ULTRA_FAST
//#define BURNINGVIDEO_RENDERER_CE
//! Uncomment the following line if you want to ignore the deprecated warnings
//#define IGNORE_DEPRECATED_WARNING
//! Define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ if you want to be able to load
/** .irr scenes using ISceneManager::loadScene */
#define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_
#ifdef NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_
#undef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_
#endif
//! Define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ if you want to use bone based
/** animated meshes. If you compile without this, you will be unable to load
B3D, MS3D or X meshes */
@ -455,135 +348,8 @@ B3D, MS3D or X meshes */
#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_SMF_LOADER_ if you want to load 3D World Studio mesh files
#define _IRR_COMPILE_WITH_SMF_LOADER_
#ifdef NO_IRR_COMPILE_WITH_SMF_LOADER_
#undef _IRR_COMPILE_WITH_SMF_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_
@ -595,66 +361,11 @@ B3D, MS3D or X meshes */
#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 compressed .dds files
// Patent problem isn't related to this loader.
#define _IRR_COMPILE_WITH_DDS_LOADER_
#ifdef NO_IRR_COMPILE_WITH_DDS_LOADER_
#undef _IRR_COMPILE_WITH_DDS_LOADER_
#endif
//! Define _IRR_COMPILE_WITH_DDS_DECODER_LOADER_ if you want to load .dds files
//! loader will decompress these files and will send to the memory as uncompressed files.
// Outcommented because
// a) it doesn't compile on 64-bit currently
// b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader
// 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_DECODER_LOADER_
#ifdef NO_IRR_COMPILE_WITH_DDS_DECODER_LOADER_
#undef _IRR_COMPILE_WITH_DDS_DECODER_LOADER_
#endif
#ifdef _IRR_COMPILE_WITH_DDS_DECODER_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_
@ -666,31 +377,11 @@ B3D, MS3D or X meshes */
#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. */
@ -711,38 +402,10 @@ ones. */
/** 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_
//#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
@ -750,16 +413,6 @@ currently only supports zip archives, though. */
#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_
@ -829,68 +482,14 @@ precision will be lower but speed higher. currently X86 only
#endif
#endif
// XBox does not have OpenGL or DirectX9
#if defined(_IRR_XBOX_PLATFORM_)
#undef _IRR_COMPILE_WITH_OPENGL_
#undef _IRR_COMPILE_WITH_DIRECT3D_9_
#endif
//! WinCE does not have OpenGL or DirectX9. use minimal loaders
#if defined(_WIN32_WCE)
#undef _IRR_COMPILE_WITH_OPENGL_
#undef _IRR_COMPILE_WITH_DIRECT3D_8_
#undef _IRR_COMPILE_WITH_DIRECT3D_9_
#undef BURNINGVIDEO_RENDERER_BEAUTIFUL
#undef BURNINGVIDEO_RENDERER_FAST
#undef BURNINGVIDEO_RENDERER_ULTRA_FAST
#define BURNINGVIDEO_RENDERER_CE
#undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
#define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
//#define _IRR_WCHAR_FILESYSTEM
#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
//#undef _IRR_COMPILE_WITH_MD2_LOADER_
#undef _IRR_COMPILE_WITH_MD3_LOADER_
#undef _IRR_COMPILE_WITH_3DS_LOADER_
#undef _IRR_COMPILE_WITH_COLLADA_LOADER_
#undef _IRR_COMPILE_WITH_CSM_LOADER_
#undef _IRR_COMPILE_WITH_BSP_LOADER_
#undef _IRR_COMPILE_WITH_DMF_LOADER_
#undef _IRR_COMPILE_WITH_LMTS_LOADER_
#undef _IRR_COMPILE_WITH_MY3D_LOADER_
#undef _IRR_COMPILE_WITH_OBJ_LOADER_
#undef _IRR_COMPILE_WITH_OCT_LOADER_
#undef _IRR_COMPILE_WITH_OGRE_LOADER_
#undef _IRR_COMPILE_WITH_LWO_LOADER_
#undef _IRR_COMPILE_WITH_STL_LOADER_
#undef _IRR_COMPILE_WITH_IRR_WRITER_
#undef _IRR_COMPILE_WITH_COLLADA_WRITER_
#undef _IRR_COMPILE_WITH_STL_WRITER_
#undef _IRR_COMPILE_WITH_OBJ_WRITER_
//#undef _IRR_COMPILE_WITH_BMP_LOADER_
//#undef _IRR_COMPILE_WITH_JPG_LOADER_
#undef _IRR_COMPILE_WITH_PCX_LOADER_
//#undef _IRR_COMPILE_WITH_PNG_LOADER_
#undef _IRR_COMPILE_WITH_PPM_LOADER_
#undef _IRR_COMPILE_WITH_PSD_LOADER_
//#undef _IRR_COMPILE_WITH_TGA_LOADER_
#undef _IRR_COMPILE_WITH_WAL_LOADER_
#undef _IRR_COMPILE_WITH_BMP_WRITER_
#undef _IRR_COMPILE_WITH_JPG_WRITER_
#undef _IRR_COMPILE_WITH_PCX_WRITER_
#undef _IRR_COMPILE_WITH_PNG_WRITER_
#undef _IRR_COMPILE_WITH_PPM_WRITER_
#undef _IRR_COMPILE_WITH_PSD_WRITER_
#undef _IRR_COMPILE_WITH_TGA_WRITER_
#endif
#ifndef _IRR_WINDOWS_API_
#undef _IRR_WCHAR_FILESYSTEM
#endif
#if defined(__sparc__) || defined(__sun__)
#define __BIG_ENDIAN__
#endif
#if defined(_IRR_SOLARIS_PLATFORM_)
#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
#endif
@ -901,31 +500,5 @@ precision will be lower but speed higher. currently X86 only
#undef __IRR_HAS_S64
#endif
// These depend on XML
#ifndef _IRR_COMPILE_WITH_XML_
#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
#undef _IRR_COMPILE_WITH_IRR_WRITER_
#undef _IRR_COMPILE_WITH_COLLADA_WRITER_
#undef _IRR_COMPILE_WITH_COLLADA_LOADER_
#endif
#if defined(__BORLANDC__)
#include <tchar.h>
// Borland 5.5.1 does not have _strcmpi defined
#if __BORLANDC__ == 0x551
// #define _strcmpi strcmpi
#undef _tfinddata_t
#undef _tfindfirst
#undef _tfindnext
#define _tfinddata_t __tfinddata_t
#define _tfindfirst __tfindfirst
#define _tfindnext __tfindnext
typedef long intptr_t;
#endif
#endif
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__

File diff suppressed because it is too large Load Diff

View File

@ -1,166 +0,0 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_3DS_MESH_FILE_LOADER_H_INCLUDED__
#define __C_3DS_MESH_FILE_LOADER_H_INCLUDED__
#include "IMeshLoader.h"
#include "IFileSystem.h"
#include "ISceneManager.h"
#include "irrString.h"
#include "SMesh.h"
#include "matrix4.h"
namespace irr
{
namespace scene
{
//! Meshloader capable of loading 3ds meshes.
class C3DSMeshFileLoader : public IMeshLoader
{
public:
//! Constructor
C3DSMeshFileLoader(ISceneManager* smgr, io::IFileSystem* fs);
//! destructor
virtual ~C3DSMeshFileLoader();
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".cob")
virtual bool isALoadableFileExtension(const io::path& filename) const;
//! creates/loads an animated mesh from the file.
//! \return Pointer to the created mesh. Returns 0 if loading failed.
//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
//! See IReferenceCounted::drop() for more information.
virtual IAnimatedMesh* createMesh(io::IReadFile* file);
private:
// byte-align structures
#include "irrpack.h"
struct ChunkHeader
{
u16 id;
s32 length;
} PACK_STRUCT;
// Default alignment
#include "irrunpack.h"
struct ChunkData
{
ChunkData() : read(0) {}
ChunkHeader header;
s32 read;
};
struct SCurrentMaterial
{
void clear() {
Material=video::SMaterial();
Name="";
Filename[0]="";
Filename[1]="";
Filename[2]="";
Filename[3]="";
Filename[4]="";
Strength[0]=0.f;
Strength[1]=0.f;
Strength[2]=0.f;
Strength[3]=0.f;
Strength[4]=0.f;
}
video::SMaterial Material;
core::stringc Name;
core::stringc Filename[5];
f32 Strength[5];
};
struct SMaterialGroup
{
SMaterialGroup() : faceCount(0), faces(0) {};
SMaterialGroup(const SMaterialGroup& o)
{
*this = o;
}
~SMaterialGroup()
{
clear();
}
void clear()
{
delete [] faces;
faces = 0;
faceCount = 0;
}
void operator =(const SMaterialGroup& o)
{
MaterialName = o.MaterialName;
faceCount = o.faceCount;
faces = new u16[faceCount];
for (u16 i=0; i<faceCount; ++i)
faces[i] = o.faces[i];
}
core::stringc MaterialName;
u16 faceCount;
u16* faces;
};
bool readChunk(io::IReadFile* file, ChunkData* parent);
bool readMaterialChunk(io::IReadFile* file, ChunkData* parent);
bool readFrameChunk(io::IReadFile* file, ChunkData* parent);
bool readTrackChunk(io::IReadFile* file, ChunkData& data,
IMeshBuffer* mb, const core::vector3df& pivot);
bool readObjectChunk(io::IReadFile* file, ChunkData* parent);
bool readPercentageChunk(io::IReadFile* file, ChunkData* chunk, f32& percentage);
bool readColorChunk(io::IReadFile* file, ChunkData* chunk, video::SColor& out);
void readChunkData(io::IReadFile* file, ChunkData& data);
void readString(io::IReadFile* file, ChunkData& data, core::stringc& out);
void readVertices(io::IReadFile* file, ChunkData& data);
void readIndices(io::IReadFile* file, ChunkData& data);
void readMaterialGroup(io::IReadFile* file, ChunkData& data);
void readTextureCoords(io::IReadFile* file, ChunkData& data);
void composeObject(io::IReadFile* file, const core::stringc& name);
void loadMaterials(io::IReadFile* file);
void cleanUp();
scene::ISceneManager* SceneManager;
io::IFileSystem* FileSystem;
f32* Vertices;
u16* Indices;
u32* SmoothingGroups;
core::array<u16> TempIndices;
f32* TCoords;
u16 CountVertices;
u16 CountFaces; // = CountIndices/4
u16 CountTCoords;
core::array<SMaterialGroup> MaterialGroups;
SCurrentMaterial CurrentMaterial;
core::array<SCurrentMaterial> Materials;
core::array<core::stringc> MeshBufferNames;
core::matrix4 TransformationMatrix;
SMesh* Mesh;
};
} // end namespace scene
} // end namespace irr
#endif

View File

@ -749,6 +749,8 @@ void CColorConverter::convert_viaFormat(const void* sP, ECOLOR_FORMAT sF, s32 sN
#endif
}
break;
default:
break;
}
}

View File

@ -87,16 +87,10 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
#ifdef _IRR_COMPILE_WITH_X11_
display(0), visual(0), screennr(0), window(0), StdHints(0), SoftwareImage(0),
XInputMethod(0), XInputContext(0),
#ifdef COMPILE_WITH_GLX
#ifdef _IRR_COMPILE_WITH_OPENGL_
glxWin(0),
glxContext(0),
Context(0),
#endif
#ifdef COMPILE_WITH_EGL
eglDisplay(0),
eglContext(0),
eglSurface(0),
#endif
#endif
Width(param.WindowSize.Width), Height(param.WindowSize.Height),
WindowHasFocus(false), WindowMinimized(false),
@ -186,8 +180,8 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
if (display)
{
#ifdef COMPILE_WITH_GLX
if (glxContext)
#ifdef _IRR_COMPILE_WITH_OPENGL_
if (Context)
{
if (glxWin)
{
@ -199,11 +193,11 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
if (!glXMakeCurrent(display, None, NULL))
os::Printer::log("Could not release glx context.", ELL_WARNING);
}
glXDestroyContext(display, glxContext);
glXDestroyContext(display, Context);
if (glxWin)
glXDestroyWindow(display, glxWin);
}
#endif // #ifdef COMPILE_WITH_GLX
#endif // #ifdef _IRR_COMPILE_WITH_OPENGL_
if (SoftwareImage)
XDestroyImage(SoftwareImage);
@ -212,10 +206,10 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
{
XDestroyWindow(display,window);
}
// Reset fullscreen resolution change
restoreResolution();
restoreResolution();
if (!ExternalWindow)
{
XCloseDisplay(display);
@ -275,14 +269,14 @@ bool CIrrDeviceLinux::restoreResolution()
return false;
XRROutputInfo* output = XRRGetOutputInfo(display, res, output_id);
if (!output || !output->crtc || output->connection == RR_Disconnected)
if (!output || !output->crtc || output->connection == RR_Disconnected)
{
XRRFreeOutputInfo(output);
return false;
}
XRRCrtcInfo* crtc = XRRGetCrtcInfo(display, res, output->crtc);
if (!crtc)
if (!crtc)
{
XRRFreeOutputInfo(output);
return false;
@ -390,7 +384,7 @@ bool CIrrDeviceLinux::changeResolution()
XRRFreeScreenResources(res);
break;
}
XRRCrtcInfo* crtc = XRRGetCrtcInfo(display, res, output->crtc);
if (!crtc)
{
@ -410,12 +404,12 @@ bool CIrrDeviceLinux::changeResolution()
if (crtc->rotation & (XRANDR_ROTATION_LEFT|XRANDR_ROTATION_RIGHT))
{
size = core::dimension2d<u32>(mode->height, mode->width);
}
else
}
else
{
size = core::dimension2d<u32>(mode->width, mode->height);
}
if (bestMode == -1 && mode->id == output->modes[0])
{
mode0_size = size;
@ -463,7 +457,7 @@ bool CIrrDeviceLinux::changeResolution()
Status s = XRRSetCrtcConfig(display, res, output->crtc, CurrentTime,
crtc->x, crtc->y, output->modes[bestMode],
crtc->rotation, &output_id, 1);
if (s == Success)
UseXRandR = true;
@ -472,7 +466,7 @@ bool CIrrDeviceLinux::changeResolution()
XRRFreeScreenResources(res);
break;
}
if (UseXRandR == false)
{
os::Printer::log("Could not get video output. Try to run in windowed mode.", ELL_WARNING);
@ -514,7 +508,7 @@ void IrrPrintXGrabError(int grabResult, const c8 * grabCommand )
}
#endif
#ifdef COMPILE_WITH_GLX
#ifdef _IRR_COMPILE_WITH_OPENGL_
static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, bool force_legacy_context)
{
GLXContext Context;
@ -567,7 +561,7 @@ static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, boo
PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = 0;
glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)
glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB" );
if(!force_legacy_context)
{
// create core 4.3 context
@ -575,7 +569,7 @@ static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, boo
Context = glXCreateContextAttribsARB(display, glxFBConfig, 0, True, GLContextDebugBit ? core43ctxdebug : core43ctx);
if (!XErrorSignaled)
return Context;
XErrorSignaled = false;
// create core 3.3 context
os::Printer::log("Creating OpenGL 3.3 context...", ELL_INFORMATION);
@ -622,37 +616,8 @@ bool CIrrDeviceLinux::createWindow()
changeResolution();
#ifdef COMPILE_WITH_EGL
eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
#ifdef _IRR_COMPILE_WITH_OPENGL_
if(!eglInitialize(eglDisplay, NULL, NULL))
{
printf("EGLInit error %d\n", eglGetError());
}
int attrib[] = {
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
EGL_RED_SIZE, 4,
EGL_GREEN_SIZE, 4,
EGL_BLUE_SIZE, 4,
EGL_ALPHA_SIZE, CreationParams.WithAlphaChannel?1:0,
EGL_DEPTH_SIZE, CreationParams.ZBufferBits, //10,11
EGL_NONE
};
EGLConfig conf;
int size;
if (!eglChooseConfig(eglDisplay, attrib, 0, 0, &size))
{
printf("EGL Config count error %x\n", eglGetError());
}
printf("size is %d\n", size);
if (!eglChooseConfig(eglDisplay, attrib, &conf, 1, &size))
{
printf("EGL Config error %x\n", eglGetError());
}
#endif
#ifdef COMPILE_WITH_GLX
GLXFBConfig glxFBConfig;
int major, minor;
bool isAvailableGLX=false;
@ -876,7 +841,7 @@ bool CIrrDeviceLinux::createWindow()
// don't use the XVisual with OpenGL, because it ignores all requested
// properties of the CreationParams
else if (!visual)
#endif // COMPILE_WITH_GLX
#endif // _IRR_COMPILE_WITH_OPENGL_
// create visual with standard X methods
{
@ -949,36 +914,7 @@ bool CIrrDeviceLinux::createWindow()
Atom wmDelete;
wmDelete = XInternAtom(display, wmDeleteWindow, True);
XSetWMProtocols(display, window, &wmDelete, 1);
#ifdef COMPILE_WITH_EGL
eglSurface = eglCreateWindowSurface(eglDisplay, conf, window, NULL);
if (eglSurface == EGL_NO_SURFACE )
{
printf("EGL NO SURFACE %x\n", eglGetError());
}
//~ if (!eglBindAPI(EGL_OPENGL_API))
if (!eglBindAPI(EGL_OPENGL_ES_API))
{
printf("EGL bind api %x\n", eglGetError());
}
int egl_context_attrib[] =
{
EGL_CONTEXT_MAJOR_VERSION_KHR, 3,
//~ EGL_CONTEXT_MINOR_VERSION_KHR, 3,
EGL_CONTEXT_MINOR_VERSION_KHR, 0,
EGL_NONE
};
eglContext = eglCreateContext(eglDisplay, conf, EGL_NO_CONTEXT, egl_context_attrib);
if (eglContext == EGL_NO_CONTEXT)
{
printf("EGL Context %x\n", eglGetError());
}
if (!eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext))
{
printf("EGL Make current %x\n", eglGetError());
}
#endif
if (CreationParams.Fullscreen)
{
if (netWM)
@ -1005,11 +941,11 @@ bool CIrrDeviceLinux::createWindow()
xev.xclient.format = 32;
xev.xclient.data.l[0] = 1;
xev.xclient.data.l[1] = WMFullscreenAtom;
XSendEvent(display, RootWindow(display, visual->screen), false,
XSendEvent(display, RootWindow(display, visual->screen), false,
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
XFlush(display);
// Wait until window state is already changed to fullscreen
bool fullscreen = false;
for (int i = 0; i < 500; i++)
@ -1020,36 +956,36 @@ bool CIrrDeviceLinux::createWindow()
unsigned char* data = NULL;
int s = XGetWindowProperty(display, window, WMStateAtom,
0l, 1024, False, XA_ATOM, &type,
&format, &numItems, &bytesAfter,
0l, 1024, False, XA_ATOM, &type,
&format, &numItems, &bytesAfter,
&data);
if (s == Success)
if (s == Success)
{
Atom* atoms = (Atom*)data;
for (unsigned int i = 0; i < numItems; ++i)
for (unsigned int i = 0; i < numItems; ++i)
{
if (atoms[i] == WMFullscreenAtom)
if (atoms[i] == WMFullscreenAtom)
{
fullscreen = true;
break;
}
}
}
XFree(data);
if (fullscreen == true)
break;
usleep(1000);
}
if (!fullscreen)
{
os::Printer::log("Warning! Got timeout while checking fullscreen sate", ELL_WARNING);
}
}
}
else
{
@ -1089,10 +1025,10 @@ bool CIrrDeviceLinux::createWindow()
// Currently broken in X, see Bug ID 2795321
// XkbSetDetectableAutoRepeat(display, True, &AutorepeatSupport);
#ifdef COMPILE_WITH_GLX
#ifdef _IRR_COMPILE_WITH_OPENGL_
// connect glx context to window
glxContext=0;
Context=0;
if (isAvailableGLX && CreationParams.DriverType==video::EDT_OPENGL)
{
if (UseGLXWindow)
@ -1100,13 +1036,13 @@ bool CIrrDeviceLinux::createWindow()
glxWin=glXCreateWindow(display,glxFBConfig,window,NULL);
if (glxWin)
{
glxContext = getMeAGLContext(display, glxFBConfig);
if (glxContext)
Context = getMeAGLContext(display, glxFBConfig, CreationParams.ForceLegacyDevice);
if (Context)
{
if (!glXMakeContextCurrent(display, glxWin, glxWin, glxContext))
if (!glXMakeContextCurrent(display, glxWin, glxWin, Context))
{
os::Printer::log("Could not make context current.", ELL_WARNING);
glXDestroyContext(display, glxContext);
glXDestroyContext(display, Context);
}
}
else
@ -1121,13 +1057,13 @@ bool CIrrDeviceLinux::createWindow()
}
else
{
glxContext = glXCreateContext(display, visual, NULL, True);
if (glxContext)
Context = glXCreateContext(display, visual, NULL, True);
if (Context)
{
if (!glXMakeCurrent(display, window, glxContext))
if (!glXMakeCurrent(display, window, Context))
{
os::Printer::log("Could not make context current.", ELL_WARNING);
glXDestroyContext(display, glxContext);
glXDestroyContext(display, Context);
}
}
else
@ -1136,7 +1072,7 @@ bool CIrrDeviceLinux::createWindow()
}
}
}
#endif // COMPILE_WITH_GLX
#endif // _IRR_COMPILE_WITH_OPENGL_
Window tmp;
u32 borderWidth;
@ -1177,7 +1113,6 @@ bool CIrrDeviceLinux::createWindow()
//! create the driver
void CIrrDeviceLinux::createDriver()
{
bool tmp = false;
switch(CreationParams.DriverType)
{
#ifdef _IRR_COMPILE_WITH_X11_
@ -1199,25 +1134,27 @@ void CIrrDeviceLinux::createDriver()
break;
case video::EDT_OPENGL:
#ifdef COMPILE_WITH_GLX
tmp |= (glxContext != 0);
#endif
#ifdef COMPILE_WITH_EGL
tmp |= (eglContext != 0);
#endif
if (tmp)
#ifdef _IRR_COMPILE_WITH_OPENGL_
if (Context)
VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this);
#else
os::Printer::log("No OpenGL support compiled in.", ELL_ERROR);
#endif
break;
case video::EDT_OGLES2:
{
#ifdef _IRR_COMPILE_WITH_OGLES2_
video::SExposedVideoData data;
data.OpenGLLinux.X11Window = window;
data.OpenGLLinux.X11Display = display;
VideoDriver = video::createOGLES2Driver(CreationParams, data, FileSystem);
#else
os::Printer::log("No OpenGL ES 2.0 support compiled in.", ELL_ERROR);
#endif
break;
}
case video::EDT_DIRECT3D8:
case video::EDT_DIRECT3D9:
os::Printer::log("This driver is not available in Linux. Try OpenGL or Software renderer.",
@ -1889,7 +1826,7 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
#ifdef _IRR_LINUX_X11_RANDR_
output_id = BadRROutput;
old_mode = BadRRMode;
while (XRRQueryExtension(display, &eventbase, &errorbase))
{
XRROutputInfo* output = NULL;
@ -1899,52 +1836,52 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
XRRScreenResources* res = XRRGetScreenResources(display, DefaultRootWindow(display));
if (!res)
break;
RROutput primary_id = XRRGetOutputPrimary(display, DefaultRootWindow(display));
for (int i = 0; i < res->noutput; i++)
for (int i = 0; i < res->noutput; i++)
{
XRROutputInfo* output_tmp = XRRGetOutputInfo(display, res, res->outputs[i]);
if (!output_tmp || !output_tmp->crtc || output_tmp->connection == RR_Disconnected)
if (!output_tmp || !output_tmp->crtc || output_tmp->connection == RR_Disconnected)
{
XRRFreeOutputInfo(output_tmp);
continue;
}
XRRCrtcInfo* crtc_tmp = XRRGetCrtcInfo(display, res, output_tmp->crtc);
if (!crtc_tmp)
if (!crtc_tmp)
{
XRRFreeOutputInfo(output_tmp);
continue;
}
if (res->outputs[i] == primary_id ||
output_id == BadRROutput || crtc_tmp->x < crtc->x ||
(crtc_tmp->x == crtc->x && crtc_tmp->y < crtc->y))
{
XRRFreeCrtcInfo(crtc);
XRRFreeOutputInfo(output);
XRRFreeOutputInfo(output);
output = output_tmp;
crtc = crtc_tmp;
crtc = crtc_tmp;
output_id = res->outputs[i];
}
else
{
XRRFreeCrtcInfo(crtc_tmp);
XRRFreeOutputInfo(output_tmp);
XRRFreeOutputInfo(output_tmp);
}
if (res->outputs[i] == primary_id)
break;
}
if (output_id == BadRROutput)
{
os::Printer::log("Could not get video output.", ELL_WARNING);
break;
}
crtc_x = crtc->x;
crtc_y = crtc->y;
@ -1956,14 +1893,14 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
if (crtc->rotation & (XRANDR_ROTATION_LEFT|XRANDR_ROTATION_RIGHT))
{
size = core::dimension2d<u32>(mode->height, mode->width);
}
else
}
else
{
size = core::dimension2d<u32>(mode->width, mode->height);
}
for (int j = 0; j < output->nmode; j++)
{
{
if (mode->id == output->modes[j])
{
VideoModeList.addMode(size, defaultDepth);
@ -1977,15 +1914,15 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
VideoModeList.setDesktop(defaultDepth, size);
}
}
XRRFreeCrtcInfo(crtc);
XRRFreeOutputInfo(output);
XRRFreeScreenResources(res);
XRRFreeScreenResources(res);
break;
}
#endif
}
if (display && temporaryDisplay)
{
XCloseDisplay(display);
@ -2367,7 +2304,7 @@ void CIrrDeviceLinux::pollJoysticks()
// Send an irrlicht joystick event once per ::run() even if no new data were received.
(void)postEventFromUser(info.persistentData);
#ifdef _IRR_COMPILE_WITH_X11_
if (event_received)
{
@ -2475,12 +2412,12 @@ bool CIrrDeviceLinux::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &bright
const c8* CIrrDeviceLinux::getTextFromClipboard() const
{
#if defined(_IRR_COMPILE_WITH_X11_)
if (X_ATOM_CLIPBOARD == None)
if (X_ATOM_CLIPBOARD == None)
{
os::Printer::log("Couldn't access X clipboard", ELL_WARNING);
return 0;
}
Window ownerWindow = XGetSelectionOwner(display, X_ATOM_CLIPBOARD);
if (ownerWindow == window)
{
@ -2494,38 +2431,38 @@ const c8* CIrrDeviceLinux::getTextFromClipboard() const
Atom selection = XInternAtom(display, "IRR_SELECTION", False);
XConvertSelection(display, X_ATOM_CLIPBOARD, XA_STRING, selection, window, CurrentTime);
const int SELECTION_RETRIES = 500;
int i = 0;
for (i = 0; i < SELECTION_RETRIES; i++)
{
XEvent xevent;
bool res = XCheckTypedWindowEvent(display, window, SelectionNotify, &xevent);
if (res && xevent.xselection.selection == X_ATOM_CLIPBOARD)
if (res && xevent.xselection.selection == X_ATOM_CLIPBOARD)
break;
usleep(1000);
}
if (i == SELECTION_RETRIES)
{
os::Printer::log("Timed out waiting for SelectionNotify event", ELL_WARNING);
return 0;
}
Atom type;
int format;
unsigned long numItems, dummy;
unsigned char *data;
int result = XGetWindowProperty(display, window, selection, 0, INT_MAX/4,
False, AnyPropertyType, &type, &format,
int result = XGetWindowProperty(display, window, selection, 0, INT_MAX/4,
False, AnyPropertyType, &type, &format,
&numItems, &dummy, &data);
if (result == Success)
Clipboard = (irr::c8*)data;
XFree (data);
return Clipboard.c_str();
#else

View File

@ -18,15 +18,13 @@
#ifdef _IRR_COMPILE_WITH_X11_
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include <GLES3/gl3.h>
#include <GL/gl.h>
#define GLX_GLXEXT_LEGACY 1
#include <GL/glx.h>
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
#define GLX_GLXEXT_PROTOTYPES
#include "glxext.h"
#endif
//#define COMPILE_WITH_EGL
#ifdef COMPILE_WITH_EGL
#include <EGL/egl.h>
#include <EGL/eglext.h>
#endif
#include <X11/Xlib.h>
@ -410,17 +408,10 @@ namespace irr
int crtc_x;
int crtc_y;
#endif
#ifdef COMPILE_WITH_GLX
#ifdef _IRR_COMPILE_WITH_OPENGL_
GLXWindow glxWin;
GLXContext glxContext;
#endif
#ifdef COMPILE_WITH_EGL
public:
EGLDisplay eglDisplay;
EGLContext eglContext;
EGLSurface eglSurface;
private:
#endif
GLXContext Context;
#endif
#endif
u32 Width, Height;
bool WindowHasFocus;

View File

@ -14,7 +14,7 @@
#if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__)
#include <sys/param.h>
#include <sys/types.h>
#include <linux/sysctl.h>
#include <sys/sysctl.h>
#endif
#endif

View File

@ -70,14 +70,6 @@
//! Enable debug features
#define SCENEMANAGER_DEBUG
#ifdef _IRR_COMPILE_WITH_3DS_LOADER_
#include "C3DSMeshFileLoader.h"
#endif
#ifdef _IRR_COMPILE_WITH_X_LOADER_
#include "CXMeshFileLoader.h"
#endif
namespace irr
{
namespace scene
@ -134,13 +126,6 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
#ifdef _IRR_COMPILE_WITH_B3D_LOADER_
MeshLoaderList.push_back(new CB3DMeshFileLoader(this));
#endif
#ifdef _IRR_COMPILE_WITH_3DS_LOADER_
MeshLoaderList.push_back(new C3DSMeshFileLoader(this, FileSystem));
#endif
#ifdef _IRR_COMPILE_WITH_X_LOADER_
MeshLoaderList.push_back(new CXMeshFileLoader(this, FileSystem));
#endif
// factories

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +0,0 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_X_MESH_FILE_LOADER_H_INCLUDED__
#define __C_X_MESH_FILE_LOADER_H_INCLUDED__
#include "IMeshLoader.h"
#include "irrString.h"
#include "CSkinnedMesh.h"
namespace irr
{
namespace io
{
class IFileSystem;
class IReadFile;
} // end namespace io
namespace scene
{
class IMeshManipulator;
//! Meshloader capable of loading x meshes.
class CXMeshFileLoader : public IMeshLoader
{
public:
//! Constructor
CXMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs);
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".cob")
virtual bool isALoadableFileExtension(const io::path& filename) const;
//! creates/loads an animated mesh from the file.
//! \return Pointer to the created mesh. Returns 0 if loading failed.
//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
//! See IReferenceCounted::drop() for more information.
virtual IAnimatedMesh* createMesh(io::IReadFile* file);
struct SXTemplateMaterial
{
core::stringc Name; // template name from Xfile
video::SMaterial Material; // material
};
struct SXMesh
{
SXMesh() : MaxSkinWeightsPerVertex(0), MaxSkinWeightsPerFace(0), BoneCount(0),AttachedJointID(-1),HasSkinning(false), HasVertexColors(false) {}
// this mesh contains triangulated texture data.
// because in an .x file, faces can be made of more than 3
// vertices, the indices data structure is triangulated during the
// loading process. The IndexCountPerFace array is filled during
// this triangulation process and stores how much indices belong to
// every face. This data structure can be ignored, because all data
// in this structure is triangulated.
core::stringc Name;
u32 MaxSkinWeightsPerVertex;
u32 MaxSkinWeightsPerFace;
u32 BoneCount;
core::array<u16> IndexCountPerFace; // default 3, but could be more
core::array<scene::SSkinMeshBuffer*> Buffers;
core::array<video::S3DVertex> Vertices;
core::array<core::vector2df> TCoords2;
core::array<u32> Indices;
core::array<u32> FaceMaterialIndices; // index of material for each face
core::array<video::SMaterial> Materials; // material array
core::array<u32> WeightJoint;
core::array<u32> WeightNum;
s32 AttachedJointID;
bool HasSkinning;
bool HasVertexColors;
};
private:
bool load(io::IReadFile* file);
bool readFileIntoMemory(io::IReadFile* file);
bool parseFile();
bool parseDataObject();
bool parseDataObjectTemplate();
bool parseDataObjectFrame(CSkinnedMesh::SJoint *parent);
bool parseDataObjectTransformationMatrix(core::matrix4 &mat);
bool parseDataObjectMesh(SXMesh &mesh);
bool parseDataObjectSkinWeights(SXMesh &mesh);
bool parseDataObjectSkinMeshHeader(SXMesh &mesh);
bool parseDataObjectMeshNormals(SXMesh &mesh);
bool parseDataObjectMeshTextureCoords(SXMesh &mesh);
bool parseDataObjectMeshVertexColors(SXMesh &mesh);
bool parseDataObjectMeshMaterialList(SXMesh &mesh);
bool parseDataObjectMaterial(video::SMaterial& material);
bool parseDataObjectAnimationSet();
bool parseDataObjectAnimation();
bool parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint);
bool parseDataObjectTextureFilename(core::stringc& texturename);
bool parseUnknownDataObject();
//! places pointer to next begin of a token, and ignores comments
void findNextNoneWhiteSpace();
//! places pointer to next begin of a token, which must be a number,
// and ignores comments
void findNextNoneWhiteSpaceNumber();
//! returns next parseable token. Returns empty string if no token there
core::stringc getNextToken();
//! reads header of dataobject including the opening brace.
//! returns false if error happened, and writes name of object
//! if there is one
bool readHeadOfDataObject(core::stringc* outname=0);
//! checks for closing curly brace, returns false if not there
bool checkForClosingBrace();
//! checks for one following semicolons, returns false if not there
bool checkForOneFollowingSemicolons();
//! checks for two following semicolons, returns false if they are not there
bool checkForTwoFollowingSemicolons();
//! reads a x file style string
bool getNextTokenAsString(core::stringc& out);
void readUntilEndOfLine();
u16 readBinWord();
u32 readBinDWord();
u32 readInt();
f32 readFloat();
bool readVector2(core::vector2df& vec);
bool readVector3(core::vector3df& vec);
bool readMatrix(core::matrix4& mat);
bool readRGB(video::SColor& color);
bool readRGBA(video::SColor& color);
ISceneManager* SceneManager;
io::IFileSystem* FileSystem;
core::array<CSkinnedMesh::SJoint*> *AllJoints;
CSkinnedMesh* AnimatedMesh;
c8* Buffer;
const c8* P;
c8* End;
// counter for number arrays in binary format
u32 BinaryNumCount;
u32 Line;
io::path FilePath;
CSkinnedMesh::SJoint *CurFrame;
core::array<SXMesh*> Meshes;
core::array<SXTemplateMaterial> TemplateMaterials;
u32 MajorVersion;
u32 MinorVersion;
bool BinaryFormat;
c8 FloatSize;
};
} // end namespace scene
} // end namespace irr
#endif