Merged revisions 4057-4071 from 1.7 branch.
- GUIEditor attributes have now scrollbar to be editable - Remove warning when compiling line2d::intersectWith with other types than f32. - CodeBlocks tests project file now compiling also on Linux. - Slightly more lenient comparison in test textureRenderStates git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4072 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
d9a6ac315a
commit
9184ea4c47
|
@ -294,6 +294,10 @@ The following names can be queried for the given types:
|
|||
-----------------------------
|
||||
Changes in 1.7.3 (??.??.2011)
|
||||
|
||||
- GUIEditor attributes have now scrollbar to be editable
|
||||
|
||||
- Remove warning when compiling line2d::intersectWith with other types than f32.
|
||||
|
||||
- Document that triangle3d::isPointInside should not be used with int's.
|
||||
|
||||
- triangle3d::isPointInsideFast handles 'on-border' cases now consistently.
|
||||
|
|
|
@ -78,13 +78,13 @@ class line2d
|
|||
{
|
||||
// Uses the method given at:
|
||||
// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
|
||||
const f32 commonDenominator = (l.end.Y - l.start.Y)*(end.X - start.X) -
|
||||
const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) -
|
||||
(l.end.X - l.start.X)*(end.Y - start.Y);
|
||||
|
||||
const f32 numeratorA = (l.end.X - l.start.X)*(start.Y - l.start.Y) -
|
||||
const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) -
|
||||
(l.end.Y - l.start.Y)*(start.X -l.start.X);
|
||||
|
||||
const f32 numeratorB = (end.X - start.X)*(start.Y - l.start.Y) -
|
||||
const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) -
|
||||
(end.Y - start.Y)*(start.X -l.start.X);
|
||||
|
||||
if(equals(commonDenominator, 0.f))
|
||||
|
@ -142,7 +142,8 @@ class line2d
|
|||
out += l.start;
|
||||
if (l.end != maxp && l.end != minp)
|
||||
out += l.end;
|
||||
out *= 0.5f;
|
||||
out.X = (T)(out.X*0.5f);
|
||||
out.Y = (T)(out.Y*0.5f);
|
||||
}
|
||||
|
||||
return true; // coincident
|
||||
|
@ -162,8 +163,8 @@ class line2d
|
|||
return false; // Outside the line segment
|
||||
|
||||
// Calculate the intersection point.
|
||||
out.X = start.X + uA * (end.X - start.X);
|
||||
out.Y = start.Y + uA * (end.Y - start.Y);
|
||||
out.X = (T)(start.X + uA * (end.X - start.X));
|
||||
out.Y = (T)(start.Y + uA * (end.Y - start.Y));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ int main(int argumentCount, char * arguments[])
|
|||
TEST(md2Animation);
|
||||
TEST(meshTransform);
|
||||
TEST(skinnedMesh);
|
||||
TEST(testGeometryCreator);
|
||||
TEST(testGeometryCreator);
|
||||
TEST(writeImageToFile);
|
||||
TEST(ioScene);
|
||||
// all driver checks
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="..\bin\gcc\tests" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output=".\Debug\" />
|
||||
<Target title="Win32 Debug">
|
||||
<Option output="../bin/gcc/tests" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="./Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add directory="..\lib\Win32-gcc\" />
|
||||
<Add directory="../lib/Win32-gcc/" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="..\bin\gcc\tests" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output=".\Release\" />
|
||||
<Target title="Win32 Release">
|
||||
<Option output="../bin/gcc/tests" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="./Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
|
@ -30,15 +30,30 @@
|
|||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Linux Debug">
|
||||
<Option platforms="Unix;" />
|
||||
<Option output="../bin/gcc/tests" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="./Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="Xxf86vm" />
|
||||
<Add library="GL" />
|
||||
<Add directory="../lib/Linux/" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
<Add option="-fexceptions" />
|
||||
<Add directory="..\include" />
|
||||
<Add directory="../include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="Irrlicht" />
|
||||
<Add directory="..\lib\gcc" />
|
||||
<Add directory="../lib/gcc" />
|
||||
</Linker>
|
||||
<Unit filename="2dmaterial.cpp" />
|
||||
<Unit filename="anti-aliasing.cpp" />
|
||||
|
@ -60,6 +75,7 @@
|
|||
<Unit filename="filesystem.cpp" />
|
||||
<Unit filename="flyCircleAnimator.cpp" />
|
||||
<Unit filename="guiDisabledMenu.cpp" />
|
||||
<Unit filename="ioScene.cpp" />
|
||||
<Unit filename="irrArray.cpp" />
|
||||
<Unit filename="irrCoreEquals.cpp" />
|
||||
<Unit filename="irrList.cpp" />
|
||||
|
@ -77,7 +93,6 @@
|
|||
<Unit filename="meshLoaders.cpp" />
|
||||
<Unit filename="meshTransform.cpp" />
|
||||
<Unit filename="mrt.cpp" />
|
||||
<Unit filename="orthocam.cpp" />
|
||||
<Unit filename="planeMatrix.cpp" />
|
||||
<Unit filename="projectionMatrix.cpp" />
|
||||
<Unit filename="removeCustomAnimator.cpp" />
|
||||
|
@ -88,21 +103,22 @@
|
|||
<Unit filename="serializeAttributes.cpp" />
|
||||
<Unit filename="skinnedMesh.cpp" />
|
||||
<Unit filename="softwareDevice.cpp" />
|
||||
<Unit filename="stencilShadow.cpp" />
|
||||
<Unit filename="terrainSceneNode.cpp" />
|
||||
<Unit filename="testaabbox.cpp" />
|
||||
<Unit filename="testDimension2d.cpp" />
|
||||
<Unit filename="testGeometryCreator.cpp" />
|
||||
<Unit filename="testQuaternion.cpp" />
|
||||
<Unit filename="testS3DVertex.cpp" />
|
||||
<Unit filename="testUtils.cpp" />
|
||||
<Unit filename="testUtils.h" />
|
||||
<Unit filename="testVector2d.cpp" />
|
||||
<Unit filename="testVector3d.cpp" />
|
||||
<Unit filename="testXML.cpp" />
|
||||
<Unit filename="testaabbox.cpp" />
|
||||
<Unit filename="textureFeatures.cpp" />
|
||||
<Unit filename="textureRenderStates.cpp" />
|
||||
<Unit filename="timer.cpp" />
|
||||
<Unit filename="transparentMaterials.cpp" />
|
||||
<Unit filename="triangle3d.cpp" />
|
||||
<Unit filename="triangleSelector.cpp" />
|
||||
<Unit filename="vectorPositionDimension2d.cpp" />
|
||||
<Unit filename="videoDriver.cpp" />
|
||||
|
|
|
@ -50,7 +50,7 @@ static bool manyTextures(video::E_DRIVER_TYPE driverType)
|
|||
smgr->drawAll();
|
||||
// draw meshbuffer
|
||||
driver->setMaterial(mat);
|
||||
driver->drawMeshBuffer(mesh);
|
||||
driver->drawMeshBuffer(mesh);
|
||||
driver->endScene();
|
||||
mesh->drop();
|
||||
|
||||
|
@ -198,14 +198,14 @@ static bool testTextureMatrixInMixedScenes(video::E_DRIVER_TYPE driverType)
|
|||
gui->drawAll();
|
||||
driver->endScene();
|
||||
|
||||
bool result = takeScreenshotAndCompareAgainstReference(driver, "-textureMatrixInMixedScenes.png", 99.34f);
|
||||
bool result = takeScreenshotAndCompareAgainstReference(driver, "-textureMatrixInMixedScenes.png", 99.33f);
|
||||
|
||||
device->closeDevice();
|
||||
device->run();
|
||||
device->drop();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// animated texture matrix test.
|
||||
static bool textureMatrix(video::E_DRIVER_TYPE driverType)
|
||||
|
|
|
@ -83,11 +83,11 @@ void CGUIAttributeEditor::refreshAttribs()
|
|||
// try to create attribute
|
||||
stringc str = Attribs->getAttributeTypeString(i);
|
||||
str += "_attribute";
|
||||
CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), this);
|
||||
CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0);
|
||||
|
||||
// if this doesn't exist, use a string editor
|
||||
if (!n)
|
||||
n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", this);
|
||||
n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0);
|
||||
|
||||
if (n)
|
||||
{
|
||||
|
@ -96,6 +96,11 @@ void CGUIAttributeEditor::refreshAttribs()
|
|||
n->grab();
|
||||
}
|
||||
|
||||
// We can't set "this" as parent above as we need functionality
|
||||
// of the overloaded addChild which isn't called in the constructor.
|
||||
// (that's a general Irrlicht messup with too fat constructors)
|
||||
addChild(n);
|
||||
|
||||
AttribList[i]->setSubElement(true);
|
||||
AttribList[i]->setRelativePosition(r);
|
||||
AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
|
||||
|
|
Loading…
Reference in New Issue