bkaradzic / bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
https://bkaradzic.github.io/bgfx/overview.html
BSD 2-Clause "Simplified" License
15.15k stars 1.95k forks source link

Having trouble with "Hello World" example #271

Closed axefrog closed 9 years ago

axefrog commented 9 years ago

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]
bkaradzic commented 9 years ago

Yeah this is wierd I don't see anything wrong here, esp. because other examples work. Do you see debug text in any example? Press F1 to turn on/off stats.

axefrog commented 9 years ago

Hmm, F1 doesn't appear to do anything. I do see debug text in cubes, raymarch and others, but not helloworld or metaballs. Also, I was just messing about resizing the helloworld window up and down and then all of a sudden it threw an error: http://screencast.com/t/XXevxHwegFGW

The last few lines in the debug window were:

D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207D88A00 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
D3D11: Removing Device.
D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207D70F50 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
D3D11 INFO: Destroy ID3D11RenderTargetView: Name="unnamed", Addr=0x000000D207DC5980 [ STATE_CREATION INFO #2097245: DESTROY_RENDERTARGETVIEW]
D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207C66780 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414B4F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414CC60.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414D050.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414E440.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414E730.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414EB00.
..\..\..\src\renderer_d3d11.cpp(1292): BGFX CHECK m_swapChain->ResizeBuffers(2 , getBufferWidth() , getBufferHeight() , getBufferFormat() , DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH ) FAILED 0x887a0005

example-00-helloworldDebug.exe has triggered a breakpoint.
axefrog commented 9 years ago

I'm having trouble reproducing the second error, it might not be important. Still confused why the first example doesn't display anything though.

bkaradzic commented 9 years ago

What's the version of your driver?

bkaradzic commented 9 years ago

Also you said everything works when you build with MinGW? But not with VS2013?

axefrog commented 9 years ago

No, I build with VS2013. I used Make to build the project files, then I opened the VS2013 solution file and went from there.

My driver is the GeForce Game Ready Driver 347.52, on a GTX 670 with 2GB RAM.

axefrog commented 9 years ago

Oh wait, I'm on 347.09. I'll do an update and report back.

bkaradzic commented 9 years ago

349.49 works for me. Ah ok about makefile, that's just to generate project files. I was thinking you were building MinGW build...

axefrog commented 9 years ago

In the mean time (the download is going slow) is there anything else I can check in debug mode to find out why the debug text or logo image aren't displaying?

axefrog commented 9 years ago

Ok, probably an important detail I omitted- I built for x64. I went back, changed it to x86 and the samples work correctly. I want to use x64 though... why do you think the helloworld and metaballs samples would fail to display text when compiled for x64?

Also, the updated driver did not make any difference.

bkaradzic commented 9 years ago

You could grab RenderDoc v0.22 https://renderdoc.org/builds capture frame and see what's going on.

bkaradzic commented 9 years ago

x86 vs x64 by default difference is that x86 defaults to D3D9 and x64 to D3D11. So something is wrong with D3D11. You could force D3D9 everywhere until this gets resolved by setting BGFX_CONFIG_RENDERER_DIRECT3D9=1 in preprocessor settings in bgfx's projects settings.

axefrog commented 9 years ago

Ah, so I found a bug then...?

bkaradzic commented 9 years ago

If it doesn't get fixed by updating drivers then might be interesting debugging, since no one ever reported it, so it might be very rare combination of circumstances. Still don't have idea how I would repro it here and hoping that driver update will fix it. :)

axefrog commented 9 years ago

I'm happy to help in any way I can. Can share screen, skype, whatever you like. The driver update didn't fix it...

bkaradzic commented 9 years ago

Try this. Change D3D11_MAP_WRITE_DISCARD to D3D11_MAP_WRITE_NO_OVERWRITE here: https://github.com/bkaradzic/bgfx/blob/master/src/renderer_d3d11.cpp#L2374

axefrog commented 9 years ago

Yep, that fixed it! I tried both the metaballs and helloworld demo and both displayed correctly.

axefrog commented 9 years ago

Just ran another test in release mode this time and it worked fine there too. Thanks for looking into it.

bkaradzic commented 9 years ago

Ok, I'll reopen this issue because it's not really fixed, I just found what's the issue.

bkaradzic commented 9 years ago

Can you try this new fix?

axefrog commented 9 years ago

Yep, that works.