Last active
April 15, 2018 20:46
-
-
Save hugoam/5009198c58150dea7547ec5552cc7b3d to your computer and use it in GitHub Desktop.
Minimal bgfx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() | |
{ | |
// window context creation code goes here | |
bgfx::PlatformData pd = {}; | |
pd.nwh = // windows native handle goes here | |
bgfx::setPlatformData(pd); | |
bgfx::init(); | |
uint32_t width = // context width goes here | |
uint32_t height = // context height goes here | |
bgfx::reset(width, height, BGFX_RESET_NONE); | |
bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(height)); | |
bgfx::setViewClear(0, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, 0x000000ff, 1.0f, 0); | |
while(true) | |
{ | |
bgfx::touch(0); | |
bgfx::frame(); | |
} | |
bgfx::shutdown(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment