Merging r6075 through r6106 from trunk to ogl-es branch.

Burnings renderer changes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6116 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2020-06-12 20:41:49 +00:00
parent 084e0e669a
commit 20b3d56987
117 changed files with 10384 additions and 3817 deletions

View File

@ -266,7 +266,7 @@ int main()
/*
And at last, we create a nice Irrlicht Engine logo in the top left corner.
*/
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo2.png"),
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo3.png"),
position2d<int>(10,10));

View File

@ -978,7 +978,7 @@ int main(int argc, char* argv[])
// load the irrlicht engine logo
IGUIImage *img =
env->addImage(driver->getTexture("irrlichtlogo2.png"),
env->addImage(driver->getTexture("irrlichtlogo3.png"),
core::position2d<s32>(10, driver->getScreenSize().Height - 128));
// lock the logo's edges to the bottom left corner of the screen

View File

@ -236,6 +236,8 @@ int main()
vsFileName = mediaPath + "opengl.vsh";
}
break;
default:
break;
}
/*

View File

@ -285,9 +285,9 @@ int main()
driver->getTexture(mediaPath + "rockwall.jpg"));
room->setMaterialTexture(1, normalMap);
// Stones don't glitter..
room->getMaterial(0).SpecularColor.set(0,0,0,0);
room->getMaterial(0).Shininess = 0.f;
// Stones don't glitter.. (but specular highlight for EMT_SOLID)
//room->getMaterial(0).SpecularColor.set(0,0,0,0);
//room->getMaterial(0).Shininess = 0.f;
room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
@ -365,7 +365,7 @@ int main()
// add light 1 (more green)
scene::ILightSceneNode* light1 =
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 400.0f);
// add fly circle animator to light 1
scene::ISceneNodeAnimator* anim =
@ -398,7 +398,7 @@ int main()
// add light 2 (red)
scene::ISceneNode* light2 =
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 400.0f);
// add fly circle animator to light 2
anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f,

View File

@ -120,7 +120,7 @@ int main()
const io::path mediaPath = getExampleMediaPath();
// add irrlicht logo
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo2.png"),
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo3.png"),
core::position2d<s32>(10,10));
//set other font
@ -213,6 +213,7 @@ int main()
terrain->getMeshBufferForLOD(*buffer, 0);
video::S3DVertex2TCoords* data = (video::S3DVertex2TCoords*)buffer->getVertexBuffer().getData();
// Work on data or get the IndexBuffer with a similar call.
(void)data; // disable unused variable warnings
buffer->drop(); // When done drop the buffer again.
/*

View File

@ -318,7 +318,7 @@ int IRRCALLCONV main(int argc, char* argv[])
device->getCursorControl()->setVisible(false);
// load the engine logo
gui->addImage(driver->getTexture("irrlichtlogo2.png"),
gui->addImage(driver->getTexture("irrlichtlogo3.png"),
core::position2d<s32>(10, 10));
// show the driver logo
@ -335,6 +335,8 @@ int IRRCALLCONV main(int argc, char* argv[])
case video::EDT_DIRECT3D9:
gui->addImage(driver->getTexture("directxlogo.png"), pos);
break;
default:
break;
}
/*
@ -355,14 +357,14 @@ int IRRCALLCONV main(int argc, char* argv[])
driver->endScene();
int fps = driver->getFPS();
//if (lastFPS != fps)
if (1 || lastFPS != fps)
{
io::IAttributes * const attr = smgr->getParameters();
core::stringw str = L"Q3 [";
str += driver->getName();
str += "] FPS:";
str += fps;
#ifdef _IRR_SCENEMANAGER_DEBUG
io::IAttributes * const attr = smgr->getParameters();
str += " Cull:";
str += attr->getAttributeAsInt("calls");
str += "/";

View File

@ -429,7 +429,7 @@ void CMaterialControl::init(scene::IMeshSceneNode* node, IrrlichtDevice * device
Driver = device->getVideoDriver ();
gui::IGUIEnvironment* guiEnv = device->getGUIEnvironment();
scene::ISceneManager* smgr = device->getSceneManager();
//scene::ISceneManager* smgr = device->getSceneManager();
const video::SMaterial & material = node->getMaterial(0);
s32 top = pos.Y;

View File

@ -57,7 +57,7 @@ typedef f32 generate_func(s16 x, s16 y, f32 s);
f32 eggbox(s16 x, s16 y, f32 s)
{
const f32 r = 4.f*sqrtf((f32)(x*x + y*y))/s;
const f32 z = expf(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y));
const f32 z = (f32)exp(-r * 2) * (cosf(0.2f * x) + cosf(0.2f * y));
return 0.25f+0.25f*z;
}
@ -180,7 +180,7 @@ private:
public:
SMesh* Mesh;
TMesh() : Mesh(0), Width(0), Height(0), Scale(1.f)
TMesh() : Width(0), Height(0), Scale(1.f), Mesh(0)
{
Mesh = new SMesh();
}

View File

@ -142,6 +142,8 @@ public:
//we were at the end of the video section so we reset our tag
currentSection=L"";
break;
default:
break;
}
}
@ -344,6 +346,8 @@ public:
}
}
break;
default:
break;
}
}

View File

@ -497,6 +497,7 @@ void CDemo::loadSceneData()
bill = sm->addBillboardSceneNode(0, core::dimension2d<f32>(100,100),
waypoint[r]+ core::vector3df(0,20,0));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "portal1.bmp"));
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->addAnimator(anim);
@ -583,7 +584,7 @@ void CDemo::createLoadingScreen()
const io::path mediaPath = getExampleMediaPath();
// irrlicht logo
device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture(mediaPath + "irrlichtlogo2.png"),
device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture(mediaPath + "irrlichtlogo3.png"),
core::position2d<s32>(5,5));
// loading text
@ -648,8 +649,8 @@ void CDemo::shoot()
else
{
// doesnt collide with wall
core::vector3df start = camera->getPosition();
core::vector3df end = (camera->getTarget() - start);
start = camera->getPosition();
end = (camera->getTarget() - start);
end.normalize();
start += end*8.0f;
end = start + (end * camera->getFarValue());

View File

@ -27,9 +27,9 @@ CMainMenu::CMainMenu()
bool CMainMenu::run()
{
video::E_DRIVER_TYPE driverType = EDT_OPENGL;
video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
if (!IrrlichtDevice::isDriverSupported(video::EDT_OPENGL))
driverType = video::video::EDT_BURNINGSVIDEO;
driverType = video::EDT_BURNINGSVIDEO;
MenuDevice = createDevice(driverType,
core::dimension2d<u32>(512, 384), 16, false, false, false, this);
@ -195,6 +195,7 @@ bool CMainMenu::run()
{
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "particlered.bmp"));
}
// add fly circle animator to the light
@ -213,6 +214,7 @@ bool CMainMenu::run()
{
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "portal1.bmp"));
}
// add fly circle animator to the light
@ -275,7 +277,7 @@ bool CMainMenu::run()
{
if (!selected)
{
outDriver=video::E_DRIVER_TYPE(i);
driverType=video::E_DRIVER_TYPE(i);
break;
}
--selected;