Parts with "ShowName" enabled now do what they are supposed to. Huzzah!

This commit is contained in:
andreja6
2018-10-25 18:56:00 -07:00
parent f7d6781698
commit 7e2eb2c694
7 changed files with 55 additions and 18 deletions

View File

@@ -1211,7 +1211,7 @@ void Demo::onGraphics(RenderDevice* rd) {
renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
renderDevice->setAmbientLightColor(lighting.ambient);
/*
Vector3 gamepoint = Vector3(0, 5, 0);
Vector3 camerapoint = rd->getCameraToWorldMatrix().translation;
float distance = pow(pow((double)gamepoint.x - (double)camerapoint.x, 2) + pow((double)gamepoint.y - (double)camerapoint.y, 2) + pow((double)gamepoint.z - (double)camerapoint.z, 2), 0.5);
@@ -1222,7 +1222,7 @@ void Demo::onGraphics(RenderDevice* rd) {
distance = distance*-1;
fntdominant->draw3D(rd, "Testing", CoordinateFrame(rd->getCameraToWorldMatrix().rotation, gamepoint), 0.04*distance, Color3::yellow(), Color3::black(), G3D::GFont::XALIGN_CENTER, G3D::GFont::YALIGN_CENTER);
}
*/
rd->beforePrimitive();
@@ -1248,11 +1248,17 @@ void Demo::onGraphics(RenderDevice* rd) {
while(!postRenderStack.empty())
{
Instance* inst = postRenderStack.top();
postRenderStack.pop();
Instance* inst = postRenderStack.at(0);
postRenderStack.erase(postRenderStack.begin());
if(PVInstance* pinst = dynamic_cast<PVInstance*>(inst))
{
pinst->postRender(rd);
}
}
renderDevice->disableLighting();
if (sky.notNull()) {