Hi, I'm trying to draw line primitives using FFP.
I've been following the FFP demo under the systems folder, so I made a plugin, added it to my engine.
It seems the best I can do is to get a white box to draw for one frame and then they go away.
Help? Thanks
I replaced the ::render method in the FFP demo with the code below. Like I said, I see a white box for one frame or so and then its gone...like it's overdrawn by my scene or something.
void render(float time) {
App *app = App::get();
Ffp *ffp = Ffp::get();
// screen size
int width = app->getWidth();
int height = app->getHeight();
ffp->enable(Ffp::MODE_SOLID);
ffp->setOrtho(width, height);
ffp->beginLines();
ffp->addLines(4);
ffp->addVertex(0, 0, 0);
ffp->setColor(1.0f, 1.0f, 1.0f, 1.0f);
ffp->addVertex(0, 100, 0);
ffp->addVertex(100, 100, 0);
ffp->addVertex(100, 0, 0);
ffp->addIndex(0);
ffp->addIndex(1);
ffp->addIndex(1);
ffp->addIndex(2);
ffp->addIndex(2);
ffp->addIndex(3);
ffp->addIndex(3);
ffp->addIndex(0);
ffp->endLines();
ffp->disable();
}