mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
updated materials to use the new shader system
This commit is contained in:
@@ -37,12 +37,12 @@ namespace battleship{
|
||||
root->createSkybox(path);
|
||||
|
||||
Quad *quad = new Quad(Vector3(size.x, size.y, 1) * 1, true);
|
||||
Material *mat = new Material();
|
||||
mat->setTexturingEnabled(true);
|
||||
mat->setLightingEnabled(false);
|
||||
Material *mat = new Material(root->getLibPath() + "texture");
|
||||
mat->addVariable("texturingEnabled", true);
|
||||
mat->addVariable("lightingEnabled", false);
|
||||
string fr[]{PATH + "Textures/water.jpg"};
|
||||
Texture *t = new Texture(fr, 1);
|
||||
mat->addDiffuseMap(t);
|
||||
mat->addVariable("textures[0]", t, true);
|
||||
quad->setMaterial(mat);
|
||||
Node *water = new Node();
|
||||
water->attachMesh(quad);
|
||||
|
||||
+3
-3
@@ -39,11 +39,11 @@ namespace battleship{
|
||||
this->node = smgr->addAnimatedMeshSceneNode(mesh);
|
||||
*/
|
||||
this->node = new Model((projectileData::meshPath[id][weaponTypeId]));
|
||||
Material *mat = new Material();
|
||||
mat->setLightingEnabled(false);
|
||||
Material *mat = new Material(Root::getSingleton()->getLibPath() + "texture");
|
||||
mat->addVariable("lightingEnabled", false);
|
||||
string f[]{projectileData::diffuseMapTextPath[id][weaponTypeId]};
|
||||
Texture *diffuseTexture = new Texture(f, 1);
|
||||
mat->addDiffuseMap(diffuseTexture);
|
||||
mat->addVariable("textures[0]", diffuseTexture, true);
|
||||
this->node->setMaterial(mat);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user