mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Replaced bgfx::setProgram function with bgfx::submit argument. Added bgfx::touch and bgfx::getStats.
This commit is contained in:
@@ -173,7 +173,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
|
||||
// This dummy draw call is here to make sure that view 0 is cleared
|
||||
// if no other draw calls are submitted to view 0.
|
||||
bgfx::submit(0);
|
||||
bgfx::touch(0);
|
||||
|
||||
int64_t now = bx::getHPCounter();
|
||||
static int64_t last = now;
|
||||
@@ -272,9 +272,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
// Set instance data buffer.
|
||||
bgfx::setInstanceDataBuffer(idb, numInstances);
|
||||
|
||||
// Set vertex and fragment shaders.
|
||||
bgfx::setProgram(program);
|
||||
|
||||
// Set vertex and index buffer.
|
||||
bgfx::setVertexBuffer(vbh);
|
||||
bgfx::setIndexBuffer(ibh);
|
||||
@@ -293,7 +290,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
);
|
||||
|
||||
// Submit primitive for rendering to view 0.
|
||||
bgfx::submit(0);
|
||||
bgfx::submit(0, program);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,9 +309,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
// Set transform for draw call.
|
||||
bgfx::setTransform(mtx);
|
||||
|
||||
// Set vertex and fragment shaders.
|
||||
bgfx::setProgram(program);
|
||||
|
||||
// Set vertex and index buffer.
|
||||
bgfx::setVertexBuffer(vbh);
|
||||
bgfx::setIndexBuffer(ibh);
|
||||
@@ -333,7 +327,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
);
|
||||
|
||||
// Submit primitive for rendering to view 0.
|
||||
bgfx::submit(0);
|
||||
bgfx::submit(0, program);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user