Merge from 1.7 branch, revisions 4090-4187. Device fixes, serialization bug fix, some compilation warnings. Bug in color conversion fixed, and some demo fixes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4188 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2012-06-14 22:37:53 +00:00
parent a5d5488c48
commit 823bc87bfe
8 changed files with 20 additions and 16 deletions

View File

@ -329,6 +329,10 @@ The following names can be queried for the given types:
-----------------------------
Changes in 1.7.3 (20.02.2012)
- SceneNodeAnimatorFlyCircle fixes serialization of RadiusEllipsoid (was writing Radius). Thx @ wing64 for reporting.
- Yield on Linux now uses nanosleep with 1ns as 0 isn't guaranteed to yield (thx @ hendu for finding + fix)
- GUIEditor attributes have now scrollbar to be editable
- Remove warning when compiling line2d::intersectWith with other types than f32.

View File

@ -272,9 +272,9 @@ public:
{
const u16 n = (y-y0) * Width + x;
buf->Indices[i]=n;
buf->Indices[++i]=n + Height;
buf->Indices[++i]=n + Height + 1;
buf->Indices[++i]=n + Height + 1;
buf->Indices[++i]=n + Width;
buf->Indices[++i]=n + Width + 1;
buf->Indices[++i]=n + Width + 1;
buf->Indices[++i]=n + 1;
buf->Indices[++i]=n;
++i;

View File

@ -431,7 +431,7 @@ void CDemo::loadSceneData()
model2->setMD2Animation(scene::EMAT_RUN);
model2->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/sydney.bmp"));
model2->setMaterialFlag(video::EMF_LIGHTING, true);
model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
model2->addShadowVolumeSceneNode();
}
}

View File

@ -564,11 +564,11 @@ void CColorConverter::convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP)
for (s32 x = 0; x < sN; ++x)
{
dB[0] = (*sB & 0xf800) << 8;
dB[1] = (*sB & 0x07e0) << 2;
dB[0] = (*sB & 0xf800) >> 8;
dB[1] = (*sB & 0x07e0) >> 3;
dB[2] = (*sB & 0x001f) << 3;
sB += 4;
sB += 1;
dB += 3;
}
}
@ -580,11 +580,11 @@ void CColorConverter::convert_R5G6B5toB8G8R8(const void* sP, s32 sN, void* dP)
for (s32 x = 0; x < sN; ++x)
{
dB[2] = (*sB & 0xf800) << 8;
dB[1] = (*sB & 0x07e0) << 2;
dB[2] = (*sB & 0xf800) >> 8;
dB[1] = (*sB & 0x07e0) >> 3;
dB[0] = (*sB & 0x001f) << 3;
sB += 4;
sB += 1;
dB += 3;
}
}

View File

@ -1144,7 +1144,7 @@ bool CIrrDeviceLinux::run()
//! Pause the current process for the minimum time allowed only to allow other processes to execute
void CIrrDeviceLinux::yield()
{
struct timespec ts = {0,0};
struct timespec ts = {0,1};
nanosleep(&ts, NULL);
}

View File

@ -1025,7 +1025,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
EnvMap.push_back(em);
// set this as active window
if ( HWnd )
if (!ExternalWindow)
{
SetActiveWindow(HWnd);
SetForegroundWindow(HWnd);

View File

@ -149,9 +149,9 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device)
0, // No Alpha Buffer
0, // Shift Bit Ignored
0, // No Accumulation Buffer
0, 0, 0, 0, // Accumulation Bits Ignored
Params.ZBufferBits, // Z-Buffer (Depth Buffer)
Params.Stencilbuffer ? 1 : 0, // Stencil Buffer Depth
0, 0, 0, 0, // Accumulation Bits Ignored
params.ZBufferBits, // Z-Buffer (Depth Buffer)
BYTE(params.Stencilbuffer ? 1 : 0), // Stencil Buffer Depth
0, // No Auxiliary Buffer
PFD_MAIN_PLANE, // Main Drawing Layer
0, // Reserved

View File

@ -63,7 +63,7 @@ void CSceneNodeAnimatorFlyCircle::serializeAttributes(io::IAttributes* out, io::
out->addFloat("Radius", Radius);
out->addFloat("Speed", Speed);
out->addVector3d("Direction", Direction);
out->addFloat("RadiusEllipsoid", Radius);
out->addFloat("RadiusEllipsoid", RadiusEllipsoid);
}