improved engine init and plugin registration

This commit is contained in:
aap
2017-08-26 20:08:23 +02:00
parent 45b48b8f4e
commit ea48c140c1
30 changed files with 246 additions and 124 deletions

View File

@ -201,6 +201,22 @@ InitRW(void)
return true;
}
void
im2dtest(void)
{
static rw::gl3::Im2DVertex verts[] = {
{ -0.5, -0.5, 0.0, 255, 0, 0, 255, 0.0, 0.0 },
{ 0.5, -0.5, 0.0, 0, 255, 0, 255, 0.0, 0.0 },
{ -0.5, 0.5, 0.0, 0, 0, 255, 255, 0.0, 0.0 },
{ 0.5, 0.5, 0.0, 0, 255, 255, 255, 0.0, 0.0 },
};
static short indices[] = {
0, 1, 2, 3
};
rw::engine->device.im2DRenderIndexedPrimitive(rw::PRIMTYPETRISTRIP,
&verts, 4, &indices, 4);
}
void
Draw(float timeDelta)
{
@ -210,6 +226,7 @@ Draw(float timeDelta)
camera->m_rwcam->beginUpdate();
clump->render();
im2dtest();
camera->m_rwcam->endUpdate();
camera->m_rwcam->showRaster();