Game Development Community

SkyObject causes rendering trouble

by Shaderman · in Torque Game Engine Advanced · 04/10/2008 (12:51 pm) · 0 replies

Hi.

I'm just trying to port this a* resource to TGEA 1.7 but run into this (DivX) rendering problem.

This is the code I'm currently using:

void AStar::render(SceneState* state) //, SceneRenderImage*)
{
  if (!Con::getBoolVariable("$pref::AStar::Render", false))
        return;
 
  GFX->setTextureStageColorOp( 0, GFXTOPDisable );
  GFX->disableShaders();
 
  int i;
 
  for (NMPoint* tmp = list; tmp; tmp = tmp->next) //iterate thru list
  {
        PrimBuild::begin( GFXLineList, 2 );
        PrimBuild::color4f( 0, 1, 0, 1 );
        PrimBuild::vertex3f(tmp->loc.x, tmp->loc.y, tmp->loc.z);
        PrimBuild::vertex3f(tmp->loc.x, tmp->loc.y, tmp->loc.z-1);
        PrimBuild::end();
 
        PrimBuild::color4f( 0, 0, 1, 1 );
        for (i=0; i<8; i++)
        {
          if (!tmp->adjs[i])
                continue;
 
          PrimBuild::begin( GFXLineList, 2 );
          PrimBuild::vertex3f(tmp->loc.x, tmp->loc.y, tmp->loc.z);
          PrimBuild::vertex3f(tmp->adjs[i]->loc.x, tmp->adjs[i]->loc.y, tmp->adjs[i]->loc.z-1);
          PrimBuild::end();
        }
  }
}

Any ideas how to fix that problem?

Thanks,

Stefan