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

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.
Owner
Бранимир Караџић
кодер (gamedev, open source, ex-demoscene) ★
Бранимир Караџић
Comments
  • 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

  • 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!

  • "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.

  • 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.

  • 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
    
  • 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.

  • 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?

  • 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]
    
  • 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.

  • Issues with GLFW and transparent windows

    Issues with GLFW and transparent windows

    Hi there, I'm testing GLFW's new transparent windows feature with bgfx and there's something weird going on with the alpha:

    Notice that nothing is 100% opaque for some reason. I'm testing this on Arch Linux using glfw's current master and this patch.

    Any ideas?

  • GL error 0x506 with C99/SDL2 on OS X

    GL error 0x506 with C99/SDL2 on OS X

    A simple conversion and stripping down of example 01 to use C99 and SDL2 (and removing the actual rendering parts, as they have not yet been properly converted) fails to run, and causes glClear() to throw a 0x506 error in the rendering thread.

    2015-03-19 00:36:00.624 Test[13709:421801] ../../../src/bgfx.cpp(2025): BGFX Init complete.
    2015-03-19 00:36:00.625 Test[13709:421887] vertexdecl ccbfe30d (b9cddbd5), stride 16
    2015-03-19 00:36:00.625 Test[13709:421887]  attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
    2015-03-19 00:36:00.625 Test[13709:421887]  attr 4 - Attrib::Color0, num 4, type 0, norm 1, asint 0, offset 12
    2015-03-19 00:36:00.625 Test[13709:421887] ../../../src/renderer_gl.cpp(2678): BGFX WARN Unknown enum? 506
    2015-03-19 00:36:00.626 Test[13709:421887] ../../../src/renderer_gl.cpp(2410): BGFX CHECK glClear(flags); GL error 0x506: <GLenum?>
    2015-03-19 00:36:00.626 Test[13709:421887] ../../../src/renderer_gl.cpp(2678): BGFX WARN Unknown enum? 506
    

    Test code here: http://wakaba.c3.cx/stuff/Test.zip

    Contains a very primitive Makefile, just run "make" then "./Test".

  • Render large scene crashed with Vulkan

    Render large scene crashed with Vulkan

    Describe the bug Hi, I have use bgfx to render lots of scenes and all of them are runing perfect. Today I got nvidia's bistro scene, which contains hundreds of textures and thousands of mesh, in opengl and directx, the render is OK, but in vulkan, the renderer crashed after loading all the textures.

    The error code is maxMemoryAllocationCount when loading, and after loading got this error and crashed: C:\Test\3rdparty\bgfx\src\renderer_vk.cpp (3732): BGFX ASSERT vkAllocateDescriptorSets(m_device, &dsai, &descriptorSet); VK error 0xc4642878: VK_ERROR_OUT_OF_POOL_MEMORY C:\Test\3rdparty\bgfx\src\renderer_vk.cpp (3732): BGFX FATAL 0x00000000: vkAllocateDescriptorSets(m_device, &dsai, &descriptorSet); VK error 0xc4642878: VK_ERROR_OUT_OF_POOL_MEMORY

    I've tested if I skip the first 40 textures when loading the scene(Total number of texture is 271), then the rendering is OK, but adding one more texture, will crash.

    I also tested if I replace all the texture with a 16X16 texture, and the renderer also crashes. The vram usage is 2.1GB/10GB, which is enough.

  • getShaderUniforms always return 0 on OpenGL render backend with compute shader

    getShaderUniforms always return 0 on OpenGL render backend with compute shader

    Describe the bug When using bgfx function getShaderUniforms with compute shader. In DirectX backend this function return correct uniform number, but in opengl backend always return 0.

  • xx-hextile - Practical Real-Time Hex-Tiling

    xx-hextile - Practical Real-Time Hex-Tiling

    Port "hextile-demo" to bgfx as an example: https://github.com/mmikk/hextile-demo

    Practical Real-Time Hex-Tiling https://raw.githubusercontent.com/mmikk/mmikk.github.io/master/papers3d/mm_hex_compressed.pdf

    https://user-images.githubusercontent.com/20206840/174149327-fd6bbf22-9299-49f9-8f96-c043d90fdde4.mp4

  • Windows OpenGL - Example01 Crash

    Windows OpenGL - Example01 Crash

    When initializing bgfx on Windows with OpenGL (AWS Elastic Graphics) (example-01 /w OpenGL argument):

    The following output is captured: https://pastebin.com/raw/9ZiQXNrH

    [5556] external/bgfx/src/bgfx.cpp (419): BGFX Graphics debugger is not present.
    [5556] C:\users\administrator\_bazel_administrator\qskvp5ws\execroot\ladon_effects\external\bgfx\src\renderer_gl.h (1602): BGFX ASSERT glGetQueryObjectiv(query.m_end , 0x8867 , &available ); GL error 0x502: GL_INVALID_OPERATION
    [5556] C:\users\administrator\_bazel_administrator\qskvp5ws\execroot\ladon_effects\external\bgfx\src\renderer_gl.h (1602): BGFX FATAL 0x00000000: glGetQueryObjectiv(query.m_end , 0x8867 , &available ); GL error 0x502: GL_INVALID_OPERATION
    

    When GL_CHECK is removed: https://github.com/bkaradzic/bgfx/blob/master/src/renderer_gl.h#L1599

    [5400] external/bgfx/src/bgfx.cpp (419): BGFX Graphics debugger is not present.
    [5400] external/bgfx/src/renderer_gl.cpp (7201): BGFX ASSERT glPushDebugGroup(0x824A, 0, -1, "" "rendererSubmit"); GL error 0x502: GL_INVALID_OPERATION
    [5400] external/bgfx/src/renderer_gl.cpp (7201): BGFX FATAL 0x00000000: glPushDebugGroup(0x824A, 0, -1, "" "rendererSubmit"); GL error 0x502: GL_INVALID_OPERATION
    

    Example-01 Stacktrace

    >	example-01-cubesDebug.exe!bx::debugBreak() Line 37	C++
     	example-01-cubesDebug.exe!bgfx::CallbackStub::fatal(const char * _filePath, unsigned short _line, bgfx::Fatal::Enum _code, const char * _str) Line 82	C++
     	example-01-cubesDebug.exe!bgfx::fatal(const char * _filePath, unsigned short _line, bgfx::Fatal::Enum _code, const char * _format, ...) Line 450	C++
     	example-01-cubesDebug.exe!bgfx::gl::TimerQueryGL::update() Line 1599	C++
     	example-01-cubesDebug.exe!bgfx::gl::TimerQueryGL::end(unsigned int _idx) Line 1582	C++
     	example-01-cubesDebug.exe!bgfx::gl::RendererContextGL::submit(bgfx::Frame * _render, bgfx::ClearQuad & _clearQuad, bgfx::TextVideoMemBlitter & _textVideoMemBlitter) Line 8419	C++
     	example-01-cubesDebug.exe!bgfx::Context::renderFrame(int _msecs) Line 2446	C++
     	example-01-cubesDebug.exe!bgfx::renderFrame(int _msecs) Line 1480	C++
     	example-01-cubesDebug.exe!entry::Context::run(int _argc, const char * const * _argv) Line 532	C++
     	example-01-cubesDebug.exe!main(int _argc, const char * const * _argv) Line 1187	C++
     	[External Code]	
     	kernel32.dll![Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	Unknown
    

    Possible related issue: https://github.com/bkaradzic/bgfx/issues/1723

  • render by points error on M1 Mac Metal

    render by points error on M1 Mac Metal

    Describe the bug example-01-cubes cannot render primitives by points (BGFX_STATE_PT_POINTS) on M1 mac, metal

    To Reproduce

    1. Run example-01-cubes on M1 mac, metal
    2. switch Primitive Topology Combo to Points

    Screenshots Screen Shot 2022-06-19 at 17 18 09

  • <macOS> 08-update crash in copyFromTexture

    08-update crash in copyFromTexture

    https://github.com/bkaradzic/bgfx/commit/17bb4dce49289ee16c783c2bc437c3a2aa2d8040 this commit will cause a crash on macOS

    void copyFromTexture(
    			  id<MTLTexture> _sourceTexture
    			, NSUInteger _sourceSlice
    			, NSUInteger _sourceLevel
    			, MTLOrigin _sourceOrigin
    			, MTLSize _sourceSize
    			, id<MTLTexture> _destinationTexture
    			, NSUInteger _destinationSlice
    			, NSUInteger _destinationLevel
    			, MTLOrigin _destinationOrigin
    			)
    		{
    			[m_obj copyFromTexture:_sourceTexture sourceSlice:_sourceSlice sourceLevel:_sourceLevel sourceOrigin:_sourceOrigin sourceSize:_sourceSize
    						 toTexture:_destinationTexture destinationSlice:_destinationSlice destinationLevel:_destinationLevel destinationOrigin:_destinationOrigin];
    		}
    

    -[MTLDebugBlitCommandEncoder internalValidateCopyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:486: failed assertion `(destinationOrigin.x + destinationSize.width)(4) must be <= width(2).'

    add back this code will be fine

    for (uint8_t lod = 0, num = imageContainer->m_numMips; lod < num; ++lod)
    {
                        if (width < 4 || height < 4)
                        {
                            break;
                        }
    ...
    }
    
A modern cross-platform low-level graphics library and rendering framework
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

Aug 12, 2022
An immediate-mode, renderer agnostic, lightweight debug drawing API for C++
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

Aug 4, 2022
ORE (OpenGL Rendering Engine) is a rendering engine developed for my college minor project assessment.
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

Dec 20, 2021
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

Aug 3, 2022
A small cross-platform graphics library made in C
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

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

Mar 5, 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,

Jul 27, 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) 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

Aug 13, 2022
A terminal-based graphics library for both 2D and 3D graphics.
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

Aug 10, 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

Apr 5, 2021
This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
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

Aug 10, 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.

Aug 2, 2022
Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
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

Aug 14, 2022
rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime
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

Aug 7, 2022
Dear PyGui 3D Engine (early development) and Graphics API demos.
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

Aug 5, 2022
A 3D Printable Retro-style Raspberry Pi HQ Camera
A 3D Printable Retro-style Raspberry Pi HQ Camera

3D Printable Retro-style Raspberry Pi HQ Camera

Aug 7, 2022
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.

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

May 3, 2022
Single header C library for rendering truetype text to the screen
Single header C library for rendering truetype text to the screen

kc_truetypeassembler.h Single header C library for assembling textured quads for text rendering using a graphics API. It generates a vertices and text

Jul 27, 2022
SoL (for Speed of Light, or sun in Spanish) is a Physically-based rendering library written in modern C++

SoL (for Speed of Light, or sun in Spanish) is a small rendering library written in C++20. Its goal is to strike a good balance between performance and usability, and allow easy experimentation for rendering researchers.

May 19, 2022