Added F8 as MSAA toggle in examples.

This commit is contained in:
bkaradzic 2013-02-21 22:05:33 -08:00
parent c2f2c3bdf0
commit 35d7d2ff1b
11 changed files with 125 additions and 112 deletions
examples/04-mesh

View file

@ -259,9 +259,13 @@ struct Mesh
bgfx::setVertexBuffer(group.m_vbh);
// Set render states.
bgfx::setState(BGFX_STATE_RGB_WRITE
bgfx::setState(0
|BGFX_STATE_RGB_WRITE
|BGFX_STATE_ALPHA_WRITE
|BGFX_STATE_DEPTH_WRITE
|BGFX_STATE_DEPTH_TEST_LESS
|BGFX_STATE_CULL_CCW
|BGFX_STATE_MSAA
);
// Submit primitive for rendering to view 0.
@ -279,6 +283,7 @@ int _main_(int _argc, char** _argv)
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_NONE;
bgfx::init();
bgfx::reset(width, height);
@ -326,7 +331,7 @@ int _main_(int _argc, char** _argv)
Mesh mesh;
mesh.load("meshes/bunny.bin");
while (!processEvents(width, height, debug) )
while (!processEvents(width, height, debug, reset) )
{
// Set view 0 default viewport.
bgfx::setViewRect(0, 0, 0, width, height);