Commit 0b034027 authored by hybrid's avatar hybrid

Merged from 1.5 branch to trunk, all changes from 1821 to 1835. Mostly warning...

Merged from 1.5 branch to trunk, all changes from 1821 to 1835. Mostly warning fixes, GL ASM shaders repaired, d3d9 RTTs less memory consuming, skinned mesh bboxes updating.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1837 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f778a1eb
...@@ -20,7 +20,9 @@ tutorial, we use a lot stuff from the gui namespace. ...@@ -20,7 +20,9 @@ tutorial, we use a lot stuff from the gui namespace.
using namespace irr; using namespace irr;
using namespace gui; using namespace gui;
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
/* /*
...@@ -38,15 +40,15 @@ scene::ICameraSceneNode* Camera[2] = { 0, 0}; ...@@ -38,15 +40,15 @@ scene::ICameraSceneNode* Camera[2] = { 0, 0};
/* /*
Toggle between various cameras Toggle between various cameras
*/ */
void setActiveCamera ( scene::ICameraSceneNode* newActive ) void setActiveCamera(scene::ICameraSceneNode* newActive)
{ {
if ( 0 == Device ) if (0 == Device)
return; return;
scene::ICameraSceneNode* active = Device->getSceneManager()->getActiveCamera (); Device->getSceneManager()->getActiveCamera();
newActive->setInputReceiverEnabled ( true ); newActive->setInputReceiverEnabled(true);
Device->getSceneManager()->setActiveCamera ( newActive ); Device->getSceneManager()->setActiveCamera(newActive);
} }
/* /*
...@@ -73,43 +75,41 @@ void loadModel(const c8* fn) ...@@ -73,43 +75,41 @@ void loadModel(const c8* fn)
{ {
// modify the name if it a .pk3 file // modify the name if it a .pk3 file
core::stringc filename ( fn ); core::stringc filename(fn);
core::stringc extension; core::stringc extension;
core::getFileNameExtension ( extension, filename ); core::getFileNameExtension(extension, filename);
extension.make_lower(); extension.make_lower();
// if a texture is loaded apply it to the current model.. // if a texture is loaded apply it to the current model..
if ( extension == ".jpg" || if (extension == ".jpg" ||
extension == ".pcx" || extension == ".pcx" ||
extension == ".png" || extension == ".png" ||
extension == ".ppm" || extension == ".ppm" ||
extension == ".pgm" || extension == ".pgm" ||
extension == ".pbm" || extension == ".pbm" ||
extension == ".psd" || extension == ".psd" ||
extension == ".tga" || extension == ".tga" ||
extension == ".bmp" extension == ".bmp")
)
{ {
video::ITexture * texture = video::ITexture * texture =
Device->getVideoDriver()->getTexture( filename.c_str() ); Device->getVideoDriver()->getTexture( filename.c_str() );
if ( texture && Model ) if ( texture && Model )
{ {
// always reload texture // always reload texture
Device->getVideoDriver()->removeTexture ( texture ); Device->getVideoDriver()->removeTexture(texture);
texture = Device->getVideoDriver()->getTexture( filename.c_str() ); texture = Device->getVideoDriver()->getTexture( filename.c_str() );
Model->setMaterialTexture ( 0, texture ); Model->setMaterialTexture(0, texture);
} }
return; return;
} }
// if a archive is loaded add it to the FileSystems.. // if a archive is loaded add it to the FileSystems..
if ( extension == ".pk3" || if (extension == ".pk3" ||
extension == ".zip" extension == ".zip")
)
{ {
Device->getFileSystem()->addZipFileArchive( filename.c_str () ); Device->getFileSystem()->addZipFileArchive( filename.c_str() );
return; return;
} }
...@@ -154,7 +154,8 @@ void createToolBox() ...@@ -154,7 +154,8 @@ void createToolBox()
IGUIEnvironment* env = Device->getGUIEnvironment(); IGUIEnvironment* env = Device->getGUIEnvironment();
IGUIElement* root = env->getRootGUIElement(); IGUIElement* root = env->getRootGUIElement();
IGUIElement* e = root->getElementFromId(5000, true); IGUIElement* e = root->getElementFromId(5000, true);
if (e) e->remove(); if (e)
e->remove();
// create the toolbox window // create the toolbox window
IGUIWindow* wnd = env->addWindow(core::rect<s32>(600,25,800,480), IGUIWindow* wnd = env->addWindow(core::rect<s32>(600,25,800,480),
...@@ -207,13 +208,13 @@ public: ...@@ -207,13 +208,13 @@ public:
event.KeyInput.Key == irr::KEY_ESCAPE && event.KeyInput.Key == irr::KEY_ESCAPE &&
event.KeyInput.PressedDown == false) event.KeyInput.PressedDown == false)
{ {
if ( Device ) if (Device)
{ {
scene::ICameraSceneNode * camera = scene::ICameraSceneNode * camera =
Device->getSceneManager()->getActiveCamera(); Device->getSceneManager()->getActiveCamera();
if ( camera ) if (camera)
{ {
camera->setInputReceiverEnabled ( !camera->isInputReceiverEnabled() ); camera->setInputReceiverEnabled( !camera->isInputReceiverEnabled() );
} }
return true; return true;
} }
...@@ -296,10 +297,10 @@ public: ...@@ -296,10 +297,10 @@ public:
break; break;
case 1000: case 1000:
setActiveCamera ( Camera[0] ); setActiveCamera(Camera[0]);
break; break;
case 1100: case 1100:
setActiveCamera ( Camera[1] ); setActiveCamera(Camera[1]);
break; break;
} }
...@@ -412,6 +413,8 @@ public: ...@@ -412,6 +413,8 @@ public:
break; break;
} }
break;
default:
break; break;
} }
} }
...@@ -480,7 +483,7 @@ int main(int argc, char* argv[]) ...@@ -480,7 +483,7 @@ int main(int argc, char* argv[])
smgr->addLightSceneNode(0, core::vector3df(50,-50,100), smgr->addLightSceneNode(0, core::vector3df(50,-50,100),
video::SColorf(1.0f,1.0f,1.0f),20000); video::SColorf(1.0f,1.0f,1.0f),20000);
// add our media directory as "search path" // add our media directory as "search path"
Device->getFileSystem()->addFolderFileArchive ( "../../media/" ); Device->getFileSystem()->addFolderFileArchive("../../media/");
/* /*
The next step is to read the configuration file. It is stored in the xml The next step is to read the configuration file. It is stored in the xml
...@@ -523,6 +526,8 @@ int main(int argc, char* argv[]) ...@@ -523,6 +526,8 @@ int main(int argc, char* argv[])
Caption = xml->getAttributeValue(L"caption"); Caption = xml->getAttributeValue(L"caption");
} }
break; break;
default:
break;
} }
} }
...@@ -682,7 +687,7 @@ int main(int argc, char* argv[]) ...@@ -682,7 +687,7 @@ int main(int argc, char* argv[])
Camera[1] = smgr->addCameraSceneNodeFPS(); Camera[1] = smgr->addCameraSceneNodeFPS();
Camera[1]->setFarValue(20000.f); Camera[1]->setFarValue(20000.f);
setActiveCamera ( Camera[0] ); setActiveCamera(Camera[0]);
// load the irrlicht engine logo // load the irrlicht engine logo
IGUIImage *img = IGUIImage *img =
......
...@@ -171,8 +171,8 @@ int main() ...@@ -171,8 +171,8 @@ int main()
addShaderMaterial() instead of addShaderMaterialFromFiles(). addShaderMaterial() instead of addShaderMaterialFromFiles().
*/ */
c8* vsFileName = 0; // filename for the vertex shader const c8* vsFileName = 0; // filename for the vertex shader
c8* psFileName = 0; // filename for the pixel shader const c8* psFileName = 0; // filename for the pixel shader
switch(driverType) switch(driverType)
{ {
......
...@@ -13,7 +13,9 @@ nearly all other tutorials. ...@@ -13,7 +13,9 @@ nearly all other tutorials.
using namespace irr; using namespace irr;
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
/* /*
For this example, we need an event receiver, to make it possible for the user For this example, we need an event receiver, to make it possible for the user
......
...@@ -19,7 +19,9 @@ toggles between solid and detail mapped material. ...@@ -19,7 +19,9 @@ toggles between solid and detail mapped material.
using namespace irr; using namespace irr;
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
class MyEventReceiver : public IEventReceiver class MyEventReceiver : public IEventReceiver
...@@ -54,6 +56,8 @@ public: ...@@ -54,6 +56,8 @@ public:
Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ? Terrain->getMaterial(0).MaterialType == video::EMT_SOLID ?
video::EMT_DETAIL_MAP : video::EMT_SOLID); video::EMT_DETAIL_MAP : video::EMT_SOLID);
return true; return true;
default:
break;
} }
} }
...@@ -123,7 +127,7 @@ int main() ...@@ -123,7 +127,7 @@ int main()
env->getSkin()->setFont(env->getFont("../../media/fontlucida.png")); env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
// add some help text // add some help text
gui::IGUIStaticText* text = env->addStaticText( env->addStaticText(
L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map", L"Press 'W' to change wireframe mode\nPress 'D' to toggle detail map",
core::rect<s32>(10,440,250,475), true, true, 0, -1, true); core::rect<s32>(10,440,250,475), true, true, 0, -1, true);
...@@ -131,7 +135,7 @@ int main() ...@@ -131,7 +135,7 @@ int main()
scene::ICameraSceneNode* camera = scene::ICameraSceneNode* camera =
smgr->addCameraSceneNodeFPS(0,100.0f,1200.f); smgr->addCameraSceneNodeFPS(0,100.0f,1200.f);
camera->setPosition(core::vector3df(1900*2,255*2,3700*2)); camera->setPosition(core::vector3df(2700*2,255*2,2600*2));
camera->setTarget(core::vector3df(2397*2,343*2,2700*2)); camera->setTarget(core::vector3df(2397*2,343*2,2700*2));
camera->setFarValue(12000.0f); camera->setFarValue(12000.0f);
......
...@@ -13,7 +13,9 @@ for the rendering driver, create the Irrlicht Device: ...@@ -13,7 +13,9 @@ for the rendering driver, create the Irrlicht Device:
using namespace irr; using namespace irr;
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
int main() int main()
{ {
...@@ -84,8 +86,8 @@ int main() ...@@ -84,8 +86,8 @@ int main()
*/ */
// add white light // add white light
scene::ILightSceneNode* light = smgr->addLightSceneNode(0, smgr->addLightSceneNode(0, core::vector3df(-15,5,-105),
core::vector3df(-15,5,-105), video::SColorf(1.0f, 1.0f, 1.0f)); video::SColorf(1.0f, 1.0f, 1.0f));
// set ambient light // set ambient light
smgr->setAmbientLight(video::SColor(0,60,60,60)); smgr->setAmbientLight(video::SColor(0,60,60,60));
......
...@@ -58,7 +58,9 @@ Again, to be able to use the Irrlicht.DLL file, we need to link with the ...@@ -58,7 +58,9 @@ Again, to be able to use the Irrlicht.DLL file, we need to link with the
Irrlicht.lib. We could set this option in the project settings, but Irrlicht.lib. We could set this option in the project settings, but
to make it easy, we use a pragma comment lib: to make it easy, we use a pragma comment lib:
*/ */
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
#endif
//! produces a serie of screenshots //! produces a serie of screenshots
...@@ -235,9 +237,11 @@ int IRRCALLCONV main(int argc, char* argv[]) ...@@ -235,9 +237,11 @@ int IRRCALLCONV main(int argc, char* argv[])
// the additional mesh can be quite huge and is unoptimized // the additional mesh can be quite huge and is unoptimized
scene::IMesh * additional_mesh = mesh->getMesh ( quake3::E_Q3_MESH_ITEMS ); scene::IMesh * additional_mesh = mesh->getMesh ( quake3::E_Q3_MESH_ITEMS );
#ifdef SHOW_SHADER_NAME
gui::IGUIFont *font = device->getGUIEnvironment()->getFont("../../media/fontlucida.png"); gui::IGUIFont *font = device->getGUIEnvironment()->getFont("../../media/fontlucida.png");
u32 count = 0; u32 count = 0;
#endif
for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount (); ++i ) for ( u32 i = 0; i!= additional_mesh->getMeshBufferCount (); ++i )
{ {
IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i ); IMeshBuffer *meshBuffer = additional_mesh->getMeshBuffer ( i );
......
...@@ -11,7 +11,7 @@ nothing to say about it) ...@@ -11,7 +11,7 @@ nothing to say about it)
*/ */
#include <irrlicht.h> #include <irrlicht.h>
#include <stdio.h> #include <iostream>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib") #pragma comment(lib, "Irrlicht.lib")
...@@ -19,11 +19,9 @@ nothing to say about it) ...@@ -19,11 +19,9 @@ nothing to say about it)
//Namespaces for the engine //Namespaces for the engine
using namespace irr; using namespace irr;
using namespace video;
using namespace core; using namespace core;
using namespace video;
using namespace scene; using namespace scene;
using namespace io;
using namespace gui;
/* /*
Now we'll define the resolution in a constant for use in Now we'll define the resolution in a constant for use in
...@@ -76,13 +74,36 @@ Just take care of the maps position. ...@@ -76,13 +74,36 @@ Just take care of the maps position.
*/ */
int main() int main()
{ {
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
char i;
std::cin >> i;
switch(i)
{
case 'a': driverType = video::EDT_DIRECT3D9;break;
case 'b': driverType = video::EDT_DIRECT3D8;break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}
//Instance of the EventReceiver //Instance of the EventReceiver
MyEventReceiver receiver; MyEventReceiver receiver;
//Initialise the engine //Initialise the engine
IrrlichtDevice *device = createDevice(EDT_OPENGL, IrrlichtDevice *device = createDevice(driverType,
dimension2d<s32>(ResX,ResY), 32, fullScreen, dimension2d<s32>(ResX,ResY), 32, fullScreen,
false, false, &receiver); false, false, &receiver);
if (!device)
return 1;
ISceneManager *smgr = device->getSceneManager(); ISceneManager *smgr = device->getSceneManager();
IVideoDriver *driver = device->getVideoDriver(); IVideoDriver *driver = device->getVideoDriver();
...@@ -93,10 +114,14 @@ int main() ...@@ -93,10 +114,14 @@ int main()
return 1; return 1;
IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model); IAnimatedMeshSceneNode *model_node = smgr->addAnimatedMeshSceneNode(model);
//Load texture //Load texture
ITexture *texture = driver->getTexture("../../media/sydney.bmp"); if (model_node)
model_node->setMaterialTexture(0,texture); {
//Disable lighting (we've got no light) ITexture *texture = driver->getTexture("../../media/sydney.bmp");
model_node->setMaterialFlag(EMF_LIGHTING,false); model_node->setMaterialTexture(0,texture);
model_node->setMD2Animation(scene::EMAT_RUN);
//Disable lighting (we've got no light)
model_node->setMaterialFlag(EMF_LIGHTING,false);
}
//Load map //Load map
device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3"); device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");
......
...@@ -171,6 +171,10 @@ int main() ...@@ -171,6 +171,10 @@ int main()
std::cout << "Joystick support is not enabled." << std::endl; std::cout << "Joystick support is not enabled." << std::endl;
} }
wchar_t tmp[1024];
swprintf(tmp, 1024, L"Irrlicht Joystick Example (%u joysticks)", joystickInfo.size());
device->setWindowCaption(tmp);
video::IVideoDriver* driver = device->getVideoDriver(); video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager(); scene::ISceneManager* smgr = device->getSceneManager();
......
...@@ -740,7 +740,7 @@ void CDemo::createParticleImpacts() ...@@ -740,7 +740,7 @@ void CDemo::createParticleImpacts()
#ifdef USE_IRRKLANG #ifdef USE_IRRKLANG
if (irrKlang) if (irrKlang)
{ {
audio::ISound* sound = irrklang::ISound* sound =
irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true); irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);
if (sound) if (sound)
...@@ -768,14 +768,14 @@ void CDemo::createParticleImpacts() ...@@ -768,14 +768,14 @@ void CDemo::createParticleImpacts()
#ifdef USE_IRRKLANG #ifdef USE_IRRKLANG
void CDemo::startIrrKlang() void CDemo::startIrrKlang()
{ {
irrKlang = audio::createIrrKlangDevice(); irrKlang = irrklang::createIrrKlangDevice();
if (!irrKlang) if (!irrKlang)
return; return;
// play music // play music
audio::ISound* snd = irrKlang->play2D("../../media/IrrlichtTheme.ogg", true, false, true); irrklang::ISound* snd = irrKlang->play2D("../../media/IrrlichtTheme.ogg", true, false, true);
if ( !snd ) if ( !snd )
snd = irrKlang->play2D("IrrlichtTheme.ogg", true, false, true); snd = irrKlang->play2D("IrrlichtTheme.ogg", true, false, true);
......
...@@ -63,9 +63,9 @@ private: ...@@ -63,9 +63,9 @@ private:
#ifdef USE_IRRKLANG #ifdef USE_IRRKLANG
void startIrrKlang(); void startIrrKlang();
audio::ISoundEngine* irrKlang; irrklang::ISoundEngine* irrKlang;
audio::ISoundSource* ballSound; irrklang::ISoundSource* ballSound;
audio::ISoundSource* impactSound; irrklang::ISoundSource* impactSound;
#endif #endif
#ifdef USE_SDL_MIXER #ifdef USE_SDL_MIXER
......
...@@ -81,7 +81,8 @@ namespace scene ...@@ -81,7 +81,8 @@ namespace scene
{ {
if (sizeof(T)==sizeof(u16)) if (sizeof(T)==sizeof(u16))
return video::EIT_16BIT; return video::EIT_16BIT;
return video::EIT_32BIT; else
return video::EIT_32BIT;
} }
}; };
......
...@@ -76,8 +76,7 @@ namespace gui ...@@ -76,8 +76,7 @@ namespace gui
EGTDF_ROWS = 1, EGTDF_ROWS = 1,
EGTDF_COLUMNS = 2, EGTDF_COLUMNS = 2,
EGTDF_ACTIVE_ROW = 4, EGTDF_ACTIVE_ROW = 4,
EGTDF_COUNT
EGTDF_COUNT,
}; };
class IGUIFont; class IGUIFont;
......
...@@ -25,9 +25,6 @@ class IMaterialRenderer : public virtual IReferenceCounted ...@@ -25,9 +25,6 @@ class IMaterialRenderer : public virtual IReferenceCounted
{ {
public: public:
//! Destructor
virtual ~IMaterialRenderer() {}
//! Called by the IVideoDriver implementation the let the renderer set its needed render states. //! Called by the IVideoDriver implementation the let the renderer set its needed render states.
/** This is called during the IVideoDriver::setMaterial() call. /** This is called during the IVideoDriver::setMaterial() call.
When overriding this, you can set some renderstates or for example a When overriding this, you can set some renderstates or for example a
......
...@@ -21,10 +21,6 @@ class IShaderConstantSetCallBack : public virtual IReferenceCounted ...@@ -21,10 +21,6 @@ class IShaderConstantSetCallBack : public virtual IReferenceCounted
{ {
public: public:
//! Destructor.
virtual ~IShaderConstantSetCallBack() {}
//! Called to let the callBack know the used material (optional method) //! Called to let the callBack know the used material (optional method)
/** /**
\code \code
......
...@@ -86,7 +86,7 @@ class quaternion ...@@ -86,7 +86,7 @@ class quaternion
void getMatrix( matrix4 &dest ) const; void getMatrix( matrix4 &dest ) const;
//! Creates a matrix from this quaternion //! Creates a matrix from this quaternion
void getMatrix_transposed( matrix4 &dest ) const; inline void getMatrix_transposed( matrix4 &dest ) const;
//! Inverts this quaternion //! Inverts this quaternion
quaternion& makeInverse(); quaternion& makeInverse();
......
...@@ -201,24 +201,31 @@ void CAnimatedMeshSceneNode::OnRegisterSceneNode() ...@@ -201,24 +201,31 @@ void CAnimatedMeshSceneNode::OnRegisterSceneNode()
} }
} }
IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame(void) IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame(bool forceRecalcOfControlJoints)
{ {
if(MeshForCurrentFrame && core::equals(CurrentFrameNr, FrameWhenCurrentMeshWasGenerated))
return MeshForCurrentFrame;
if(Mesh->getMeshType() != EAMT_SKINNED) if(Mesh->getMeshType() != EAMT_SKINNED)
{ {
MeshForCurrentFrame = Mesh->getMesh((s32)getFrameNr(), 255, StartFrame, EndFrame); if(!MeshForCurrentFrame || core::equals(CurrentFrameNr, FrameWhenCurrentMeshWasGenerated))
MeshForCurrentFrame = Mesh->getMesh((s32)getFrameNr(), 255, StartFrame, EndFrame);
} }
else else
{ {
CSkinnedMesh* skinnedMesh = reinterpret_cast<CSkinnedMesh*>(Mesh); CSkinnedMesh* skinnedMesh = reinterpret_cast<CSkinnedMesh*>(Mesh);
if (JointMode == EJUOR_CONTROL)//write to mesh if (JointMode == EJUOR_CONTROL && forceRecalcOfControlJoints)//write to mesh
{
skinnedMesh->transferJointsToMesh(JointChildSceneNodes); skinnedMesh->transferJointsToMesh(JointChildSceneNodes);
else }
skinnedMesh->animateMesh(getFrameNr(), 1.0f); else
{
// Return the mesh for the current frame if it hasn't changed, otherwise update it.
if(MeshForCurrentFrame && core::equals(CurrentFrameNr, FrameWhenCurrentMeshWasGenerated))
return MeshForCurrentFrame;
else
skinnedMesh->animateMesh(getFrameNr(), 1.0f);
}
// Update the skinned mesh for the current joint transforms.
skinnedMesh->skinMesh(); skinnedMesh->skinMesh();
if (JointMode == EJUOR_READ)//read from mesh if (JointMode == EJUOR_READ)//read from mesh
...@@ -231,7 +238,11 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame(void) ...@@ -231,7 +238,11 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame(void)
{ {
JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option
} }
}
else
{
// For EJUOR_READ meshes, this is done by calling animateMesh()
skinnedMesh->updateBoundingBox();
} }
MeshForCurrentFrame = skinnedMesh; MeshForCurrentFrame = skinnedMesh;
...@@ -249,7 +260,7 @@ void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs) ...@@ -249,7 +260,7 @@ void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs)
if ( Mesh ) if ( Mesh )
{ {
scene::IMesh * mesh = getMeshForCurrentFrame(); scene::IMesh * mesh = getMeshForCurrentFrame(true);
if ( mesh ) if ( mesh )
Box = mesh->getBoundingBox(); Box = mesh->getBoundingBox();
...@@ -273,7 +284,7 @@ void CAnimatedMeshSceneNode::render() ...@@ -273,7 +284,7 @@ void CAnimatedMeshSceneNode::render()
++PassCount; ++PassCount;
scene::IMesh* m = getMeshForCurrentFrame(); scene::IMesh* m = getMeshForCurrentFrame(false);
if ( 0 == m ) if ( 0 == m )
{ {
......
...@@ -162,7 +162,10 @@ namespace scene ...@@ -162,7 +162,10 @@ namespace scene
private: private:
//! Get a static mesh for the current frame of this animated mesh //! Get a static mesh for the current frame of this animated mesh
IMesh* getMeshForCurrentFrame(void); /** \param forceRecalcOfControlJoints If the mesh is a skinned mesh with controlled joints, force
a recalculation even if the frame number hasn't changed. Otherwise return the cached mesh for the
current frame if it exists. */
IMesh* getMeshForCurrentFrame(bool forceRecalcOfControlJoints);
f32 buildFrameNr( u32 timeMs); f32 buildFrameNr( u32 timeMs);
void checkJoints(); void checkJoints();
......
...@@ -418,7 +418,7 @@ namespace video ...@@ -418,7 +418,7 @@ namespace video
{ {
BD3DZB_FALSE = 0, // Disable depth buffering BD3DZB_FALSE = 0, // Disable depth buffering
BD3DZB_TRUE = 1, // Enable z-buffering BD3DZB_TRUE = 1, // Enable z-buffering
BD3DZB_USEW = 2, //Enable w-buffering. BD3DZB_USEW = 2 //Enable w-buffering.
}; };
//! Defines the supported compare functions. //! Defines the supported compare functions.
...@@ -438,7 +438,7 @@ namespace video ...@@ -438,7 +438,7 @@ namespace video
{ {
BD3DMCS_MATERIAL = 0, // Use the color from the current material. BD3DMCS_MATERIAL = 0, // Use the color from the current material.
BD3DMCS_COLOR1 = 1, // Use the diffuse vertex color. BD3DMCS_COLOR1 = 1, // Use the diffuse vertex color.
BD3DMCS_COLOR2 = 2, // Use the specular vertex color. BD3DMCS_COLOR2 = 2 // Use the specular vertex color.
}; };
...@@ -462,7 +462,7 @@ namespace video ...@@ -462,7 +462,7 @@ namespace video
/*! BD3DSHADE_PHONG /*! BD3DSHADE_PHONG
Not supported. Not supported.
*/ */
BD3DSHADE_PHONG = 3, BD3DSHADE_PHONG = 3
}; };
/*! Defines constants describing the fill mode /*! Defines constants describing the fill mode
...@@ -472,7 +472,7 @@ namespace video ...@@ -472,7 +472,7 @@ namespace video
{ {
BD3DFILL_POINT = 1, // Fill points. BD3DFILL_POINT = 1, // Fill points.
BD3DFILL_WIREFRAME = 2, // Fill wireframes. BD3DFILL_WIREFRAME = 2, // Fill wireframes.
BD3DFILL_SOLID = 3, // Fill solids. BD3DFILL_SOLID = 3 // Fill solids.
}; };
...@@ -485,7 +485,7 @@ namespace video ...@@ -485,7 +485,7 @@ namespace video
{ {
BD3DCULL_NONE = 1, // Do not cull back faces. BD3DCULL_NONE = 1, // Do not cull back faces.
BD3DCULL_CW = 2, // Cull back faces with clockwise vertices. BD3DCULL_CW = 2, // Cull back faces with clockwise vertices.
BD3DCULL_CCW = 3, // Cull back faces with counterclockwise vertices. BD3DCULL_CCW = 3 // Cull back faces with counterclockwise vertices.
}; };
struct SShaderParam struct SShaderParam
......
...@@ -2118,39 +2118,39 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -2118,39 +2118,39 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
// as full tesselation is problematic // as full tesselation is problematic
if (FlipAxis) if (FlipAxis)
{ {
for (u32 i = indices.size()-3; i>0 ; --i) for (u32 ind = indices.size()-3; ind>0 ; --ind)
{ {
mbuffer->Indices.push_back(indices[0]); mbuffer->Indices.push_back(indices[0]);
mbuffer->Indices.push_back(indices[i+2]); mbuffer->Indices.push_back(indices[ind+2]);
mbuffer->Indices.push_back(indices[i+1]); mbuffer->Indices.push_back(indices[ind+1]);
} }
} }
else else
{ {
for (u32 i = 0; i+2 < indices.size(); ++i) for (u32 ind = 0; i+2 < indices.size(); ++ind)
{ {
mbuffer->Indices.push_back(indices[0]); mbuffer->Indices.push_back(indices[0]);
mbuffer->Indices.push_back(indices[i+1]); mbuffer->Indices.push_back(indices[ind+1]);
mbuffer->Indices.push_back(indices[i+2]); mbuffer->Indices.push_back(indices[ind+2]);
} }
} }
} }
else else
{ {
// it's just triangles // it's just triangles
for (u32 i = 0; i < indices.size(); i+=3) for (u32 ind = 0; ind < indices.size(); ind+=3)
{ {
if (FlipAxis) if (FlipAxis)
{ {
mbuffer->Indices.push_back(indices[i+2]); mbuffer->Indices.push_back(indices[ind+2]);
mbuffer->Indices.push_back(indices[i+1]); mbuffer->Indices.push_back(indices[ind+1]);
mbuffer->Indices.push_back(indices[i+0]); mbuffer->Indices.push_back(indices[ind+0]);
} }
else else
{ {
mbuffer->Indices.push_back(indices[i+0]); mbuffer->Indices.push_back(indices[ind+0]);
mbuffer->Indices.push_back(indices[i+1]); mbuffer->Indices.push_back(indices[ind+1]);
mbuffer->Indices.push_back(indices[i+2]); mbuffer->Indices.push_back(indices[ind+2]);
} }
} }
} }
......
...@@ -2750,7 +2750,7 @@ void CD3D9Driver::checkDepthBuffer(ITexture* tex) ...@@ -2750,7 +2750,7 @@ void CD3D9Driver::checkDepthBuffer(ITexture* tex)
!queryFeature(EVDF_TEXTURE_NPOT), !queryFeature(EVDF_TEXTURE_NPOT),
!queryFeature(EVDF_TEXTURE_NSQUARE), true); !queryFeature(EVDF_TEXTURE_NSQUARE), true);
SDepthSurface* depth=0; SDepthSurface* depth=0;
core::dimension2di destSize=(0x7fffffff, 0x7fffffff); core::dimension2di destSize(0x7fffffff, 0x7fffffff);
for (u32 i=0; i<DepthBuffers.size(); ++i) for (u32 i=0; i<DepthBuffers.size(); ++i)
{ {
if ((DepthBuffers[i]->Size.Width>=optSize.Width) && if ((DepthBuffers[i]->Size.Width>=optSize.Width) &&
......
...@@ -279,14 +279,14 @@ void CGUIColorSelectDialog::buildColorRing( const core::dimension2d<s32> & dim, ...@@ -279,14 +279,14 @@ void CGUIColorSelectDialog::buildColorRing( const core::dimension2d<s32> & dim,
if ( rTest >= 0.5f && rTest <= 0.55f ) if ( rTest >= 0.5f && rTest <= 0.55f )
{ {
u32 alpha = (s32) ( (rTest - 0.5f ) * ( 255.f / 0.05f ) ); u32 alpha = (s32) ( (rTest - 0.5f ) * ( 255.f / 0.05f ) );
*dst = *dst & 0x00ffffff | (alpha << 24); *dst = (*dst & 0x00ffffff) | (alpha << 24);
} }
if ( rTest >= 0.95f ) if ( rTest >= 0.95f )
{ {
u32 alpha = (s32) ( (rTest - 0.95f ) * ( 255.f / 0.05f ) ); u32 alpha = (s32) ( (rTest - 0.95f ) * ( 255.f / 0.05f ) );
alpha = 255 - alpha; alpha = 255 - alpha;
*dst = *dst & 0x00ffffff | (alpha << 24); *dst = (*dst & 0x00ffffff) | (alpha << 24);
} }
} }
} }
......
...@@ -1401,16 +1401,16 @@ bool CIrrDeviceLinux::activateJoysticks(core::array<SJoystickInfo> & joystickInf ...@@ -1401,16 +1401,16 @@ bool CIrrDeviceLinux::activateJoysticks(core::array<SJoystickInfo> & joystickInf
for(joystick = 0; joystick < joystickInfo.size(); ++joystick) for(joystick = 0; joystick < joystickInfo.size(); ++joystick)
{ {
char logString[256]; char logString[256];
(void)sprintf(logString, "Found joystick %d, %d axes, %d buttons '%s'", (void)sprintf(logString, "Found joystick %u, %u axes, %u buttons '%s'",
joystick, joystickInfo[joystick].Axes, joystick, joystickInfo[joystick].Axes,
joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str()); joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str());
os::Printer::log(logString, ELL_INFORMATION); os::Printer::log(logString, ELL_INFORMATION);
} }
return true; return true;
#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ #else
return false; return false;
#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
} }
......
...@@ -1202,9 +1202,9 @@ void CLWOMeshFileLoader::readMat(u32 size) ...@@ -1202,9 +1202,9 @@ void CLWOMeshFileLoader::readMat(u32 size)
size -= readVX(mat->Envelope[21]); size -= readVX(mat->Envelope[21]);
File->read(&tmp32, 4); // skip type File->read(&tmp32, 4); // skip type
size -= 4; size -= 4;
core::stringc name; core::stringc tmpname;
size -= readString(name, size); size -= readString(tmpname, size);
// mat->VertexColor = getColorVMAP(name); // mat->VertexColor = getColorVMAP(tmpname);
} }
break; break;
case charsToUIntD('F','L','A','G'): case charsToUIntD('F','L','A','G'):
...@@ -1511,10 +1511,10 @@ void CLWOMeshFileLoader::readMat(u32 size) ...@@ -1511,10 +1511,10 @@ void CLWOMeshFileLoader::readMat(u32 size)
os::Printer::log("LWO loader: loading material vmap binding."); os::Printer::log("LWO loader: loading material vmap binding.");
#endif #endif
{ {
core::stringc name; core::stringc tmpname;
size -= readString(name); size -= readString(tmpname);
if (VMap.find(name) != 0) if (VMap.find(tmpname) != 0)
mat->Texture[currTexture].TCoords = &TCoords[VMap.find(name)->getValue()]; mat->Texture[currTexture].TCoords = &TCoords[VMap.find(tmpname)->getValue()];
} }
break; break;
case charsToUIntD('B','L','O','K'): case charsToUIntD('B','L','O','K'):
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#ifdef _IRR_USE_OSX_DEVICE_ #ifdef _IRR_USE_OSX_DEVICE_
#include "OSXClipboard.h" #include "MacOSX/OSXClipboard.h"
#endif #endif
#ifdef _IRR_OSX_PLATFORM_ #ifdef _IRR_OSX_PLATFORM_
#include <sys/types.h> #include <sys/types.h>
......
...@@ -1040,7 +1040,6 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -1040,7 +1040,6 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
const void* indexList, u32 primitiveCount, const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType)
{ {
if (!primitiveCount || !vertexCount) if (!primitiveCount || !vertexCount)
return; return;
......
...@@ -41,7 +41,6 @@ COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(video::COpenGLDriver* drive ...@@ -41,7 +41,6 @@ COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(video::COpenGLDriver* drive
: Driver(driver), CallBack(callback), BaseMaterial(baseMaterial), : Driver(driver), CallBack(callback), BaseMaterial(baseMaterial),
Program(0), UserData(userData) Program(0), UserData(userData)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("COpenGLSLMaterialRenderer"); setDebugName("COpenGLSLMaterialRenderer");
#endif #endif
...@@ -124,6 +123,7 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr, ...@@ -124,6 +123,7 @@ void COpenGLSLMaterialRenderer::init(s32& outMaterialTypeNr,
outMaterialTypeNr = Driver->addMaterialRenderer(this); outMaterialTypeNr = Driver->addMaterialRenderer(this);
} }
bool COpenGLSLMaterialRenderer::OnRender(IMaterialRendererServices* service, bool COpenGLSLMaterialRenderer::OnRender(IMaterialRendererServices* service,
E_VERTEX_TYPE vtxtype) E_VERTEX_TYPE vtxtype)
{ {
...@@ -142,7 +142,7 @@ void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material, ...@@ -142,7 +142,7 @@ void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material,
{ {
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates)
{ {
if(Program) if (Program)
Driver->extGlUseProgramObject(Program); Driver->extGlUseProgramObject(Program);
if (BaseMaterial) if (BaseMaterial)
...@@ -215,6 +215,7 @@ bool COpenGLSLMaterialRenderer::createShader(GLenum shaderType, const char* shad ...@@ -215,6 +215,7 @@ bool COpenGLSLMaterialRenderer::createShader(GLenum shaderType, const char* shad
return true; return true;
} }
bool COpenGLSLMaterialRenderer::linkProgram() bool COpenGLSLMaterialRenderer::linkProgram()
{ {
Driver->extGlLinkProgram(Program); Driver->extGlLinkProgram(Program);
...@@ -290,7 +291,6 @@ bool COpenGLSLMaterialRenderer::linkProgram() ...@@ -290,7 +291,6 @@ bool COpenGLSLMaterialRenderer::linkProgram()
} }
void COpenGLSLMaterialRenderer::setBasicRenderStates(const SMaterial& material, void COpenGLSLMaterialRenderer::setBasicRenderStates(const SMaterial& material,
const SMaterial& lastMaterial, const SMaterial& lastMaterial,
bool resetAllRenderstates) bool resetAllRenderstates)
......
...@@ -78,13 +78,13 @@ void COpenGLShaderMaterialRenderer::init(s32& outMaterialTypeNr, const c8* verte ...@@ -78,13 +78,13 @@ void COpenGLShaderMaterialRenderer::init(s32& outMaterialTypeNr, const c8* verte
{ {
outMaterialTypeNr = -1; outMaterialTypeNr = -1;
bool failure; bool success;
// create vertex shader // create vertex shader
failure=createVertexShader(vertexShaderProgram); success=createVertexShader(vertexShaderProgram);
// create pixel shader // create pixel shader
if (!createPixelShader(pixelShaderProgram) || failure) if (!createPixelShader(pixelShaderProgram) || !success)
return; return;
// register as a new material // register as a new material
...@@ -208,7 +208,7 @@ bool COpenGLShaderMaterialRenderer::createPixelShader(const c8* pxsh) ...@@ -208,7 +208,7 @@ bool COpenGLShaderMaterialRenderer::createPixelShader(const c8* pxsh)
} }
bool COpenGLShaderMaterialRenderer::createVertexShader(const char* vtxsh) bool COpenGLShaderMaterialRenderer::createVertexShader(const c8* vtxsh)
{ {
if (!vtxsh) if (!vtxsh)
return true; return true;
......
...@@ -72,7 +72,7 @@ protected: ...@@ -72,7 +72,7 @@ protected:
const c8* pixelShaderProgram, E_VERTEX_TYPE type); const c8* pixelShaderProgram, E_VERTEX_TYPE type);
bool createPixelShader(const c8* pxsh); bool createPixelShader(const c8* pxsh);
bool createVertexShader(const char* vtxsh); bool createVertexShader(const c8* vtxsh);
COpenGLDriver* Driver; COpenGLDriver* Driver;
IShaderConstantSetCallBack* CallBack; IShaderConstantSetCallBack* CallBack;
......
...@@ -186,9 +186,9 @@ void CSceneNodeAnimatorCollisionResponse::animateNode(ISceneNode* node, u32 time ...@@ -186,9 +186,9 @@ void CSceneNodeAnimatorCollisionResponse::animateNode(ISceneNode* node, u32 time
// move camera target // move camera target
if (AnimateCameraTarget && IsCamera) if (AnimateCameraTarget && IsCamera)
{ {
const core::vector3df diff = Object->getPosition() - LastPosition - vel; const core::vector3df pdiff = Object->getPosition() - LastPosition - vel;
ICameraSceneNode* cam = (ICameraSceneNode*)Object; ICameraSceneNode* cam = (ICameraSceneNode*)Object;
cam->setTarget(cam->getTarget() + diff); cam->setTarget(cam->getTarget() + pdiff);
} }
LastPosition = Object->getPosition(); LastPosition = Object->getPosition();
......
...@@ -174,19 +174,19 @@ void CSkinnedMesh::buildAll_LocalAnimatedMatrices() ...@@ -174,19 +174,19 @@ void CSkinnedMesh::buildAll_LocalAnimatedMatrices()
*/ */
// -------- joint->LocalAnimatedMatrix *= scaleMatrix ----------------- // -------- joint->LocalAnimatedMatrix *= scaleMatrix -----------------
f32 *m1 = joint->LocalAnimatedMatrix.pointer(); core::matrix4& mat = joint->LocalAnimatedMatrix;
m1[0] *= joint->Animatedscale.X; mat[0] *= joint->Animatedscale.X;
m1[1] *= joint->Animatedscale.X; mat[1] *= joint->Animatedscale.X;
m1[2] *= joint->Animatedscale.X; mat[2] *= joint->Animatedscale.X;
m1[3] *= joint->Animatedscale.X; mat[3] *= joint->Animatedscale.X;
m1[4] *= joint->Animatedscale.Y; mat[4] *= joint->Animatedscale.Y;
m1[5] *= joint->Animatedscale.Y; mat[5] *= joint->Animatedscale.Y;
m1[6] *= joint->Animatedscale.Y; mat[6] *= joint->Animatedscale.Y;
m1[7] *= joint->Animatedscale.Y; mat[7] *= joint->Animatedscale.Y;
m1[8] *= joint->Animatedscale.Z; mat[8] *= joint->Animatedscale.Z;
m1[9] *= joint->Animatedscale.Z; mat[9] *= joint->Animatedscale.Z;
m1[10] *= joint->Animatedscale.Z; mat[10] *= joint->Animatedscale.Z;
m1[11] *= joint->Animatedscale.Z; mat[11] *= joint->Animatedscale.Z;
// ----------------------------------- // -----------------------------------
} }
......
...@@ -144,6 +144,8 @@ namespace scene ...@@ -144,6 +144,8 @@ namespace scene
virtual SWeight *createWeight(SJoint *joint); virtual SWeight *createWeight(SJoint *joint);
virtual void updateBoundingBox(void);
private: private:
void checkForAnimation(); void checkForAnimation();
...@@ -168,8 +170,6 @@ private: ...@@ -168,8 +170,6 @@ private:
core::vector3df& vt1, core::vector3df& vt2, core::vector3df& vt3, core::vector3df& vt1, core::vector3df& vt2, core::vector3df& vt3,
core::vector2df& tc1, core::vector2df& tc2, core::vector2df& tc3); core::vector2df& tc1, core::vector2df& tc2, core::vector2df& tc3);
void updateBoundingBox(void);
core::array<SSkinMeshBuffer*> *SkinningBuffers; //Meshbuffer to skin, default is to skin localBuffers core::array<SSkinMeshBuffer*> *SkinningBuffers; //Meshbuffer to skin, default is to skin localBuffers
core::array<SSkinMeshBuffer*> LocalBuffers; core::array<SSkinMeshBuffer*> LocalBuffers;
......
...@@ -41,7 +41,7 @@ JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jc ...@@ -41,7 +41,7 @@ JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jc
LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o
# Next variable is for additional scene nodes etc. of customized Irrlicht versions # Next variable is for additional scene nodes etc. of customized Irrlicht versions
EXTRAOBJ = EXTRAOBJ =
LINKOBJ := $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \ $(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
$(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(EXTRAOBJ) $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(EXTRAOBJ)
...@@ -69,17 +69,23 @@ LIBSELECT=64 ...@@ -69,17 +69,23 @@ LIBSELECT=64
endif endif
#Linux specific options #Linux specific options
staticlib sharedlib install: SYSTEM = Linux
STATIC_LIB = libIrrlicht.a STATIC_LIB = libIrrlicht.a
IRRLICHT_DLL := ../../bin/Win32-gcc/Irrlicht.dll IRRLICHT_DLL := ../../bin/Win32-gcc/Irrlicht.dll
LIB_PATH = ../../lib/$(SYSTEM) LIB_PATH = ../../lib/$(SYSTEM)
INSTALL_DIR = /usr/local/lib INSTALL_DIR = /usr/local/lib
staticlib sharedlib install: SYSTEM = Linux
staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX
sharedlib: SHARED_LIB = libIrrlicht.so sharedlib: SHARED_LIB = libIrrlicht.so
staticlib sharedlib: LDFLAGS = --no-export-all-symbols --add-stdcall-alias
sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
#OSX specific options
staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX
staticlib_osx sharedlib_osx: IRROTHEROBJ += MacOSX/CIrrDeviceMacOSX.o MacOSX/OSXClipboard.o MacOSX/AppDelegate.o
staticlib_osx sharedlib_osx: CXXINCS += -IMacOSX -I/usr/X11R6/include
sharedlib_osx: SHARED_LIB = libIrrlicht.dylib sharedlib_osx: SHARED_LIB = libIrrlicht.dylib
staticlib sharedlib staticlib_osx sharedlib_osx: LDFLAGS = --no-export-all-symbols --add-stdcall-alias staticlib_osx sharedlib_osx: LDFLAGS = --no-export-all-symbols --add-stdcall-alias
sharedlib sharedlib_osx: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm sharedlib_osx: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
staticlib sharedlib staticlib_osx sharedlib_osx: CXXINCS += -I/usr/X11R6/include
#Windows specific options #Windows specific options
sharedlib_win32 staticlib_win32: SYSTEM = Win32-gcc sharedlib_win32 staticlib_win32: SYSTEM = Win32-gcc
...@@ -136,6 +142,10 @@ TAGS: ...@@ -136,6 +142,10 @@ TAGS:
%.d:%.cpp %.d:%.cpp
$(CXX) $(CPPFLAGS) -MM -MF $@ $< $(CXX) $(CPPFLAGS) -MM -MF $@ $<
# Create object files from objective-c code
%.o:%.mm
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $@ $<
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
-include $(LINKOBJ:.o=.d) -include $(LINKOBJ:.o=.d)
endif endif
......
...@@ -273,7 +273,7 @@ enum e4DVertexFlag ...@@ -273,7 +273,7 @@ enum e4DVertexFlag
VERTEX4D_FORMAT_MASK_COLOR = 0x00F00000, VERTEX4D_FORMAT_MASK_COLOR = 0x00F00000,
VERTEX4D_FORMAT_COLOR_1 = 0x00100000, VERTEX4D_FORMAT_COLOR_1 = 0x00100000,
VERTEX4D_FORMAT_COLOR_2 = 0x00200000, VERTEX4D_FORMAT_COLOR_2 = 0x00200000
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment