Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Overview

bgfx - Cross-platform rendering library

Build Status Build status License Join the chat at https://discord.gg/9eMbv7J

What is it?

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Supported rendering backends:

  • Direct3D 9
  • Direct3D 11
  • Direct3D 12
  • GNM (only for licensed PS4 developers, search DevNet forums for source)
  • Metal
  • OpenGL 2.1
  • OpenGL 3.1+
  • OpenGL ES 2
  • OpenGL ES 3.1
  • Vulkan
  • WebGL 1.0
  • WebGL 2.0
  • WebGPU/Dawn (experimental)

Supported platforms:

  • Android (14+, ARM, x86, MIPS)
  • asm.js/Emscripten (1.25.0)
  • FreeBSD
  • iOS (iPhone, iPad, AppleTV)
  • Linux
  • MIPS Creator CI20
  • OSX (10.12+)
  • PlayStation 4
  • RaspberryPi
  • Windows (XP, Vista, 7, 8, 10)
  • UWP (Universal Windows, Xbox One)

Supported compilers:

  • Clang 3.3 and above
  • GCC 5 and above
  • VS2017 and above

Languages:

Building

Getting involved

Examples

API Reference

Tools

Who is using it? #madewithbgfx

Airmech

http://airmech.com/ AirMech is a free-to-play futuristic action real-time strategy video game developed and published by Carbon Games.
airmech

cmftStudio

https://github.com/dariomanesku/cmftStudio cmftStudio - cubemap filtering tool.
cmftStudio

Crown

https://github.com/dbartolini/crown Crown is a general purpose data-driven game engine, written from scratch with a minimalistic and data-oriented design philosophy in mind.
Crown screenshot

Offroad Legends 2

http://www.dogbytegames.com/ Dogbyte Games is an indie mobile developer studio focusing on racing games.
ios

Torque6

https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th derivative of the original Torque Engine. Torque 6 Material Editor

Kepler Orbits

https://github.com/podgorskiy/KeplerOrbits KeplerOrbits - Tool that calculates positions of celestial bodies using their orbital elements. Web Demo

CETech

https://github.com/cyberegoorg/cetech - CETech is Data-Driven game engine and toolbox inspired by Bitsquid/Stingray engine.
CETech screenshot

ioquake3

https://github.com/jpcy/ioq3-renderer-bgfx - A renderer for ioquake3 written in C++ and using bgfx to support multiple rendering APIs.
ioq3-renderer-bgfx screenshot

DLS

http://makingartstudios.itch.io/dls - DLS the digital logic simulator game.
DLS - Creating a 4-bit Register

http://dls.makingartstudios.com/sandbox/ - DLS: The Sandbox
dls-sandbox-screenshot

MAME

https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator Try MAME in Browser!
mame-screenshot

Blackshift

https://blackshift.itch.io/blackshift - Blackshift is a grid-based, space-themed action puzzle game which isn't afraid of complexity — think Chip's Challenge on crack.

Blackshift Trailer, May 2016

Real-Time Polygonal-Light Shading with Linearly Transformed Cosines

https://eheitzresearch.wordpress.com/415-2/ - Real-Time Polygonal-Light Shading with Linearly Transformed Cosines, Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt, ACM SIGGRAPH 2016

Real-Time Polygonal-Light Shading with Linearly Transformed Cosines

Dead Venture

http://www.dogbytegames.com/dead_venture.html - Dead Venture is a new Drive 'N Gun game where you help a handful of survivals reach the safe haven: a military base on a far island.

Dead Venture - Gameplay Teaser (iOS / Android)

REGoth

https://github.com/degenerated1123/REGoth - Open source reimplementation of the zEngine, used by the game "Gothic" and "Gothic II".

Browser demo: http://gothic-dx11.de/gothic-js/REGoth.html

REGoth Engine

Ethereal Engine

https://github.com/volcoma/EtherealEngine EtherealEngine C++ Game Engine and WYSIWYG Editor
EtherealEngine screenshot

Go Rally

http://gorallygame.com/ - Go Rally is top-down rally game with a career mode, multiplayer time challenges, and a track creator.

Go Rally

vg-renderer

https://github.com/jdryg/vg-renderer#vg-renderer - A vector graphics renderer for bgfx, based on ideas from both NanoVG and ImDrawList (Dear ImGUI)
vg-renderer

Zombie Safari

http://www.dogbytegames.com/zombie_safari.html - Do what you please in this Open-World Offroad Driving game: explore massive landscapes, complete challenges, smash zombies, find secret locations, unlock and upgrade cars and weapons, it's up to you!

Zombie Safari - Official Gameplay Trailer (Android)

Smith and Winston

http://www.smithandwinston.com/ - Smith and Winston is an exploration twin stick shooter for PC, PS4 & XBoxOne arriving in late 2018. Smith and Winston features a massively destructable voxel world, rapid twin stick combat, physics puzzles and Metroid style discovery.

Smith and Winston: Gameplay Video

Football Manager 2018

http://www.footballmanager.com/ - Football Manager 2018 is a 2017 football management simulation video game developed by Sports Interactive and published by Sega.

Match Engine | Football Manager 2018

WonderWorlds

http://wonderworlds.me/ - WonderWorlds is a place to play thousands of user-created levels and stories, make your own using the extensive in-game tools and share them with whomever you want.

WonderWorlds

two-io / mud

https://hugoam.github.io/two-io/ - an all-purpose c++ app prototyping library, focused towards live graphical apps and games.

mud

Talking Tom Pool

https://outfit7.com/apps/talking-tom-pool/ - "Sling and match” puzzle game for mobile devices.

Talking Tom Pool

GPlayEngine

https://github.com/fredakilla/GPlayEngine#gplayengine - GPlayEngine is C++ cross-platform game engine for creating 2D/3D games based on the GamePlay 3D engine v3.0.

Off The Road

http://www.dogbytegames.com/off_the_road.html - Sandbox off-road driving simulator.

Off The Road

Coal Burnout

https://beardsvibe.com/ - Multiplayer PVP rhythm game.

coal-burnout

My Talking Tom 2

https://outfit7.com/apps/my-talking-tom-2/ - Many mini games for mobile devices.

My Talking Tom 2

NeoAxis Engine

https://www.neoaxis.com/ - Versatile 3D project development environment.

neoaxis-engine

xatlas

https://github.com/jpcy/xatlas#xatlas - Mesh parameterization library

xatlas

Heroes of Hammerwatch

https://store.steampowered.com/app/677120/Heroes_of_Hammerwatch/ Heroes of Hammerwatch is a rogue-lite action-adventure game set in the same universe as Hammerwatch. Encounter endless hordes of enemies, traps, puzzles, secrets and lots of loot, as you battle your way through procedurally generated levels to reach the top of the Forsaken Spire.

Heroes of Hammerwatch

Babylon Native

Build cross-platform native applications with the power of the Babylon.js JavaScript framework.

Babylon Native

Nira

Instantly load and view assets on any device. All you need is a web browser.

Nira
SIGGRAPH 2019: Project Nira: Instant Interactive Real-Time Access to Multi-Gigabyte Sized 3D Assets on Any Device

Heroes of Hammerwatch

openblack

An open source reimplementation of the game Black & White (2001).

OpenBlack

openblack

Cluster

Implementation of Clustered Shading and Physically Based Rendering with the bgfx rendering library.

Cluster

cluster

NIMBY Rails

NIMBY Rails is a management and design sandbox game for railways you build in the real world.

NIMBY Rails

NIMBY Rails

Minecraft

https://www.minecraft.net/zh-hant/attribution/

home-hero-1200x600

FFNx

Next generation driver for Final Fantasy VII and Final Fantasy VIII (with native Steam 2013 release support!)

FFNx

FFVIII

Shadow Gangs

Shadow Gangs is an arcade style ninja action game.

https://www.microsoft.com/en-gb/p/shadow-gangs/9n6hkcr65qdq

Shadow Gangs

Growtopia

Growtopia is a free-to-play sandbox MMO game with almost endless possibilities for world creation, customization and having fun with your friends. Enjoy thousands of items, challenges and events.

https://growtopiagame.com/

growtopia

Galaxy Trucker

Digital implementation of tabletop spaceship building in real-time or turn-based mode, then surviving space adventures, with AI opponents, multiplayer, achievements and solo campaign.

https://galaxytrucker.com/

Galaxy Trucker

Through the Ages

The card tabletop deep strategy game in your devices. Lead your civilization from pyramids to space flights. Challenges, achievements, skilled AIs and online multiplayer.

https://throughtheages.com/

Through the Ages

Codenames

One of the best party game. Two rival spymasters know the secret identities of 25 agents. Their teammates know the agents only by their codenames. Simple to explain, easy to understand, challenging gameplay.

https://codenamesgame.com/

Codenames

License (BSD 2-clause)

Copyright 2010-2021 Branimir Karadzic

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, this
      list of conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Comments
  • examples: Add imageformats example

    examples: Add imageformats example

    Example which renders RGBA color wheel, alpha gradient and full value channel textures to catch conversion errors and bad internal type representations between different backend renderers.

    The example uses bimg to convert from a master texture to different textures.

    Each texture is rendered in an ImGui list using ImGui::Image. A close-up is visible when hovering over each image.

    U and I textures are skipped because they don't work for sampling. Compressed textures are skipped because they don't have conversion functions. Depth textures are not rendered because they don't work with channels.

    Note: The screenshot shows existing bugs (ref: https://github.com/bkaradzic/bx/issues/282 #2866) and was taken in OpenGL image

    opened by bwrsandman 36
  • Super Slow rendering on RPi3 for example 20 (nanovg)

    Super Slow rendering on RPi3 for example 20 (nanovg)

    Hello, i've successfully compiled all the examples (amazing work btw), and run some of them on a Raspberry PI 3. The example 20 is very very slow on the raspberry pi 3, but it seems that is actually using the proper OpenGLES renderer, not a simulated one.

    Do you have any clue?

    Thanks

    opened by aCorrado 35
  • vulkan renderer draft implementation

    vulkan renderer draft implementation

    Edit: 2019-08-01 - I reopened this pull request as one commit.

    First of all, I would like to thank you for producing a light-weight but great renderer. I am working in the image and video graphics field, and decided to integrate the BGFX renderer into my engine.

    Additionally, I think that it would be very nice if the BGFX could be executed with the Vulkan backend everywhere (#274), so I decided to do additional implementation of the vulkan backend, and this pull request is the draft of the implementation.

    Major changes

    The macOS-vulkan support setting (thanks to MoltenVK!)
    • KHR_SURFACE_EXTENSION_NAME and VK_IMPORT_INSTANCE_PLATFORM for BX_PLATFORM_OSX are defined.
    • libvulkan.dylib would be loaded for BX_PLATFORM_OSX.
    • The surface creation code is implemented by referring to renderer_mtl.mm.
    Surface format
    • Figure out whether VK_FORMAT_R8G8B8A8_UNORM or VK_FORMAT_R8G8B8A8_UNORM is supported, and use it for surface texture format.
    • Currently depth-stencil format is fixed to VK_FORMAT_D24_UNORM_S8_UINT.
    The order of steps in the initialization is arranged
    • The render pass creation step is moved after the swapchain image view creation.
    The number of swapchain image
    • While the array size of the swapchain image is fixed to 4, the number of swapchain image provided by the vulkan device can be less than that. (e.g. android device)
    • Thus, the swapchain image views, framebuffers, semaphores, and command buffers are created with the suggested number of the swapchain image for the surface.
    Descriptor set binding index
    • I've encountered the validation error when I tried to use the shader with texture, and the error message said that the descriptor set binding index should be different from the others.
    • So I've decided to modify the SPIR-V shader compiler in order to automatically set descriptor binding index.
    // shaderc_spirv.cpp, line 639
    shader->setEntryPoint("main");
    shader->setAutoMapBindings(true);
    uint32_t bindingOffset = (stage == EShLanguage::EShLangFragment ? 48 : 0);
    shader->setShiftBinding(glslang::EResUbo, bindingOffset);
    shader->setShiftBinding(glslang::EResTexture, bindingOffset + 16);
    shader->setShiftBinding(glslang::EResSampler, bindingOffset + 32);
    
    • By using this code, the binding indices the UBO, texture, and sampler for a vertex shader would be started from 0, 16, 32 respectively, and those for a fragement shader would be started from 48, 64, 80.
    Descriptor set layout and pipeline layout
    • Because I could not find the way to convert a separated image into the combined image sampler in the vulkan, I have to bind both of image and its sampler with VkDescriptorImageInfo.
    • And the other uniforms seem to be a structure and it can be feeded with VkDescriptorBufferInfo
    • And all of those binding infomation should be included in the one descriptor set layout.
    • So the descriptor set bindings for each shader are set in its shader creation process, and the descriptor set layout is created and cached during the program creation.
    • Then the pipeline layout is created for the cached descriptor set layout. I think that it also be cached, but don't tried yet.
    Uniform size for ubo structure
    • While the uniform array (e.g. u_model[32]) used in the GLSL shader can be optimized during compilation, the SPIR-V compilation does not reduce its size because it combined with the other uniforms as a structure form.
    • So I changed the calculation method of the size of UBO as below:
    // shaderc_spirv.cpp, line 594
    if (un.type != UniformType::Sampler)
    	size = bx::max(size, (uint16_t)(un.regIndex + un.regCount*16));
    
    Sampler stage index
    • Some code is written for getting the samplers stage index.
    • Then it is stored as a location of the uniform.
    • Now a sampler uniform uses all storage for loc, regIndex, regCount in order to store stageIndex, imageBindingIndex, samplerBindingIndex, respectively.
    Texture and buffer
    • I referred to D3D12 renderer implementation.
    • The memory of texture images and vertex buffers is allocated for device access by default.
    • Thus the staging buffers are used in order to copy its contents from host memory into device memory.

    Current status

    • I've tested on windows 10, macOS.
    • I've succeeded to execute example 01, 02, 03, 04, 06, 07, 10, 11, 12, 13, and 14, even though some examples does not correctly.
    • Note that shaders in examples should be rebuilt by using the modified SPIR-V shader compiler.

    Next work

    • Debug text and image (the most important, I think!)
    • Cube map support
    • Framebuffer support
    • Instancing

    I'd like to listen your advise about how to implement the things above, especially debug text. Please leave the comment!

    Thank you for reading!

    opened by rinthel 34
  • "Mega" Example

    On certain platforms where the building/running the examples requires some manual step ( like iOS/OSX or android). It would be great to have a mega example that includes all current examples and lets the user select which example to start. This way with only one setup/build/install step a user could check every example.

    This app also could be uploaded to the googleplay/iOS store, so interested developers can check it.

    As a proof of concept I have implemented it here: https://gist.github.com/attilaz/410a4543020da4de11c62c00ec098c77

    It worked well. Only minor modification were needed in the current examples( adding #ifndef SKIP_ENTRY_IMPLEMENT_MAIN ) around ENTRY_IMPLEMENT_MAIN.

    The only limitation I have found with this implementation is name collision. With certain examples I get errors like this: 's_cubeVertices' : redefinition; different subscripts.

    I think this could be solved: A. putting every example code into a separate namespace. ( needs modification for examples ) B. Instead of including cpp files the project file could include every examples' cpp. (needs a genie script to generate this)

    Adding a "back"/"quit" button to examples to step back to the selector screen also could be handy.

    enhancement 
    opened by attilaz 34
  • Crash when stop using vertex and index buffer

    Crash when stop using vertex and index buffer

    Hi. I've created a simple example in https://github.com/TamToucan/bgfx/blob/master/examples/XX-map/map.cpp

    which reproduces the problem I'm having. NOTE: I am running on Windows using OPENGL (the example is hard-coded to OpenGL and the shaders have only been compiled for glsl)

    The rendering does the following

    1. map view - Render part of a large texture to the FBO.
    2. sprite view - Renders 3 sprites to the FBO using a vertex buffer containing the 4 corners of each sprite and an index buffer to create the 6 vertices for the 2 triangles for each sprite.
    3. screen view - The texture from the FBO is rendered to the screen

    Everything works fine, but in the example I only perform step(2) if Space is pressed, when space isn't pressed then nothing is done using the sprite view i.e. the transient vertex buffer containing the sprite data isn't created, the sprite shader program isn't used etc.

    The problem is when Space is then released I get a crash inside the ATI graphics driver DLL. I've been trying to step through the internals of BGFX, but I'm getting no where. Running with CodeXL gives

    "The thread tried to read or write data that is misaligned on hardware that does not provide alignment. For example, 16-bit values must be aligned on 2-byte boundaries; 32-bit values on 4-byte boundaries, and so on."

    Regards, Tam.

    opened by TamToucan 33
  • Crash in bgfx::init()

    Crash in bgfx::init()

    Hi, I have one user who consistently crashes in bgfx::init(). Do you think this might be a bug in bgfx? Of course, it's also possible the user just has bad drivers. If you think so, feel free to close. He can run other games though.

    I managed to extract this info from a .dmp. I didn't include the purported argument values because they seemed to be garbage. (s_ctx NULL right after a NULL check.) The call stack looks plausible, though.

    Operating system: Windows NT
                      6.1.7601 Service Pack 1
    CPU: x86
         GenuineIntel family 6 model 15 stepping 11
         2 CPUs
    
    Crash reason:  EXCEPTION_ACCESS_VIOLATION_READ
    Crash address: 0x24
    
    Thread 1:
    ntdll!ZwWaitForSingleObject+0x15
    KERNELBASE!WaitForSingleObjectEx+0x98
    kernel32!WaitForSingleObjectExImplementation+0x75
    kernel32!WaitForSingleObject+0x12
    bgfx::Context::frame+0x26 [bgfx\src\bgfx.cpp @ 1412]
    bgfx::Context::init+0x175 [bgfx\src\bgfx.cpp @ 1209]
    bgfx::init+0xe2 [bgfx\src\bgfx.cpp @ 2384]
    (...snip...)
    
    Thread 2 (Crashed):
    d3d11!CContext::ID3D11DeviceContext1_Begin_<1>+0x8
    bgfx::d3d11::TimerQueryD3D11::begin+0xdf [bgfx\src\renderer_d3d11.cpp @ 4575]
    bgfx::d3d11::RendererContextD3D11::submit+0x93 [bgfx\src\renderer_d3d11.cpp @ 4702]
    bgfx::Context::renderFrame+0xb6 [bgfx\src\bgfx.cpp @ 1502]
    bgfx::renderFrame+0x32 [bgfx\src\bgfx.cpp @ 992]
    bgfx::Context::renderThread+0x5 [bgfx\src\bgfx_p.h @ 2102]
    bx::Thread::threadFunc+0x25 [bx\include\bx\thread.h @ 201]
    kernel32!BaseThreadInitThunk+0xe
    ntdll!__RtlUserThreadStart+0x70
    ntdll!_RtlUserThreadStart+0x1b
    
    opened by rogual 32
  • OSX // Metal // autorelease issue

    OSX // Metal // autorelease issue

    Hi,

    I think I discovered some issue with the autorelease pool in the OSX Metal backend. If I call bgfx::RenderFrame() before calling bgfx::Init() (both on the same thread) to init single threaded mode, bgfx crashes inside renderer_metal.mm in the flip() function on line 1135 where the autorelease pool is released.

    bildschirmfoto 2019-01-06 um 13 40 47

    The console tells this: "Invalid or prematurely-freed autorelease pool".

    If bgfx runs in multi threaded mode everything seems fine.

    opened by thegabman 24
  • Add hooks for intrusive profiling to the render thread?

    Add hooks for intrusive profiling to the render thread?

    Just integrating https://github.com/Celtoys/Remotery into my code, and I noticed I would have to add the macros into the bgfx code myself if I was running multi-threaded.

    I was wondering if you could provide a simple profiling hook into the render function if it's running multi-threaded?

    opened by JodiTheTigger 23
  • Adds example 49-hextile

    Adds example 49-hextile

    Provides a simple example to demonstrate real-time hex tiling, mainly a simple port of what is done here https://github.com/mmikk/hextile-demo

    https://github.com/bkaradzic/bgfx/issues/2842

    This has been tested on windows (dx11/opengl)

    opened by preetishkakkar 21
  • Having trouble with

    Having trouble with "Hello World" example

    Hi, most of the other samples work, but the hello world sample doesn't display anything other than a grey background. The metaballs example is also missing the debug text that's in the screenshot. I built the project from the command line using GNU Make, and that appeared to work without any errors. I then compiled using Visual Studio 2013. Initially it failed to compile complaining about Direct3D9 stuff, but I downloaded the 2010 DirectX SDK and set the environment variable for that, and after that it compiled.

    Here's the debug output. I don't see any obvious errors occurring...

    'example-00-helloworldDebug.exe' (Win32): Loaded 'D:\Dropbox\Work\Game Dev\Libs\bgfx\.build\win64_vs2013\bin\example-00-helloworldDebug.exe'. Symbols loaded.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\XInput9_1_0.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\oleacc.dll'. Cannot find or open the PDB file.
    ..\..\..\src\bgfx.cpp(1977): BGFX Init...
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\XInput1_4.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
    ..\..\..\src\bgfx.cpp(959): BGFX Creating rendering thread.
    d:\dropbox\work\game dev\libs\bgfx\src\bgfx_p.h(1913): BGFX render thread start
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\d3d9.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file.
    ..\..\..\src\renderer_d3d11.cpp(521): BGFX Adapter #0
    ..\..\..\src\renderer_d3d11.cpp(525): BGFX  Description: NVIDIA GeForce GTX 670
    ..\..\..\src\renderer_d3d11.cpp(531): BGFX  VendorId: 0x000010de, DeviceId: 0x00001189, SubSysId: 0x35421458, Revision: 0x000000a1
    ..\..\..\src\renderer_d3d11.cpp(536): BGFX  Memory: 2082140160 (video), 0 (system), 2147807232 (shared)
    ..\..\..\src\renderer_d3d11.cpp(521): BGFX Adapter #1
    ..\..\..\src\renderer_d3d11.cpp(525): BGFX  Description: Microsoft Basic Render Driver
    ..\..\..\src\renderer_d3d11.cpp(531): BGFX  VendorId: 0x00001414, DeviceId: 0x0000008c, SubSysId: 0x00000000, Revision: 0x00000000
    ..\..\..\src\renderer_d3d11.cpp(536): BGFX  Memory: 0 (video), 0 (system), 268435456 (shared)
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\dxgidebug.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\nvwgf2umx.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file.
    The thread 0x680c has exited with code 0 (0x0).
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\nvspcap64.dll'. Cannot find or open the PDB file.
    'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\System32\d3d11_2sdklayers.dll'. Cannot find or open the PDB file.
    ..\..\..\src\renderer_d3d11.cpp(601): BGFX D3D device 11.3, hr 0
    ..\..\..\src\bgfx.cpp(262): BGFX Graphics debugger is present.
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE1FFB0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Destroy ID3D11Buffer: Name="unnamed", Addr=0x000000510BE1FFB0 [ STATE_CREATION INFO #2097230: DESTROY_BUFFER]
    D3D11 INFO: Create ID3D11RenderTargetView: Name="unnamed", Addr=0x000000510BE20030, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097243: CREATE_RENDERTARGETVIEW]
    D3D11 INFO: Create ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE1E6E0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D]
    D3D11 INFO: Create ID3D11DepthStencilView: Name="unnamed", Addr=0x000000510BE1E250, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097246: CREATE_DEPTHSTENCILVIEW]
    ..\..\..\src\bgfx.cpp(895): BGFX Supported capabilities (Direct3D 11):
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_TEXTURE_COMPARE_ALL
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_TEXTURE_3D
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_VERTEX_ATTRIB_HALF
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_INSTANCING
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_RENDERER_MULTITHREADED
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_FRAGMENT_DEPTH
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_BLEND_INDEPENDENT
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_COMPUTE
    ..\..\..\src\bgfx.cpp(900): BGFX    BGFX_CAPS_SWAP_CHAIN
    ..\..\..\src\bgfx.cpp(904): BGFX Supported texture formats:
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC1
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC2
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC3
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC4
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC5
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC6H
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BC7
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] ETC1
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] ETC2
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] ETC2A
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] ETC2A1
    ..\..\..\src\bgfx.cpp(914): BGFX    [ ] PTC12
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] PTC14
    ..\..\..\src\bgfx.cpp(914): BGFX    [ ] PTC12A
    ..\..\..\src\bgfx.cpp(914): BGFX    [*] PTC14A
    ..\..\..\src\bgfx.cpp(914): BGFX    [ ] PTC22
    ..\..\..\src\bgfx.cpp(914): BGFX    [ ] PTC24
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R1
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R8
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R16
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R16F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R32
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R32F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RG8
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RG16
    D3D11 INFO: Create ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE45C10, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D]
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RG16F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RG32
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RG32F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] BGRA8
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGBA16
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGBA16F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGBA32
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGBA32F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R5G6B5
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGBA4
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGB5A1
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] RGB10A2
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] R11G11B10F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D16
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D24
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D24S8
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D32
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D16F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D24F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D32F
    ..\..\..\src\bgfx.cpp(914): BGFX    [x] D0S8
    ..\..\..\src\bgfx.cpp(919): BGFX Max FB attachments: 8
    d:\dropbox\work\game dev\libs\bgfx\src\bgfx_p.h(2930): BGFX Creating uniform (handle   0) bgfx_clear_color
    D3D11 INFO: Create ID3D11Sampler: Name="unnamed", Addr=0x000000510BE07220, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097267: CREATE_SAMPLER]
    ..\..\..\src\renderer_d3d11.cpp(2615): BGFX Texture   0: R8 (requested: R8), 2048x24.
    D3D11 INFO: Create ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE0B710, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D]
    D3D11 INFO: Create ID3D11ShaderResourceView: Name="unnamed", Addr=0x000000510BE0ED20, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097240: CREATE_SHADERRESOURCEVIEW]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Vertex Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     predefined: u_modelViewProj (mat4), num  0, r.index 2528, r.count  4
    D3D11 INFO: Create ID3D11VertexShader: Name="unnamed", Addr=0x000000510BE6F560, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE729F0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 0
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BE35B60, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    vertexdecl acb2facc (92a03374), stride 28
        attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
        attr 4 - Attrib::Color0, num 4, type 0, norm 1, asint 0, offset 12
        attr 5 - Attrib::Color1, num 4, type 0, norm 1, asint 0, offset 16
        attr 8 - Attrib::TexCoord0, num 2, type 3, norm 0, asint 0, offset 20
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE44760, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE39B10, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Vertex Shader consts 0
    D3D11 INFO: Create ID3D11VertexShader: Name="unnamed", Addr=0x000000510BE410D0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097249: CREATE_VERTEXSHADER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BEDFA90, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510E5C2480, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BE4AB60, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE4AF30, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BE4BF10, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE48F50, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BEA5B10, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BEA08C0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BEA1A00, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BEDE000, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BE798C0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BE7A420, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BE7AC10, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BED88D0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\renderer_d3d11.cpp(2424): BGFX Fragment Shader consts 1
    ..\..\..\src\renderer_d3d11.cpp(2485): BGFX     user: bgfx_clear_color (vec2), num  8, r.index   0, r.count  8
    D3D11 INFO: Create ID3D11PixelShader: Name="unnamed", Addr=0x000000510BED1B90, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097261: CREATE_PIXELSHADER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BED2790, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    vertexdecl 623c7ad8 (54fc4dc5), stride 12
        attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BEBD370, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510E6B4F70, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BED7640, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    ..\..\..\src\bgfx.cpp(2013): BGFX Init complete.
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BED8280, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Create ID3D11Buffer: Name="unnamed", Addr=0x000000510BEA4EB0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097228: CREATE_BUFFER]
    D3D11 INFO: Destroy ID3D11RenderTargetView: Name="unnamed", Addr=0x000000510BE20030 [ STATE_CREATION INFO #2097245: DESTROY_RENDERTARGETVIEW]
    D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE170E0 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
    D3D11 INFO: Create ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE170E0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D]
    D3D11 INFO: Create ID3D11RenderTargetView: Name="unnamed", Addr=0x000000510BEB2710, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097243: CREATE_RENDERTARGETVIEW]
    D3D11 INFO: Create ID3D11Texture2D: Name="unnamed", Addr=0x000000510BEB0FA0, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097234: CREATE_TEXTURE2D]
    D3D11 INFO: Create ID3D11DepthStencilView: Name="unnamed", Addr=0x000000510BEB1550, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097246: CREATE_DEPTHSTENCILVIEW]
    D3D11 INFO: Create ID3D11BlendState: Name="unnamed", Addr=0x000000510BEC2760, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097270: CREATE_BLENDSTATE]
    D3D11 INFO: Create ID3D11DepthStencilState: Name="unnamed", Addr=0x000000510BEB2930, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097273: CREATE_DEPTHSTENCILSTATE]
    D3D11 INFO: Create ID3D11RasterizerState: Name="unnamed", Addr=0x000000510BEB2D80, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097276: CREATE_RASTERIZERSTATE]
    D3D11 INFO: Create ID3D11DepthStencilState: Name="unnamed", Addr=0x000000510BEB6160, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097273: CREATE_DEPTHSTENCILSTATE]
    D3D11 INFO: Create ID3D11InputLayout: Name="unnamed", Addr=0x000000510BE4E330, ExtRef=1, IntRef=0 [ STATE_CREATION INFO #2097264: CREATE_INPUTLAYOUT]
    D3D11 INFO: Destroy ID3D11DepthStencilView: Name="unnamed", Addr=0x000000510BE1E250 [ STATE_CREATION INFO #2097248: DESTROY_DEPTHSTENCILVIEW]
    D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000510BE1E6E0 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
    
    opened by axefrog 21
  • Fix layout transition when cur and prev blit ops share the same images

    Fix layout transition when cur and prev blit ops share the same images

    This addresses a subtle bug when the sequence of blit operations contains 2 consecutive copies like so: A -> B, C -> A (src of a blit becomes dst of next blit) A -> B, B -> C (dst of a blit becomes src of next blit) A -> B, B -> A (dst and src of blit are swapped in the next one)

    The last case is necessary to implement blitting part of an image (A) into itself (using B as intermediate). The code as currently written triggers a validation error because B is transitioned back to its original layout (instead of staying src layout) in the second blit.

    opened by goodartistscopy 19
  • Issues in Metal renderer with gl_vertexID based draw calls

    Issues in Metal renderer with gl_vertexID based draw calls

    Describe the bug

    Metal renderer suffers from issues when using gl_VertexID based draw calls with no index or vertex buffers. Part of the issue appears to be caused by draw.m_streamMask which contains the value 0xFF in such calls and logic to loop the stream that exceeds BGFX_CONFIG_MAX_VERTEX_STREAMS. This appears to cause writing to currentState.m_stream[idx] that is outside the range and corrupts memory. However, there appears to be more going wrong here as I'm getting erratic validation errors caused by trying to bind nil vertex buffers to metal with vertex offsets greater than zero. In short, it doesn't seem to play nice with gl_VertexID only draw calls.

    To Reproduce

    Steps to reproduce the behavior:

    1. Create a simple app that only renders a fullscreen triangle using only gl_VertexID and no vertex or index buffers. Launch a few times with validation enabled.
    // Procedural fullscreen coverage using gl_VertexID
    bgfx::setState( BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A );
    bgfx::setVertexCount( 3 );
    bgfx::submit( 0, m_fullscreenProgram );
    
    void main()
    {
    	// UV from vertexID
    	int vid = int( gl_VertexID );
    	float u = ( vid == 0 || vid == 3 ) ? -1.0 : 1.0;
    	float v = ( vid < 2 ) ? 1.0 : -1.0;
    	vec2 uv = vec2( u, v );
    
    	// Position from UV
    	gl_Position = vec4( uv * 2.0 - 1.0, 0.0, 1.0 );
    }
    
    bug 
    opened by EvilTrev 1
  • Allow shaderc custom void main() method

    Allow shaderc custom void main() method

    Relates to https://github.com/bkaradzic/bgfx/issues/3001

    Maybe not the best way to fix this problem, I can still see benefits for allowing users to override the main definition for HLSL/SPIRV shaders. Feel free to suggest a better way to achieve it. This however works for me.

    Also added GLSL 460/4.6 support

    opened by SamHellawell 0
  • Feature Request: Allow shaderc to specify output type

    Feature Request: Allow shaderc to specify output type

    Currenly the output type is just hardcoded to vec4, I have a use case where I want to write to uint textures. In GLSL its possible to do like:

    #if BGFX_SHADER_LANGUAGE_GLSL >= 400
    out uvec2 visibility;
    #endif
    

    But theres no way to do this for SPIRV/HLSL this way. It also does not allow overriding of void main() for HLSL shaders, which could also be a solution to this issue. Example:

    #if BGFX_SHADER_LANGUAGE_SPIRV > 0
    void main(float4 gl_FragCoord : SV_POSITION , nointerpolation int2 v_bufferIDs : TEXCOORD6 , out uvec2 bgfx_FragData0 : SV_TARGET0 , uint gl_PrimitiveID : SV_PrimitiveID ) {
      uint instanceID = uint(v_bufferIDs.x);
      uint triangleID = uint(gl_PrimitiveID);
      bgfx_FragData0 = uvec2(triangleID, (instanceID + 1));
    }
    #else
    // glsl code
    #endif
    
    opened by SamHellawell 3
  • Feature Request: Allow shader code to override version

    Feature Request: Allow shader code to override version

    I have my pipeline setup well so that I only need to invoke shaderc from a single source (like the example shader Makefiles). Works great, but for only a few shaders I require a higher shader version. Setting the standard GLSL #version 430 or whatever doesnt work and produces errors when trying to compile.

    I don't see that shaderc checks for existing version definitions, could it? I'm not sure how to best address defining the versions across different compilation targets. Perhaps it'd require something like:

    #version_glsl 430
    #version_hlsl xyz
    ...etc
    

    (but i find this ugly)

    Thoughts/concerns? I am happy to try contribute this feature if a decision can be made on above

    opened by SamHellawell 2
  • Compiling shader with greater GLSL version causes texture samplers to not bind properly

    Compiling shader with greater GLSL version causes texture samplers to not bind properly

    Found this issue last weekend, let me try to explain the problem. I have a very simple shader, like this:

    $input v_texcoord0
    
    #include "../common.sh"
    
    SAMPLER2D(s_visibiltyOne, 0);  // Visibility Buffer
    SAMPLER2D(materialSampler0, 1); // Diffuse
    
    // Note: had to include this here to prevent "fragData not supported in this glsl version" errors
    #if BGFX_SHADER_LANGUAGE_GLSL >= 400
    out vec4 bgfx_FragData[5];
    #define gl_FragData bgfx_FragData
    #endif
    
    void main() {
      vec4 samplerTest = texture2D(s_visibiltyOne, gl_FragCoord.xy);
      vec4 diffuse = texture2D(materialSampler0, gl_FragCoord.xy);
    
      gl_FragData[0] = diffuse;
      gl_FragData[1] = samplerTest;
      gl_FragData[2] = diffuse;
      gl_FragData[3] = samplerTest;
      gl_FragData[4] = diffuse;
    }
    

    and I invoke it like so:

      bgfx::setViewTransform(baseRenderPass, view, proj);
      bgfx::setState(BGFX_STATE_WRITE_RGB | BGFX_STATE_BLEND_NORMAL);
    
      bgfx::setVertexBuffer(0, m_screenQuadVB);
      bgfx::setIndexBuffer(m_screenQuadIB);
    
      bgfx::setTexture(0, s_visibiltyOne, *this->defaultMaterialTexture->getTextureHandle());
      bgfx::setTexture(1, materialSamplerHandles[0], *this->defaultNormalTexture->getTextureHandle());
    
      bgfx::submit(baseRenderPass, *material->getShader()->getProgramHandle());
    

    This works fine when compiled with GLSL 150/300es etc (two textures get bound to the proper sampler), but if i try a higher version such as >= 400 only one texture (the 1st) is getting bound. I checked the generated shader code, and it looks almost identical. Samplers are defined as you would expect. I require to use a higher GLSL version for this shader (it does more than in the snippet, but this is trimmed down for debugging) - yet I cannot bind more than 1 sampler. Also I noticed that setUniform wasnt working either, it was being passed as all 0's for a camera matrix. I can bind buffers however.

    Working case in renderdoc: image

    And the error case, when compiling with GLSL version 430 through shaderc: image

    we can also see that the texture API calls are being called: image

    I found that this issue is resolved if I manually set the binding uniform, instead of using SAMPLER2D. EG:

    #if BGFX_SHADER_LANGUAGE_GLSL >= 400 // NOTE: 400 is for testing, not sure exactly which version this begins to fail at
    layout(binding = 0) uniform sampler2D s_visibiltyOne;
    layout(binding = 1) uniform sampler2D materialSampler0;
    #else
    SAMPLER2D(s_visibiltyOne, 0);  // Visibility Buffer
    SAMPLER2D(materialSampler0, 1); // Diffuse
    #endif
    

    I am assuming this is either a shader macro fix or something in shaderc, but I'm not sure the best route to take there. Of course its not ideal to have #ifdef hacks in local shader code :)

    opened by SamHellawell 1
  • VK_ERROR_FRAGMENTED_POOL on Android oppo find X5 with Vulkan backend

    VK_ERROR_FRAGMENTED_POOL on Android oppo find X5 with Vulkan backend

    Describe the bug Running sample cube on Android, Oppo Find X5 Pro, VK_ERROR_FRAGMENTED_POOL happened after several seconds.

    To Reproduce Steps to reproduce the behavior:

    1. using https://github.com/Nodrev/bgfx-android-activity for android running
    2. modify samples to use Vulkan backend;
    3. choose the cube sample
    4. Wait several seconds, crash happened, VK_ERROR_FRAGMENTED_POOL printed

    Expected behavior I want to run sample on Android

    Screenshots If applicable, add screenshots to help explain your problem.

    Additional context The vulkan backend create and free descriptorsets every frame, which cause the pool fragmented, and error on Mali driver. Can you consider cache the descriptorSets?

    opened by cryforyou 0
Owner
Бранимир Караџић
кодер (gamedev, open source, ex-demoscene) ★
Бранимир Караџић
A modern cross-platform low-level graphics library and rendering framework

Diligent Engine A Modern Cross-Platform Low-Level 3D Graphics Library Diligent Engine is a lightweight cross-platform graphics API abstraction library

Diligent Graphics 2.6k Dec 30, 2022
An immediate-mode, renderer agnostic, lightweight debug drawing API for C++

Debug Draw An immediate-mode, renderer agnostic, lightweight debug drawing API for C++. License This software is in the public domain. Where that dedi

Guilherme Lampert 457 Dec 24, 2022
A small cross-platform graphics library made in C

minigfx Small graphics library made in C Intended to be: Simple to understand Intuitive Fun to use Features Cross platform: Windows and Linux. To see

Laurentino Luna 27 Jul 18, 2021
Android studio native project template using cross platform raylib graphics library.

rayturbo Android studio native project template using cross platform raylib graphics library. https://www.raylib.com/ This project use Android Studio

Ciapas Linux 10 Mar 5, 2022
NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs

NVRHI Introduction NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs (GA

NVIDIA GameWorks 445 Jan 3, 2023
ORE (OpenGL Rendering Engine) is a rendering engine developed for my college minor project assessment.

ORE (OPENGL RENDERING ENGINE) What is ORE? ORE(OpenGL Rendering Engine) is a rendering engine with great and easy to use UI that allows the user to lo

HARSHIT BARGUJAR 3 Sep 23, 2022
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.5k Jan 8, 2023
A terminal-based graphics library for both 2D and 3D graphics.

TermGL A terminal-based graphics library for both 2D and 3D graphics. Written in C, created for terminals supporting ANSI escape codes. Table of Conte

null 215 Dec 28, 2022
Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics.

Vire Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics. Downloads If you'd just like to just download and try,

null 33 Dec 22, 2022
kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics

kaun kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics. It is a Lua module you can require from a shared library

Joel Schumacher 4 Apr 5, 2021
This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

DirectX-Graphics-Samples This repo contains the DirectX 12 Graphics samples that demonstrate how to build graphics intensive applications for Windows

Microsoft 4.9k Dec 26, 2022
Pathway is an Android library that provides new functionalities around the graphics Path API.

Pathway is an Android library that provides new functionalities around the graphics Path API.

Romain Guy 148 Jan 5, 2023
Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.

RetroArch RetroArch is the reference frontend for the libretro API. Popular examples of implementations for this API includes video game system emulat

null 7.4k Dec 30, 2022
rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime

rlottie rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime. Lottie loads and renders a

Samsung 779 Dec 30, 2022
Dear PyGui 3D Engine (early development) and Graphics API demos.

Marvel This repo is the working location of the eventual Dear PyGui 3D Engine. It also contains several single file examples of creating a triangle wi

Jonathan Hoffstadt 85 Jan 5, 2023
A 3D Printable Retro-style Raspberry Pi HQ Camera

3D Printable Retro-style Raspberry Pi HQ Camera

Ping-Hsun 416 Jan 4, 2023
A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

Taoufik Rida Bouftass 7 May 3, 2022
A low-level, cross-platform GPU library

vgpu is cross-platform low-level GPU library. Features Support for Windows, Linux, macOS. Modern rendering using Vulkan and Direct3D12. Dependencies U

Amer Koleci 9 Jul 28, 2022