Updated screenshots.

This commit is contained in:
bkaradzic 2013-10-23 22:48:16 -07:00
parent 9ba51d6ff9
commit 48c477d0ac
15 changed files with 47 additions and 8 deletions

View file

@ -104,12 +104,18 @@ Use a single distance field font to render text of various size.
### 12-lod
Mesh LOD transitions.
![example-12-lod](https://github.com/bkaradzic/bgfx/raw/master/examples/12-lod/screenshot.png)
### 13-stencil
Stencil reflections and shadows.
![example-13-stencil](https://github.com/bkaradzic/bgfx/raw/master/examples/13-stencil/screenshot.png)
### 14-shadowvolumes
Shadow volumes.
![example-14-shadowvolumes](https://github.com/bkaradzic/bgfx/raw/master/examples/14-shadowvolumes/screenshot.png)
Dependencies
------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

View file

@ -6,6 +6,8 @@
#include <bgfx.h>
#include <bx/string.h>
#include <time.h>
#include "entry_p.h"
#include "cmd.h"
#include "input.h"
@ -72,6 +74,24 @@ namespace entry
bgfx::setDebug(s_debug);
return 0;
}
else if (0 == strcmp(_argv[1], "screenshot") )
{
if (_argc > 2)
{
bgfx::saveScreenShot(_argv[2]);
}
else
{
time_t tt;
time(&tt);
char filePath[256];
bx::snprintf(filePath, sizeof(filePath), "temp/screenshot-%d", tt);
bgfx::saveScreenShot(filePath);
}
return 0;
}
}
return 1;
@ -91,6 +111,7 @@ namespace entry
{ entry::Key::F3, entry::Modifier::None, 1, cmd, "graphics wireframe" },
{ entry::Key::F7, entry::Modifier::None, 1, cmd, "graphics vsync" },
{ entry::Key::F8, entry::Modifier::None, 1, cmd, "graphics msaa" },
{ entry::Key::Print, entry::Modifier::None, 1, cmd, "graphics screenshot" },
INPUT_BINDING_END
};
@ -176,10 +197,11 @@ namespace entry
break;
}
}
} while (NULL != ev);
inputProcess();
} while (NULL != ev);
if (_reset != s_reset)
{
_reset = s_reset;

View file

@ -415,6 +415,17 @@ namespace entry
{
uint8_t modifiers = translateKeyModifiers();
Key::Enum key = translateKey(_wparam);
if (Key::Print == key
&& 0x3 == (_lparam>>30) )
{
// VK_SNAPSHOT doesn't generate keydown event. Fire on down event when previous
// key state bit is set to 1 and transition state bit is set to 1.
//
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646280%28v=vs.85%29.aspx
m_eventQueue.postKeyEvent(key, modifiers, true);
}
m_eventQueue.postKeyEvent(key, modifiers, _id == WM_KEYDOWN || _id == WM_SYSKEYDOWN);
}
break;