diff --git a/src/modules/graphic/ssggraph/grcarlight.cpp b/src/modules/graphic/ssggraph/grcarlight.cpp index 55c337d2..abb00ff7 100644 --- a/src/modules/graphic/ssggraph/grcarlight.cpp +++ b/src/modules/graphic/ssggraph/grcarlight.cpp @@ -225,10 +225,11 @@ void grInitCarlight(int index) theCarslight[i].lightAnchor= new ssgBranch(); } + sprintf(buf, "data/textures;data/img;."); + if (!frontlight1) { - sprintf(buf, "data/textures;data/img;."); - frontlight1 = (ssgSimpleState*)grSsgLoadTexStateEx("frontlight1.rgb", buf, FALSE, FALSE); - if (frontlight1 != NULL) { + frontlight1 = (ssgSimpleState*)grSsgLoadTexStateEx("frontlight1.png", buf, FALSE, FALSE); + if (frontlight1) { frontlight1->disable(GL_LIGHTING); frontlight1->enable(GL_BLEND); frontlight1->disable(GL_CULL_FACE); @@ -238,9 +239,8 @@ void grInitCarlight(int index) } if (!frontlight2) { - sprintf(buf, "data/textures;data/img;."); - frontlight2 = (ssgSimpleState*)grSsgLoadTexStateEx("frontlight2.rgb", buf, FALSE, FALSE); - if (frontlight2 != NULL) { + frontlight2 = (ssgSimpleState*)grSsgLoadTexStateEx("frontlight2.png", buf, FALSE, FALSE); + if (frontlight2) { frontlight2->disable(GL_LIGHTING); frontlight2->enable(GL_BLEND); frontlight2->disable(GL_CULL_FACE); @@ -250,9 +250,8 @@ void grInitCarlight(int index) } if (!rearlight1) { - sprintf(buf, "data/textures;data/img;."); - rearlight1 = (ssgSimpleState*)grSsgLoadTexStateEx("rearlight1.rgb", buf, FALSE, FALSE); - if (rearlight1 != NULL) { + rearlight1 = (ssgSimpleState*)grSsgLoadTexStateEx("rearlight1.png", buf, FALSE, FALSE); + if (rearlight1) { rearlight1->disable(GL_LIGHTING); rearlight1->enable(GL_BLEND); rearlight1->disable(GL_CULL_FACE); @@ -262,9 +261,8 @@ void grInitCarlight(int index) } if (!rearlight2) { - sprintf(buf, "data/textures;data/img;."); - rearlight2 = (ssgSimpleState*)grSsgLoadTexStateEx("rearlight2.rgb", buf, FALSE, FALSE); - if (rearlight2 != NULL) { + rearlight2 = (ssgSimpleState*)grSsgLoadTexStateEx("rearlight2.png", buf, FALSE, FALSE); + if (rearlight2) { rearlight2->disable(GL_LIGHTING); rearlight2->enable(GL_BLEND); rearlight2->disable(GL_CULL_FACE); @@ -274,9 +272,8 @@ void grInitCarlight(int index) } if (!breaklight1) { - sprintf(buf, "data/textures;data/img;."); - breaklight1 = (ssgSimpleState*)grSsgLoadTexStateEx("breaklight1.rgb", buf, FALSE, FALSE); - if (breaklight1 != NULL) { + breaklight1 = (ssgSimpleState*)grSsgLoadTexStateEx("breaklight1.png", buf, FALSE, FALSE); + if (breaklight1) { breaklight1->disable(GL_LIGHTING); breaklight1->enable(GL_BLEND); breaklight1->disable(GL_CULL_FACE); @@ -286,9 +283,8 @@ void grInitCarlight(int index) } if (!breaklight2) { - sprintf(buf, "data/textures;data/img;."); - breaklight2 = (ssgSimpleState*)grSsgLoadTexStateEx("breaklight2.rgb", buf, FALSE, FALSE); - if (breaklight2 != NULL) { + breaklight2 = (ssgSimpleState*)grSsgLoadTexStateEx("breaklight2.png", buf, FALSE, FALSE); + if (breaklight2) { breaklight2->disable(GL_LIGHTING); breaklight2->enable(GL_BLEND); breaklight2->disable(GL_CULL_FACE); diff --git a/src/modules/graphic/ssggraph/grscene.cpp b/src/modules/graphic/ssggraph/grscene.cpp index 22dca4c1..56d7059a 100644 --- a/src/modules/graphic/ssggraph/grscene.cpp +++ b/src/modules/graphic/ssggraph/grscene.cpp @@ -478,13 +478,12 @@ void grCustomizePits(void) { ThePits->addKid(pit); // Let's draw the logo - // Load logo texture (.rgb first, for backwards compatibility, - // then .png) - const std::string strRGBLogoFileName = strLogoFileName + ".rgb"; + // Load logo texture (.png first, then .rgb for backwards compatibility) + const std::string strRGBLogoFileName = strLogoFileName + ".png"; ssgState *stLogo = grSsgLoadTexStateEx(strRGBLogoFileName.c_str(), buf, FALSE, FALSE, FALSE); if (!stLogo) { - const std::string strPNGLogoFileName = strLogoFileName + ".png"; + const std::string strPNGLogoFileName = strLogoFileName + ".rgb"; stLogo = grSsgLoadTexStateEx(strPNGLogoFileName.c_str(), buf, FALSE, FALSE); } diff --git a/src/modules/graphic/ssggraph/grskidmarks.cpp b/src/modules/graphic/ssggraph/grskidmarks.cpp index 085ca741..aca8ca4a 100644 --- a/src/modules/graphic/ssggraph/grskidmarks.cpp +++ b/src/modules/graphic/ssggraph/grskidmarks.cpp @@ -70,7 +70,7 @@ grInitSkidmarks(const tCarElt *car) // add texture skidState->enable(GL_TEXTURE_2D); skidState->setColourMaterial(GL_AMBIENT_AND_DIFFUSE); - skidState->setTexture ("data/textures/grey-tracks.rgb", TRUE, TRUE, TRUE); + skidState->setTexture ("data/textures/grey-tracks.png", TRUE, TRUE, TRUE); }//if skidState }//if skidState NULL diff --git a/src/modules/graphic/ssggraph/grsmoke.cpp b/src/modules/graphic/ssggraph/grsmoke.cpp index 16c7ae96..58d5dc2e 100644 --- a/src/modules/graphic/ssggraph/grsmoke.cpp +++ b/src/modules/graphic/ssggraph/grsmoke.cpp @@ -116,7 +116,7 @@ grInitSmoke(const int index) // add temp object to get a reference on the states if (!mst) { sprintf(buf, "data/textures;data/img;."); - mst = (ssgSimpleState*)grSsgLoadTexStateEx("smoke.rgb", buf, FALSE, FALSE); + mst = (ssgSimpleState*)grSsgLoadTexStateEx("smoke.png", buf, FALSE, FALSE); if (mst) { mst->disable(GL_LIGHTING); mst->enable(GL_BLEND); @@ -128,7 +128,7 @@ grInitSmoke(const int index) if (!mstf0) { sprintf(buf, "data/textures;data/img;."); - mstf0 = (ssgSimpleState*)grSsgLoadTexStateEx("fire0.rgb", buf, FALSE, FALSE); + mstf0 = (ssgSimpleState*)grSsgLoadTexStateEx("fire0.png", buf, FALSE, FALSE); if (mstf0) { mstf0->disable(GL_LIGHTING); mstf0->enable(GL_BLEND); @@ -140,7 +140,7 @@ grInitSmoke(const int index) if (!mstf1) { sprintf(buf, "data/textures;data/img;."); - mstf1 = (ssgSimpleState*)grSsgLoadTexStateEx("fire1.rgb", buf, FALSE, FALSE); + mstf1 = (ssgSimpleState*)grSsgLoadTexStateEx("fire1.png", buf, FALSE, FALSE); if (mstf1) { mstf1->disable(GL_LIGHTING); mstf1->enable(GL_BLEND);