GithubHelp home page GithubHelp logo

bkaradzic / bgfx Goto Github PK

View Code? Open in Web Editor NEW
14.3K 481.0 1.9K 282.92 MB

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

Home Page: https://bkaradzic.github.io/bgfx/overview.html

License: BSD 2-Clause "Simplified" License

C++ 47.62% Makefile 0.63% SuperCollider 0.13% Shell 0.96% C 26.59% Objective-C++ 3.40% Lua 6.12% Objective-C 0.61% Scala 0.11% C# 3.59% D 3.01% Beef 3.30% Zig 3.92%
engine rendering graphics directx vulkan metal opengl d3d11 d3d12 gles

bgfx's People

Contributors

attilaz avatar belegdol avatar biswa96 avatar bkaradzic avatar bwrsandman avatar cedricguillemet avatar cloudwu avatar dariomanesku avatar goodartistscopy avatar hugoam avatar ichordev avatar jeremieroy avatar juj avatar junjie020 avatar kingscallop avatar kondrak avatar mendsley avatar mikepopoloski avatar mmicko avatar nodrev avatar olliwang avatar pezcode avatar phniix avatar rinthel avatar selfshadow avatar snappertt avatar stuartcarnie avatar velkyel avatar velro avatar vvuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgfx's Issues

Mavericks (OSX 10.9) build fixes

Here are a couple of patches to get past initial Mavericks compatibility problems. This allows the build to get to the end of the initial make steps. There's still a bunch of compile time issues after that.

Unfortunately premake4.4b4 doesn't generate clean Xcode projects (it generates 32 bit targets when 64 is specified, and the include paths are not set up correctly). AFAIK those problems need to be resolved within premake itself. Given the current state of premake development, I wonder if it is worth simply creating some clean Xcode projects manually and storing them in the bgfx repo? (That's what I ended up doing with my own projects which were initially premake based).

Here's a correction for glext.h

ifndef GL_ARB_shader_objects

/* GL types for program/shader text and shader object handles */
typedef char GLcharARB;

if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)

typedef void* GLhandleARB;

else

typedef unsigned int GLhandleARB;

endif

endif

A fix to bx's unordered_map shim.

if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)

include <unordered_map>

else

include <tr1/unordered_map>

endif

bx's allocator.h

if BX_CONFIG_ALLOCATOR_CRT

if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)

else

include <malloc.h>

endif

Texture flags usage

Hi, I'm trying to setup correct texturing for font support in bgfx.
Basically the bgfx equivalent of this opengl code:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );

I come up with what's below, but it doesn't seems correct ...

uint32_t flags = BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP;

Also, if you have any kind of additional documentation about bgfx it is welcome :D
(e.g. design inspiration paper)
In particular, I have a hard time understanding the mapping of some flags :(

makefile refers to "premake" executable instead of "premake4"

I tried following your build instructions however your makefile calls a "premake" executable. All of the downloads for premake-4.x have an executable named "premake4", the executable name was renamed between premake 3 and premake 4.

It might sound petty since people can just rename the exe, but I have my premake installed as a deb package so renaming isn't really ideal.

Bgfx window creation problem with Nvidia 310.32 on Linux64.

Bgfx is not working with Nvidia 310.32 on Linux64.

There is a problem in window creation. The error is:

    X Error of failed request:  BadMatch (invalid parameter attributes)
      Major opcode of failed request:  153 (GLX)
      Minor opcode of failed request:  5 (X_GLXMakeCurrent)
      Serial number of failed request:  34
      Current serial number in output stream:  34

Here:
In entry_linux.cpp you are creating the Window with XCreateWindow(..., DefaultVisual(m_display, screen), ...). However, you are creating the glxcontext with a fbconfig that does not match that visual and the error is latter at glxMakeCurrent(s_display, s_window, m_context) and it says: BadMatch (which is because window and context do not match). Here is what you should check:

If you iterate through all configs that you got with specified attrsGlx[]:

    visualInfo = glxGetVisualFromFBConfig(s_display, configs[i]);
    print( visualInfo->visual );

None of them matches the:

    visual = DefaultVisual(m_display, screen);
    print( visual );

Which is used for window creation.

The GLX_ALPHA_SIZE, 8 in attrsGlx[] is the problem. (if you comment that out, there is a match and it passes, yet that's not the solution, you can only run helloworld example with that)

The solution:
You should call XCreateWindow(...) with:

    XVisualInfo *vi = glXGetVisualFromFBConfig(s_display, bestConfig);
    XCreateWindow(... vi->visual, ...).

And not with:

    XCreateWindow(... DefaultVisual(...), ...).

(but this implies that you should change the place of Window creation, take a look at the code. Or, I guess you could destroy the window in glxcontext and recreate it there with the visual from the best fbconfig)

Also you might need to specifiy the Colormap in XSetWindowAttributes which you can get like:

    winAttrs.colormap = XCreateColormap(s_display, 
           RootWindow(s_display, vi->screen, vi->visual, AllocNone);
    XCreateWindow(... CWBorderPixel | CWColormap | CWEventMask, &winAttrs);

Skybox edges visible

In the example-09-hdr the skybox edges are visible (check the second picture).

The problem is:
In renderer_gl.cpp if you comment out:

[1422]   // GL_CHECK(glTexParameteri(m_target, GL_TEXTURE_WRAP_S, s_textureAddress[(_flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT]) );
[1423]   // GL_CHECK(glTexParameteri(m_target, GL_TEXTURE_WRAP_T, s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT]) );

and just after add:

[1424]   GL_CHECK(glTexParameteri(m_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) );
[1425]   GL_CHECK(glTexParameteri(m_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) );

everything is fine (check the first picture)

bunny_fixed
bunny

Triangle fan or strip

It looks like I can do triangle, point and line. No triangle fan or triangle strip?

Alpha blending states tables look messed up.

I tried to activate alpha blending and didn't get to make it look right.
E.g. one usually want to set it up like this under opengl

//gl code:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
//dx code:
d3ddev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
d3ddev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

The bgfx implementation map a blend state to a predefined table:
used like this:

//gl renderer
GL_CHECK(glEnable(GL_BLEND) );
GL_CHECK(glBlendFunc(s_blendFactor[src][0], s_blendFactor[dst][1]) );
//dx renderer
DX_CHECK(device->SetRenderState(D3DRS_SRCBLEND, s_blendFactor[src][0]) );
DX_CHECK(device->SetRenderState(D3DRS_DESTBLEND, s_blendFactor[dst][1]) );  

But the tables used seems wrong (both in gl and directx)
E.G. in the directx9 table below (from renderer_d3d9.cpp )

static const D3DBLEND s_blendFactor[][2] =
{
    { (D3DBLEND)0,           (D3DBLEND)0           }, // ignored
    { D3DBLEND_ZERO,         D3DBLEND_ZERO         },
    { D3DBLEND_ONE,          D3DBLEND_ONE          },
    { D3DBLEND_SRCCOLOR,     D3DBLEND_SRCCOLOR     },
    { D3DBLEND_INVSRCCOLOR,  D3DBLEND_INVSRCCOLOR  },
    { D3DBLEND_SRCALPHA,     D3DBLEND_SRCALPHA     },
    { D3DBLEND_INVSRCALPHA,  D3DBLEND_INVSRCALPHA  },
    { D3DBLEND_DESTALPHA,    D3DBLEND_DESTALPHA    },
    { D3DBLEND_INVDESTALPHA, D3DBLEND_INVDESTALPHA },
    { D3DBLEND_DESTCOLOR,    D3DBLEND_DESTCOLOR    },
    { D3DBLEND_INVDESTCOLOR, D3DBLEND_INVDESTCOLOR },
    { D3DBLEND_SRCALPHASAT,  D3DBLEND_ONE          },
};

The line

{ D3DBLEND_INVSRCALPHA,  D3DBLEND_INVSRCALPHA  },

should be

{ D3DBLEND_SRCALPHA,  D3DBLEND_INVSRCALPHA  },

Same problem in GL:
The line

{ GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA },

should be

{ GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA }

All around it look like these tables are globally incorrect (at least for Opengl and d3d9, didn't check others)
Also, the fact that the states are simply duplicated in the table is more than suspicious...

Cannot open include file: 'TINYSTL/unordered_set.h': No such file or directory

Hi, I tried to enable to TinySTL so I cloned the repo and activated it.
However bgfx try to include a unordered_set/h file which doesn't seem to be implemented in TinySTL ... how do you get it to compile ?
Or do you have another implementation ?
I used this one: https://github.com/mendsley/tinystl.git

(side note)
In regard to alternative stl implementation:
Last time I checked this one was pretty good:
http://code.google.com/p/rdestl/

Failed to build on Mac OSX 10.8.5, Xcode502

error on:

cmd.cpp
../../../examples/common/entry/cmd.cpp:15:10: fatal error: 'unordered_map' file
not found

include <unordered_map>

     ^

1 error generated.

Tried installed gcc4.8, but still same error.

Examples using imgui not displaying correctly on Linux (Mesa, Intel Ivybridge)

On the Linux OpenGL (Mesa) renderer the examples 9, 11, 12, 13, and 14 show only those parts of their scenes which overlap with the imgui area. The rest of the window is black. Debug text is being displayed (blitted?) every frame, but not cleared between swaps. Attached screenshots show the problem clearly. Tested on Mesa Intel-dri (Ivybridge) 9.2.2 as well as the current git master, both on Linux kernel 3.11.6. Right now I am unable to verify on other operating systems or hardware, but will try to test a Windows OGL build soon.

Only the imgui examples seem to be affected, others work correctly. Throwing out imgui makes the scenes render as expected. Together with the debug text being blitted but not cleared, this somehow seems as a scissoring or blending mode problem. However, in ex11 I find that Context::rendererSubmit() does call glDisable(GL_SCISSOR_TEST) for the scene geometry every frame.

I am still only learning the ropes but would like to get to the bottom of this. Any hints what to try next? Of course verification on other OpenGL configurations would clarify if this is somehow a mesa bug.

Thanks,
Tomislav

ex09
ex11
ex12
ex13
ex14

Blend factor not working (+fix proposal)

The new feature BGFX_STATE_BLEND_FACTOR doesn't work as it is due, to a missmatch in mask comparison (and color format issue).

In line 2402 of renderer_d3d9.cpp or 2656 of renderer_gl.cpp (need to check other renderers as well)
This is incorrect:

if (0 != (blend&(BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_FACTOR, BGFX_STATE_BLEND_FACTOR) ) )

the "blend" variable is a 32bit value shifted by BGFX_STATE_BLEND_SHIFT while BGFX_STATE_BLEND_FUNC is an unshifted 64 bit value, so they never match.
Furthermore, BGFX_STATE_BLEND_xxx are not mask values (power of two), they are incremental values (0,1,2,3...9, a,b...) so you cannot use binary val&masl !=0 to check for them since they will also match unwanted blend states !
Finally, BGFX_STATE_BLEND_INV_FACTOR must also be checked since it also use the blend factor.
A correct check would unfortunately be: (but there are other possible implementation)

//if (0 != (blend&(BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_FACTOR, BGFX_STATE_BLEND_FACTOR) ) )
if( ((src == (BGFX_STATE_BLEND_FACTOR>>BGFX_STATE_BLEND_SHIFT)) || 
     (dst == (BGFX_STATE_BLEND_FACTOR>>BGFX_STATE_BLEND_SHIFT)) ||
     (src == (BGFX_STATE_BLEND_INV_FACTOR>>BGFX_STATE_BLEND_SHIFT)) || 
     (dst == (BGFX_STATE_BLEND_INV_FACTOR>>BGFX_STATE_BLEND_SHIFT)))
&&  blendFactor != state.m_rgba)
{   

Best way to improve this would be to make every (BGFX_STATE_BLEND_xxx a power of 2. Didn't check if range allows it. The change below should be applied to every renderer, or something equivalent if the expression is optimized.

Finally the color given is in 0xRRGGBBAA, which is fine with opengl, however in direct3D (9,10,11) it must be swapped using D3DCOLOR_RGBA.
Using this :

&&  blendFactor != state.m_rgba)
{
    blendFactor = state.m_rgba;
    DWORD color = D3DCOLOR_RGBA(blendFactor>>24, (blendFactor>>16)&0xff, (blendFactor>>8)&0xff, blendFactor&0xff);
    DX_CHECK(device->SetRenderState(D3DRS_BLENDFACTOR, color) );
}

The code provided was tested locally and provide the requested result. If necessary I could make a pull request, but I think you may want to either improve the test expression, or change blend state to power of two...

Trouble building android makefiles under windows

I'm having trouble building the bgfx for android under windows, believe it's due to the handling of the paths in windows.

$ make android-arm-debug
make -R -C .build/projects/gmake-android-arm config=debug
make[1]: Entering directory `/c/bgfx/.build/projects/gmake-android-arm'
==== Building bgfx (debug) ====
glcontext_egl.cpp
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `C:\android-ndk-r9d\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64/bin/arm-linux-androideabi-g++    -MMD -MP -DBX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1 -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DBGFX_CONFIG_DEBUG=1 -IC:\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include -IC:\android-ndk-r9d/sources/android/native_app_glue -IC:\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -Ic:/bx/include -IC:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\/include -I../../../include  -Wall -Wextra -g -fPIC -std=c++0x -U__STRICT_ANSI__ -Wno-psabi -no-canonical-prefixes -Wa,--noexecstack -fstack-protector -ffunction-sections --sysroot=C:\android-ndk-r9d/platforms/android-14/arch-arm -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-rtti -fno-exceptions  -o "../../android-arm/obj/Debug/bgfx/glcontext_egl.o" -MF ../../android-arm/obj/Debug/bgfx/glcontext_egl.d -c "../../../src/glcontext_egl.cpp"'
make[2]: *** [../../android-arm/obj/Debug/bgfx/glcontext_egl.o] Error 2
make[1]: *** [bgfx] Error 2
make[1]: Leaving directory `/c/bgfx/.build/projects/gmake-android-arm'
make: *** [android-arm-debug] Error 2

Compiling Shaders

Hi,
I like your implementation and thought about using it to convert my lightprepass renderer to your framework (and release the source of course). Sorry for the long text...

Beside missing multiple render targets (which should be easy to add) I've had in my own implementation some ideas that aren't possible with your implementation. For example in your shader compiler you write the text of glsl shaders to the bin-file, but you precompile the hlsl-shaders for dx9/dx11. In my opinion it would be much better to write in the dx9/dx11 case also only the pure text and let your framework compile the shader during loading (and perhaps let the app ask for the compiled binary blob so that the app can do it's own cache management).
Rational behind this: if you compile the shader during createVertexShader/createFragmentShader you can specify special defines so that a shader can work with different vertex formats. To get the whole picture here's an example:
first I create a vertex format via templating (has the advantage that the ide knows about the components of a vertex and can provide autocompletion):
typedef VERTEXBUILDER_3(POS_3F, NORMAL_3F, TEXCOORD0_2F) ReconstructVertexFormat;
now when I compile my shaders I provide also the vertexbuilder format to the compiler subsystem which inserts automatically defines for the vertex format so that I can write in the shader the following:
struct ReconstructVertexShaderInput {
float3 Position : POSITION0;
float2 TexCoord : TEXCOORD0;

ifdef VERTEXCOMP_COLOR_4U

float4 Color : COLOR;

endif

};
or can customize which light model to use or something like that...

I can provide you with my implementation of the vertexbuilder if you want to take a look...

another thing would be the possibility to scan for predefined values like worldviewprojection or something like that and set only the values really needed by the shader and not simply all values for every shader.

emscripten support?

I was wondering whether this works in combination with emscripten and whether it's possible to ship a html5 game with the BSD license. Because it's not really possible to bundle the license text with the javascript stuff.

Error after pulling latest changes.

On Linux, ubuntu 13.10, nvidia 319.17, x64

../../../src/bgfx.cpp(704): BGFX init
../../../src/bgfx_p.h(784): BGFX ConstantBuffer 524288, 524280
../../../src/bgfx_p.h(784): BGFX ConstantBuffer 524288, 524280
../../../src/glcontext_glx.cpp(52): BGFX GLX extensions:
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_visual_info
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_visual_rating
../../../src/renderer_gl.cpp(212): BGFX GLX_SGIX_fbconfig
../../../src/renderer_gl.cpp(212): BGFX GLX_SGIX_pbuffer
../../../src/renderer_gl.cpp(212): BGFX GLX_SGI_video_sync
../../../src/renderer_gl.cpp(212): BGFX GLX_SGI_swap_control
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_swap_control
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_swap_control_tear
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_texture_from_pixmap
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_buffer_age
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_create_context
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_create_context_profile
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_create_context_es_profile
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_create_context_es2_profile
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_create_context_robustness
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_multisample
../../../src/renderer_gl.cpp(212): BGFX GLX_NV_float_buffer
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_fbconfig_float
../../../src/renderer_gl.cpp(212): BGFX GLX_EXT_framebuffer_sRGB
../../../src/renderer_gl.cpp(212): BGFX GLX_NV_multisample_coverage
../../../src/renderer_gl.cpp(212): BGFX GLX_ARB_get_proc_address
../../../src/glcontext_glx.cpp(75): BGFX glX num configs 30
../../../src/glcontext_glx.cpp(83): BGFX ---
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 3: 8, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 4: a, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 5: 9, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 6: c, 18 ( 18)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 7: d, 8 ( 8)
../../../src/glcontext_glx.cpp(122): BGFX Create GL 2.1 context.
../../../src/glcontext_glx.cpp(162): BGFX Using glXSwapIntervalEXT.
X Error of failed request: GLXBadDrawable
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 16 (X_GLXVendorPrivate)
Serial number of failed request: 33
Current serial number in output stream: 35

rendering error on linux

the hdr example shows not the complete object on 32bit linux. dunno if it's an error in the example or the library itself (debug-version tested).

screenshot: http://postimage.org/image/wg1b8o72f/

debugoutput: https://gist.github.com/questor/5141764

gfxcard:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile x86/MMX/SSE2
OpenGL version string: 3.0 Mesa 9.0.2
OpenGL shading language version string: 1.30

Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0
X.Org: 1.13.0 drivers: intel (unloaded: fbdev,vesa) Resolution: [email protected], [email protected]
GLX Renderer: Mesa DRI Intel Sandybridge Mobile x86/MMX/SSE2 GLX Version: 3.0 Mesa 9.0.2 Direct Rendering: Yes

yes I know, the gfx card sucks hard, hence gDebugger doesn't work because of missing openCL drivers, can you reproduce this behaviour?

How to run Android samples?

I've managed to compile bgfx and samples for android gmake-arm, now i have a lot of .so for every sample, but how can i run them on android device?

Any guide would be good.

Examples 09-17 (except 15) fail to compile shader

Been researching a little bit, but I might have a GL problem now: all examples above 09 besides 15 (which seems not to use many shaders) produce these errors (with more or less repetition of unrecognized profile specifiers lowp, highp, and precision).

../../../src/renderer_gl.cpp(1268): BGFX attr a_position: 1
../../../src/renderer_gl.cpp(1268): BGFX attr a_color0: 0
../../../src/renderer_gl.cpp(2007): BGFX

precision highp float;
varying vec4 v_color0;
varying vec2 v_texcoord0;
uniform sampler2D u_texColor;
void main ()
{
lowp vec4 tmpvar_1;
tmpvar_1.xyz = v_color0.xyz;
tmpvar_1.w = (v_color0.w * texture2D (u_texColor, v_texcoord0).x);
gl_FragColor = tmpvar_1;
}

../../../src/renderer_gl.cpp(2011): BGFX Failed to compile shader. 0: 0(1) : warning C7022: unrecognized profile specifier "highp"
0(1) : warning C7022: unrecognized profile specifier "precision"
0(7) : warning C7022: unrecognized profile specifier "lowp"
0(7) : error C0502: syntax error at token "lowp"

../../../src/bgfx.cpp(80): BGFX 0x00000002: Failed to compile shader.
Aborted

Though I should probably go learn more C++ and get into SDL before trying to wrangle bgfx into anything, I thought this was interesting. I am unfortunately on Mint (ubuntu) at the moment and have tried installing potential OpenGL developer depedencies to no avail.

glxinfo | grep OpenGL http://www.pasteall.org/49484

Shader compilation problems on Linux

Maybe I'm doing it wrong, but if I do a make rebuild-shaders it fails because rebuild-shaders attempts to build hlsl variants which fails because shaderc doesn't do hlsl on non-windows platforms. I can manual build them like so:

make TARGET=4 -C examples/01-cubes

I'm also running into the following problem trying to build embedded shaders, e.g.:

make TARGET=4 -C examples/02-metaballs/
make: Entering directory `/home/cam/Projects/bgfx/bgfx/examples/02-metaballs'
[fs_metaballs.sc]
Unable to open output file '/tmp'.cat: /tmp: Is a directory
make: *** [fs_metaballs.bin.h] Error 1

The shader-embedded.mk file looks like it expects a $TEMP variable to be defined. I don't have $TEMP set so it's trying to output to /tmp

Should I be attempting to rebuild shaders at all using make rebuild-shaders or should this be happening as part of the normal build process anyway?

The reason I was rebuilding them is I was getting a problem with my intel based card not working properly with some of the samples and wanted to make sure shaders were up to date. I see this problem has been tracked down in another bug report.

Confused about shaderc platform switch

shaderc offers:

  --platform <platform>     Target platform.
       android
       ios
       linux
       nacl
       osx
       windows

But the examples separate their shaders by renderer (dx11, dx9, gles, glsl) and check the current renderer at runtime to pick the right shader dir, so I expected shaderc to offer a renderer switch instead.

It looks like you're supposed to combine --platform and --profile to target a particular renderer?

I have to admit I don't fully understand what's involved here. If I were to guess how I would expect something like this to work, it would be this: Since bgfx can build with several renderers and pick the right one at runtime, I would expect shaderc to build multiple variants of a shader to match all your supported renderers (e.g. dx9, dx11, glsl in the same .bin file if you're targeting windows and building all three renderers) and then pick the right one at runtime based on the running renderer. Maybe that's a little naive of me!

Shaders from examples 05 and 06 won't build.

On:

[~/bgfx/examples/06-bump] make TARGET=4 VERBOSE=1

I get this output:

[vs_bump.sc]
"../../tools/bin/shaderc" --platform linux -p 120 -i ../../premake/../src/ --type vertex --depends -o ../../.build/shaders/glsl/vs_bump.bin -f vs_bump.sc --disasm

And it stays like that forever. (one cpu core is on full load). It looks like execution somewhere enters in some endless loop. I haven't investigated what the problem might be.

Examples 05-instancing and 06-bump are affected by this bug. (the rest works fine)

VS2010 project doesn't compile

It caused by bx/include/compat/stdint.h .

in line 44:

if _MSC_VER >= 1600 // [

include <stdint.h>

else // ] _MSC_VER >= 1600 [

...

it includes stdint.h but instead of including the standard msvc header it includes bx/include/compat/stdint.h again, and it doesn't define anyting.

after removing/renaming "bx/include/compat/stdint.h" the compilation of the solution works fine.

I am using VS2010 express edition

shaderc uses the wrong path for inclusion files

Looks like shaderc prepends relative includes with the path to the current execution directory, instead of the current file directory.

AFAIK the examples work because the makefiles are in the same directory as the shader sources.

shaderc and shaderc.exe cohabition

Since linux and windows version of shaderc binaries are pushed, shader.mk and shader-embeded.mk are not working anymore on windows (maybe only under CygWin) due to file naming conflic.
Problematic code line and solution below:

//in shader.mk
SHADERC="$(BGFX_DIR)/tools/bin/shaderc"

and

//in shader-embeded.mk
SHADERC="$(THISDIR)../tools/bin/shaderc"

working alternative are:

//in shader.mk
ifeq ($(OS),Windows_NT)
SHADERC="$(BGFX_DIR)/tools/bin/shaderc.exe"
else
SHADERC="$(BGFX_DIR)/tools/bin/shaderc"
endif

and
//in shader-embeded.mk
ifeq ($(OS),Windows_NT)
SHADERC="$(THISDIR)../tools/bin/shaderc.exe"
else
SHADERC="$(THISDIR)../tools/bin/shaderc"
endif

error X4502: invalid input semantic 'POSITION': Legal indices are in [1,15]

I'm struggling to make shaderc to work :(

I'm trying to compile a simple vs with only the stock shader file from bgfx but failed so far.

The shader:

$input a_position, a_normal, a_color0
$output v_normal, v_color0

/*
 * Copyright 2011-2013 Branimir Karadzic. All rights reserved.
 * License: http://www.opensource.org/licenses/BSD-2-Clause
 */

#include "common.sh"

void main()
{
    gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) );
    v_normal = mul(u_model, vec4(a_normal, 0.0) ).xyz;
    v_color0 = a_color0;
}

where common.sh is bgfx common file (that includes bgfx_shader.sh)

My shaderc command line is: (with path simplified for readability)

shaderc.exe -f shaders/vs_gwen.sc -o out/shaders/windows/vs_gwen.bin --type v 
--platform windows --varyingdef H:/GitHub/bgfx/src/varying.def.sc -p ps_3_0

I got this result:

Code:

---
  1: struct Output
  2: {
  3: float4 gl_Position : SV_POSITION;
  4: float4 v_color0 : COLOR0;
  5: float3 v_normal : TEXCOORD1;
  6: };
  7: float3 instMul(float3 _vec, float3x3 _mtx) { return mul(_mtx, _vec); }
  8: float3 instMul(float3x3 _mtx, float3 _vec) { return mul(_vec, _mtx); }
  9: float4 instMul(float4 _vec, float4x4 _mtx) { return mul(_mtx, _vec); }
 10: float4 instMul(float4x4 _mtx, float4 _vec) { return mul(_vec, _mtx); }
 11: bool2 lessThan(float2 _a, float2 _b) { return _a < _b; }
 12: bool3 lessThan(float3 _a, float3 _b) { return _a < _b; }
 13: bool4 lessThan(float4 _a, float4 _b) { return _a < _b; }
 14: bool2 lessThanEqual(float2 _a, float2 _b) { return _a <= _b; }
 15: bool2 lessThanEqual(float3 _a, float3 _b) { return _a <= _b; }
 16: bool2 lessThanEqual(float4 _a, float4 _b) { return _a <= _b; }
 17: bool2 greaterThan(float2 _a, float2 _b) { return _a > _b; }
 18: bool3 greaterThan(float3 _a, float3 _b) { return _a > _b; }
 19: bool4 greaterThan(float4 _a, float4 _b) { return _a > _b; }
 20: bool2 greaterThanEqual(float2 _a, float2 _b) { return _a >= _b; }
 21: bool3 greaterThanEqual(float3 _a, float3 _b) { return _a >= _b; }
 22: bool4 greaterThanEqual(float4 _a, float4 _b) { return _a >= _b; }
 23: bool2 notEqual(float2 _a, float2 _b) { return _a != _b; }
 24: bool3 notEqual(float3 _a, float3 _b) { return _a != _b; }
 25: bool4 notEqual(float4 _a, float4 _b) { return _a != _b; }
 26: bool2 equal(float2 _a, float2 _b) { return _a == _b; }
 27: bool3 equal(float3 _a, float3 _b) { return _a == _b; }
 28: bool4 equal(float4 _a, float4 _b) { return _a == _b; }
 29: float2 mix(float2 _a, float2 _b, float2 _t) { return lerp(_a, _b, _t); }
 30: float3 mix(float3 _a, float3 _b, float3 _t) { return lerp(_a, _b, _t); }
 31: float4 mix(float4 _a, float4 _b, float4 _t) { return lerp(_a, _b, _t); }
 32: uniform float4x4 u_view;
 33: uniform float4x4 u_viewProj;
 34: uniform float4x4 u_model;
 35: uniform float4x4 u_modelView;
 36: uniform float4x4 u_modelViewProj;
 37: uniform float4x4 u_modelViewProjX;
 38: uniform float4x4 u_viewProjX;
 39: Output main(float4 a_color0 : COLOR0 , float3 a_normal : NORMAL0 , float3 a_position : POSITION) { Output _varying_; _varying_.v_color0 = float4(
1.0, 0.0, 0.0, 1.0); _varying_.v_normal = float3(0.0, 1.0, 0.0);
 40: {
 41: _varying_.gl_Position = mul(u_modelViewProj, float4(a_position, 1.0) );
 42: _varying_.v_normal = mul(u_model, float4(a_normal, 0.0) ).xyz;
 43: _varying_.v_color0 = a_color0;
 44: } return _varying_;
 45: }

---

Error: 0x80004005 H:\GitHub\bgfxGWEN\premake\memory(15,45): warning X3206: implicit truncation of vector type
H:\GitHub\bgfxGWEN\premake\memory(16,45): warning X3206: implicit truncation of vector type
H:\GitHub\bgfxGWEN\premake\memory(39,88): error X4502: invalid input semantic 'POSITION': Legal indices are in [1,15]
H:\GitHub\bgfxGWEN\premake\memory(39,88): error X4502: invalid ps_3_0 input semantic 'POSITION'
H:\GitHub\bgfxGWEN\premake\memory(3,22): error X4502: invalid ps_3_0 output semantic 'SV_POSITION'
H:\GitHub\bgfxGWEN\premake\memory(5,19): error X4502: invalid ps_3_0 output semantic 'TEXCOORD1'

Failed to build shader.

I tried various profile but everything seems to fail so far.
I'm doing something wrong but ran of out idea to try.
Any hint ?

setTexture param _flags = UINT32_MAX not preserves flags on GLES2

The doc says:
/// @param _flags Texture sampler filtering flags. UINT32_MAX use the
/// sampler filtering mode set by texture.
///
void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags = UINT32_MAX);

Without sampler object this function is called:
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_gl.cpp#L2406

reproduction:

I set at creation flags to BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP.
When calling setTexture m_flags == m_currentFlags == BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP.
param _flags == BGFX_SAMPLER_DEFAULT_FLAGS

in the function flags will be 0 and the condition true because m_currentFlags != 0.
it sets sampler to default state 0 instead of keep the uv clamping.

I think the solution could be something like this:

void Texture::setSamplerState(uint32_t _flags)
{
const uint32_t flags = (0 != (BGFX_SAMPLER_DEFAULT_FLAGS & _flags)) ? m_flags : _flags&(~BGFX_TEXTURE_RESERVED_MASK);
if ( m_currentFlags != flags)
{
const GLenum target = m_target;
const uint8_t numMips = m_numMips;

Troubles using uint16 as textureCoordinates

vertexDecl.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Uint16,true);

This map to the signed range {-32768 ; 32767} while (I assume) it should map to the unsigned short range {0, 65535}

Also, I didn't find a way to use texture coordinates with unnormalized coordinates, I dunno if this is possible with bgfx ? (pixel precise coordinates with integer)

Finally I didn't understand what is the purpose of the last parameter of the vertexDecl.add ... ?
--> bool _asInt = false

Draw Call exceeded array buffer bounds

in 02 metaballs example: "Draw Call exceeded array buffer bounds: Draw call accessed a vertex outside the range of an array buffer in use"

Buffers are enabled from here:
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_gl.cpp#L1889
Disable is never called.

When rendering the metaballs. bgfx sets and enables vertex attrib array: 0,1,2.
But vertexattribarray 3 is also enabled from previous frames text rendering.
So there is a much smaller buffer in use in slot 3, when rendering.

It doesn't cause crash because the shader doesn't use that attribute, but some driver could handle this differently.

generation of build files fails on windows8

process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
../bx/tools/bin/darwin/premake4 --file=premake/premake4.lua vs2012
process_begin: CreateProcess(c:\Development\bgfxRender\bx\tools\bin\darwin\prema
ke4, ../bx/tools/bin/darwin/premake4 --file=premake/premake4.lua vs2012, ...) fa
iled.
make (e=193): Error 193
make: *** [.build/projects/vs2012] Error 193

It seems to choose the darwin binary of premake.
$(shell uname) returns empty string.

Related question on stackoverflow:
http://stackoverflow.com/questions/714100/os-detecting-makefile

Building on Windows

I have followed the instructions to build the best that I could, but it seems something is not quite right.

My set up:
Visual Studio 2013/2012/2010/2008
Windows 7
Direct X SDK -- check
GNU tools -- check

Commands:
'make' -- check
'make vs2008-release64' -- not recognised.
'make vs2008' -- recognised, fails.
'make vs2010'/12/13 -- not recognised (I read this was supported?)

So I go to .build/projects/vs2012 and use the solution directly. I can successfully build all configurations, and can even run the examples from from Visual Studio in debug mode, but attempting to launch exe's from .build/win__vs20_/ cause most of the examples to crash on window load (I have run windbg to identify that is true-- memory access violations when trying to load shaders).

It seems to be the ones that require external resources that crash, and I see the examples directory has the required resources.

How are the directories meant to be layed out for the exe's to work ? Did I make an error elsewhere?

Thanks

Failed to generate project files on OSX

error:

make command gives the following error:
../bx/tools/bin/darwin/premake4 --file=premake/premake4.lua vs2012
Error: no such action 'vs2012'

iOS/OSX specific project file generation works fine

Invalid window handle at exit

To reproduce: Run any sample project, wait for the project to start. Close it with X on the window top-right corner.

error in:

  • renderer_d3d9.cpp:736 "Present failed with err: 0x80070578" (Invalid window handle.)
  • entry_windows.cpp:241. DestroyWindow(m_hwnd) returns 0, GetLastError() returns 1400 (Invalid window handle)

Platform: windows7, d3d9 renderer, gpu: AMD HD 5450 driver version: 13.152.1.8000

What is this exactly?

What objective of this? Complete Game engine? or only framework ?
(sorry for bad english :()

Black box around view if used with glfw

So I have been setting up a project of mine for a game using bx, bgfx and glfw3.
I decide to use glfw3 because of the input control and window management and because bgfx is supposed to work well with it.
This is what I get when I compile a simple project, I am not quite sure which ever might be the issue causer here, might be the chemistry that happens between glfw window and bgfx scene, I don't know.
This happens if the resolution for view is set to more then 1280x720.
In the screen the resolution was 1600x900.
http://i.imgur.com/5QG8I2R.png

The source can be found on bitbucket: https://bitbucket.org/ZetaHunter/sandbox_game/src

The repo uses submodules for bx, bgfx, glfw3 and polyvox.
This weekend I was setting up glfw3 to compile, and after screwing around with premake to
get what was initialy in cmake (glfw3) to be premake, I got it to compile, I am still not sure, I might be missing some defines and I get this result.
I am not quite sure where else to look for help though.
So any kind of help is useful. ๐Ÿ˜„

Before I turned this into git repo and used premake to create project, but rather a manual setup of it, the project seemed to work fine, but after my attempt to automate it, it has broken in this weird way.

Mac OS X building (gmake and XCode) won't work

GMake build creates invalid executables: "You can't open the application xxxx because it may be damaged or incomplete."

XCode4 build creates XCode projects, but it won't compile (missing bx compat dependencies, lots of OpenGL compiling errors etc.)

Soft BreakPoint called, pbly Heap corruption while running "example-06-bump"

This occurs systematically with a DX9 renderer.
Switchint to MonoThreaded help tracking down the issue:
It leads to Line 649 of renderer_d3d9.cpp.

for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage)
{
(there) --> DX_CHECK(m_device->SetTexture(stage, NULL) );
}

I try to fix it, but I didn't get to find the root cause.
Googling doesn't help.
However the case below seems to share root cause similarities:
http://stackoverflow.com/questions/14034101/unbind-texture-bound-using-id3dxeffect-settexture

Any idea ?

Btw, thx a lot for sharing bgfx. It is a beautiful code base.
Never seen a renderer so bold and uncluttered.
Didn't dig everywhere yet, but it looks like a pure submission engine, which is pretty exciting to say the least :)

opengl renderer - garbled textures in example-08-update

updatebuggl

It appears that the dynamic textures don't actually update.

Full debug output below.
../../../src/bgfx.cpp(667): BGFX Init...
../../../src/bgfx_p.h(1571): BGFX render thread start
../../../src/glcontext_glx.cpp(52): BGFX GLX extensions:
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_visual_info
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_visual_rating
../../../src/renderer_gl.cpp(457): BGFX GLX_SGIX_fbconfig
../../../src/renderer_gl.cpp(457): BGFX GLX_SGIX_pbuffer
../../../src/renderer_gl.cpp(457): BGFX GLX_SGI_video_sync
../../../src/renderer_gl.cpp(457): BGFX GLX_SGI_swap_control
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_swap_control
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_swap_control_tear
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_texture_from_pixmap
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_buffer_age
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_create_context
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_create_context_profile
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_create_context_es_profile
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_create_context_es2_profile
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_create_context_robustness
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_multisample
../../../src/renderer_gl.cpp(457): BGFX GLX_NV_float_buffer
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_fbconfig_float
../../../src/renderer_gl.cpp(457): BGFX GLX_EXT_framebuffer_sRGB
../../../src/renderer_gl.cpp(457): BGFX GLX_NV_multisample_coverage
../../../src/renderer_gl.cpp(457): BGFX GLX_ARB_get_proc_address
../../../src/glcontext_glx.cpp(75): BGFX glX num configs 30
../../../src/glcontext_glx.cpp(83): BGFX ---
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 3: 8, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 4: a, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 5: 9, 8 ( 8)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 6: c, 18 ( 18)
../../../src/glcontext_glx.cpp(97): BGFX glX 0/30 7: d, 8 ( 8)
../../../src/glcontext_glx.cpp(111): BGFX Best config 0.
../../../src/glcontext_glx.cpp(123): BGFX Create GL 2.1 context.
../../../src/glcontext_glx.cpp(164): BGFX Using glXSwapIntervalEXT.
../../../src/renderer_gl.cpp(2228): BGFX GL_NUM_COMPRESSED_TEXTURE_FORMATS 23
../../../src/renderer_gl.cpp(2268): BGFX 0: 83f0
../../../src/renderer_gl.cpp(2268): BGFX 1: 83f2 BC2
../../../src/renderer_gl.cpp(2268): BGFX 2: 83f3 BC3
../../../src/renderer_gl.cpp(2268): BGFX 3: 8b90
../../../src/renderer_gl.cpp(2268): BGFX 4: 8b91
../../../src/renderer_gl.cpp(2268): BGFX 5: 8b92
../../../src/renderer_gl.cpp(2268): BGFX 6: 8b93
../../../src/renderer_gl.cpp(2268): BGFX 7: 8b94
../../../src/renderer_gl.cpp(2268): BGFX 8: 8b95
../../../src/renderer_gl.cpp(2268): BGFX 9: 8b96
../../../src/renderer_gl.cpp(2268): BGFX 10: 8b97
../../../src/renderer_gl.cpp(2268): BGFX 11: 8b98
../../../src/renderer_gl.cpp(2268): BGFX 12: 8b99
../../../src/renderer_gl.cpp(2268): BGFX 13: 9274 ETC2
../../../src/renderer_gl.cpp(2268): BGFX 14: 9275
../../../src/renderer_gl.cpp(2268): BGFX 15: 9276 ETC2A1
../../../src/renderer_gl.cpp(2268): BGFX 16: 9277
../../../src/renderer_gl.cpp(2268): BGFX 17: 9278 ETC2A
../../../src/renderer_gl.cpp(2268): BGFX 18: 9279
../../../src/renderer_gl.cpp(2268): BGFX 19: 9270
../../../src/renderer_gl.cpp(2268): BGFX 20: 9271
../../../src/renderer_gl.cpp(2268): BGFX 21: 9272
../../../src/renderer_gl.cpp(2268): BGFX 22: 9273
../../../src/renderer_gl.cpp(2274): BGFX Defaults:
../../../src/renderer_gl.cpp(2280): BGFX GL_MAX_FRAGMENT_UNIFORM_VECTORS 512 (min: 16)
../../../src/renderer_gl.cpp(2281): BGFX GL_MAX_VERTEX_UNIFORM_VECTORS 1024 (min: 128)
../../../src/renderer_gl.cpp(2282): BGFX GL_MAX_VARYING_VECTORS 31 (min: 8)
../../../src/renderer_gl.cpp(2284): BGFX GL_MAX_VERTEX_ATTRIBS 16 (min: 8)
../../../src/renderer_gl.cpp(2285): BGFX GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 192 (min: 8)
../../../src/renderer_gl.cpp(2286): BGFX GL_MAX_CUBE_MAP_TEXTURE_SIZE 16384 (min: 16)
../../../src/renderer_gl.cpp(2287): BGFX GL_MAX_TEXTURE_IMAGE_UNITS 32 (min: 8)
../../../src/renderer_gl.cpp(2288): BGFX GL_MAX_TEXTURE_SIZE 16384 (min: 64)
../../../src/renderer_gl.cpp(2289): BGFX GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 32 (min: 0)
../../../src/renderer_gl.cpp(2290): BGFX GL_MAX_RENDERBUFFER_SIZE 16384 (min: 1)
../../../src/renderer_gl.cpp(2292): BGFX Vendor: NVIDIA Corporation
../../../src/renderer_gl.cpp(2293): BGFX Renderer: GeForce GTX 480/PCIe/SSE2
../../../src/renderer_gl.cpp(2294): BGFX Version: 4.3.0 NVIDIA 319.32
../../../src/renderer_gl.cpp(2295): BGFX GLSL version: 4.30 NVIDIA via Cg compiler
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 0: GL_AMD_multi_draw_indirect
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 1: GL_ARB_arrays_of_arrays
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 2: GL_ARB_base_instance
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 3: GL_ARB_blend_func_extended
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 4: GL_ARB_clear_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 5: GL_ARB_color_buffer_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 6: GL_ARB_compatibility
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 7: GL_ARB_compressed_texture_pixel_storage
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 8: GL_ARB_conservative_depth
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 9: GL_ARB_compute_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 10: GL_ARB_copy_buffer
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 11: GL_ARB_copy_image
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 12 (supported): GL_ARB_debug_output
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 13: GL_ARB_depth_buffer_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 14 (supported): GL_ARB_depth_clamp
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 15: GL_ARB_depth_texture
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 16: GL_ARB_draw_buffers
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 17: GL_ARB_draw_buffers_blend
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 18: GL_ARB_draw_indirect
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 19: GL_ARB_draw_elements_base_vertex
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 20: GL_ARB_draw_instanced
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 21: GL_ARB_ES2_compatibility
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 22 (supported): GL_ARB_ES3_compatibility
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 23: GL_ARB_explicit_attrib_location
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 24: GL_ARB_explicit_uniform_location
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 25: GL_ARB_fragment_coord_conventions
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 26: GL_ARB_fragment_layer_viewport
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 27: GL_ARB_fragment_program
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 28: GL_ARB_fragment_program_shadow
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 29: GL_ARB_fragment_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 30: GL_ARB_framebuffer_no_attachments
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 31: GL_ARB_framebuffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 32 (supported): GL_ARB_framebuffer_sRGB
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 33: GL_ARB_geometry_shader4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 34 (supported): GL_ARB_get_program_binary
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 35: GL_ARB_gpu_shader5
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 36: GL_ARB_gpu_shader_fp64
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 37: GL_ARB_half_float_pixel
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 38 (supported): GL_ARB_half_float_vertex
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 39: GL_ARB_imaging
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 40 (supported): GL_ARB_instanced_arrays
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 41: GL_ARB_internalformat_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 42: GL_ARB_internalformat_query2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 43: GL_ARB_invalidate_subdata
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 44: GL_ARB_map_buffer_alignment
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 45: GL_ARB_map_buffer_range
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 46: GL_ARB_multi_draw_indirect
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 47 (supported): GL_ARB_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 48: GL_ARB_multitexture
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 49: GL_ARB_occlusion_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 50: GL_ARB_occlusion_query2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 51: GL_ARB_pixel_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 52: GL_ARB_point_parameters
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 53: GL_ARB_point_sprite
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 54: GL_ARB_program_interface_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 55: GL_ARB_provoking_vertex
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 56: GL_ARB_robust_buffer_access_behavior
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 57: GL_ARB_robustness
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 58: GL_ARB_sample_shading
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 59 (supported): GL_ARB_sampler_objects
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 60 (supported): GL_ARB_seamless_cube_map
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 61: GL_ARB_separate_shader_objects
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 62: GL_ARB_shader_atomic_counters
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 63: GL_ARB_shader_bit_encoding
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 64: GL_ARB_shader_image_load_store
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 65: GL_ARB_shader_image_size
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 66: GL_ARB_shader_objects
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 67: GL_ARB_shader_precision
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 68: GL_ARB_shader_storage_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 69: GL_ARB_shader_subroutine
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 70: GL_ARB_shader_texture_lod
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 71: GL_ARB_shading_language_100
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 72: GL_ARB_shading_language_420pack
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 73: GL_ARB_shading_language_include
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 74: GL_ARB_shading_language_packing
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 75: GL_ARB_shadow
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 76: GL_ARB_stencil_texturing
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 77: GL_ARB_sync
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 78: GL_ARB_tessellation_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 79: GL_ARB_texture_border_clamp
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 80: GL_ARB_texture_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 81: GL_ARB_texture_buffer_object_rgb32
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 82: GL_ARB_texture_buffer_range
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 83: GL_ARB_texture_compression
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 84: GL_ARB_texture_compression_bptc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 85: GL_ARB_texture_compression_rgtc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 86: GL_ARB_texture_cube_map
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 87: GL_ARB_texture_cube_map_array
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 88: GL_ARB_texture_env_add
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 89: GL_ARB_texture_env_combine
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 90: GL_ARB_texture_env_crossbar
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 91: GL_ARB_texture_env_dot3
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 92 (supported): GL_ARB_texture_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 93: GL_ARB_texture_gather
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 94: GL_ARB_texture_mirrored_repeat
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 95 (supported): GL_ARB_texture_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 96: GL_ARB_texture_non_power_of_two
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 97: GL_ARB_texture_query_levels
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 98: GL_ARB_texture_query_lod
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 99: GL_ARB_texture_rectangle
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 100: GL_ARB_texture_rg
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 101: GL_ARB_texture_rgb10_a2ui
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 102: GL_ARB_texture_storage
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 103: GL_ARB_texture_storage_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 104 (supported): GL_ARB_texture_swizzle
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 105: GL_ARB_texture_view
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 106 (supported): GL_ARB_timer_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 107: GL_ARB_transform_feedback2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 108: GL_ARB_transform_feedback3
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 109: GL_ARB_transform_feedback_instanced
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 110: GL_ARB_transpose_matrix
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 111: GL_ARB_uniform_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 112: GL_ARB_vertex_array_bgra
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 113 (supported): GL_ARB_vertex_array_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 114: GL_ARB_vertex_attrib_64bit
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 115: GL_ARB_vertex_attrib_binding
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 116: GL_ARB_vertex_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 117: GL_ARB_vertex_program
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 118: GL_ARB_vertex_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 119 (supported): GL_ARB_vertex_type_2_10_10_10_rev
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 120: GL_ARB_viewport_array
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 121: GL_ARB_window_pos
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 122: GL_ATI_draw_buffers
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 123: GL_ATI_texture_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 124: GL_ATI_texture_mirror_once
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 125: GL_S3_s3tc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 126: GL_EXT_texture_env_add
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 127: GL_EXT_abgr
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 128 (supported): GL_EXT_bgra
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 129: GL_EXT_bindable_uniform
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 130 (supported): GL_EXT_blend_color
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 131: GL_EXT_blend_equation_separate
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 132: GL_EXT_blend_func_separate
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 133 (supported): GL_EXT_blend_minmax
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 134 (supported): GL_EXT_blend_subtract
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 135: GL_EXT_compiled_vertex_array
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 136: GL_EXT_Cg_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 137: GL_EXT_depth_bounds_test
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 138: GL_EXT_direct_state_access
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 139: GL_EXT_draw_buffers2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 140: GL_EXT_draw_instanced
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 141: GL_EXT_draw_range_elements
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 142: GL_EXT_fog_coord
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 143 (supported): GL_EXT_framebuffer_blit
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 144: GL_EXT_framebuffer_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 145: GL_EXTX_framebuffer_mixed_formats
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 146: GL_EXT_framebuffer_multisample_blit_scaled
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 147: GL_EXT_framebuffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 148 (supported): GL_EXT_framebuffer_sRGB
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 149: GL_EXT_geometry_shader4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 150: GL_EXT_gpu_program_parameters
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 151: GL_EXT_gpu_shader4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 152: GL_EXT_multi_draw_arrays
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 153: GL_EXT_packed_depth_stencil
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 154: GL_EXT_packed_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 155: GL_EXT_packed_pixels
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 156: GL_EXT_pixel_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 157: GL_EXT_point_parameters
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 158: GL_EXT_provoking_vertex
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 159: GL_EXT_rescale_normal
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 160: GL_EXT_secondary_color
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 161: GL_EXT_separate_shader_objects
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 162: GL_EXT_separate_specular_color
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 163: GL_EXT_shader_image_load_store
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 164: GL_EXT_shadow_funcs
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 165: GL_EXT_stencil_two_side
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 166: GL_EXT_stencil_wrap
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 167: GL_EXT_texture3D
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 168: GL_EXT_texture_array
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 169: GL_EXT_texture_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 170 (supported): GL_EXT_texture_compression_dxt1
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 171 (supported): GL_EXT_texture_compression_latc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 172 (supported): GL_EXT_texture_compression_rgtc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 173 (supported): GL_EXT_texture_compression_s3tc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 174: GL_EXT_texture_cube_map
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 175: GL_EXT_texture_edge_clamp
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 176: GL_EXT_texture_env_combine
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 177: GL_EXT_texture_env_dot3
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 178 (supported): GL_EXT_texture_filter_anisotropic
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 179: GL_EXT_texture_integer
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 180: GL_EXT_texture_lod
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 181: GL_EXT_texture_lod_bias
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 182: GL_EXT_texture_mirror_clamp
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 183: GL_EXT_texture_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 184: GL_EXT_texture_shared_exponent
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 185 (supported): GL_EXT_texture_sRGB
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 186: GL_EXT_texture_sRGB_decode
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 187 (supported): GL_EXT_texture_storage
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 188 (supported): GL_EXT_texture_swizzle
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 189 (supported): GL_EXT_timer_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 190: GL_EXT_transform_feedback2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 191: GL_EXT_vertex_array
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 192: GL_EXT_vertex_array_bgra
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 193: GL_EXT_vertex_attrib_64bit
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 194: GL_EXT_x11_sync_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 195: GL_EXT_import_sync_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 196: GL_IBM_rasterpos_clip
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 197: GL_IBM_texture_mirrored_repeat
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 198: GL_KHR_debug
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 199: GL_KTX_buffer_region
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 200: GL_NV_blend_square
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 201: GL_NV_compute_program5
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 202: GL_NV_conditional_render
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 203: GL_NV_copy_depth_to_color
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 204: GL_NV_copy_image
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 205: GL_NV_depth_buffer_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 206: GL_NV_depth_clamp
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 207: GL_NV_draw_texture
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 208: GL_NV_ES1_1_compatibility
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 209: GL_NV_explicit_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 210: GL_NV_fence
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 211: GL_NV_float_buffer
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 212: GL_NV_fog_distance
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 213: GL_NV_fragment_program
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 214: GL_NV_fragment_program_option
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 215: GL_NV_fragment_program2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 216: GL_NV_framebuffer_multisample_coverage
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 217: GL_NV_geometry_shader4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 218: GL_NV_gpu_program4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 219: GL_NV_gpu_program4_1
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 220: GL_NV_gpu_program5
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 221: GL_NV_gpu_program5_mem_extended
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 222: GL_NV_gpu_program_fp64
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 223: GL_NV_gpu_shader5
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 224: GL_NV_half_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 225: GL_NV_light_max_exponent
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 226: GL_NV_multisample_coverage
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 227: GL_NV_multisample_filter_hint
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 228: GL_NV_occlusion_query
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 229: GL_NV_packed_depth_stencil
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 230: GL_NV_parameter_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 231: GL_NV_parameter_buffer_object2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 232: GL_NV_path_rendering
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 233: GL_NV_pixel_data_range
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 234: GL_NV_point_sprite
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 235: GL_NV_primitive_restart
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 236: GL_NV_register_combiners
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 237: GL_NV_register_combiners2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 238: GL_NV_shader_atomic_counters
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 239: GL_NV_shader_atomic_float
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 240: GL_NV_shader_buffer_load
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 241: GL_NV_shader_storage_buffer_object
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 242: GL_NV_texgen_reflection
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 243: GL_NV_texture_barrier
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 244: GL_NV_texture_compression_vtc
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 245: GL_NV_texture_env_combine4
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 246: GL_NV_texture_expand_normal
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 247: GL_NV_texture_multisample
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 248: GL_NV_texture_rectangle
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 249: GL_NV_texture_shader
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 250: GL_NV_texture_shader2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 251: GL_NV_texture_shader3
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 252: GL_NV_transform_feedback
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 253: GL_NV_transform_feedback2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 254: GL_NV_vdpau_interop
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 255: GL_NV_vertex_array_range
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 256: GL_NV_vertex_array_range2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 257: GL_NV_vertex_attrib_integer_64bit
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 258: GL_NV_vertex_buffer_unified_memory
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 259: GL_NV_vertex_program
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 260: GL_NV_vertex_program1_1
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 261: GL_NV_vertex_program2
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 262: GL_NV_vertex_program2_option
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 263: GL_NV_vertex_program3
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 264: GL_NVX_conditional_render
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 265 (supported): GL_NVX_gpu_memory_info
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 266: GL_SGIS_generate_mipmap
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 267: GL_SGIS_texture_lod
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 268: GL_SGIX_depth_texture
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 269: GL_SGIX_shadow
../../../src/renderer_gl.cpp(2346): BGFX GL_EXTENSION 270: GL_SUN_slice_accum
../../../src/renderer_gl.cpp(2353): BGFX Supported extensions:
../../../src/renderer_gl.cpp(2358): BGFX 3: GL_ARB_debug_output
../../../src/renderer_gl.cpp(2358): BGFX 4: GL_ARB_depth_clamp
../../../src/renderer_gl.cpp(2358): BGFX 5: GL_ARB_ES3_compatibility
../../../src/renderer_gl.cpp(2358): BGFX 6: GL_ARB_framebuffer_sRGB
../../../src/renderer_gl.cpp(2358): BGFX 7: GL_ARB_get_program_binary
../../../src/renderer_gl.cpp(2358): BGFX 8: GL_ARB_half_float_vertex
../../../src/renderer_gl.cpp(2358): BGFX 9: GL_ARB_instanced_arrays
../../../src/renderer_gl.cpp(2358): BGFX 10: GL_ARB_multisample
../../../src/renderer_gl.cpp(2358): BGFX 11: GL_ARB_sampler_objects
../../../src/renderer_gl.cpp(2358): BGFX 12: GL_ARB_seamless_cube_map
../../../src/renderer_gl.cpp(2358): BGFX 13: GL_ARB_texture_float
../../../src/renderer_gl.cpp(2358): BGFX 14: GL_ARB_texture_multisample
../../../src/renderer_gl.cpp(2358): BGFX 15: GL_ARB_texture_swizzle
../../../src/renderer_gl.cpp(2358): BGFX 16: GL_ARB_timer_query
../../../src/renderer_gl.cpp(2358): BGFX 17: GL_ARB_vertex_array_object
../../../src/renderer_gl.cpp(2358): BGFX 18: GL_ARB_vertex_type_2_10_10_10_rev
../../../src/renderer_gl.cpp(2358): BGFX 23: GL_EXT_bgra
../../../src/renderer_gl.cpp(2358): BGFX 24: GL_EXT_blend_color
../../../src/renderer_gl.cpp(2358): BGFX 25: GL_EXT_blend_minmax
../../../src/renderer_gl.cpp(2358): BGFX 26: GL_EXT_blend_subtract
../../../src/renderer_gl.cpp(2358): BGFX 27: GL_EXT_framebuffer_blit
../../../src/renderer_gl.cpp(2358): BGFX 28: GL_EXT_framebuffer_sRGB
../../../src/renderer_gl.cpp(2358): BGFX 30: GL_EXT_texture_compression_dxt1
../../../src/renderer_gl.cpp(2358): BGFX 31: GL_EXT_texture_compression_latc
../../../src/renderer_gl.cpp(2358): BGFX 32: GL_EXT_texture_compression_rgtc
../../../src/renderer_gl.cpp(2358): BGFX 33: GL_EXT_texture_compression_s3tc
../../../src/renderer_gl.cpp(2358): BGFX 34: GL_EXT_texture_filter_anisotropic
../../../src/renderer_gl.cpp(2358): BGFX 36: GL_EXT_texture_sRGB
../../../src/renderer_gl.cpp(2358): BGFX 37: GL_EXT_texture_storage
../../../src/renderer_gl.cpp(2358): BGFX 38: GL_EXT_texture_swizzle
../../../src/renderer_gl.cpp(2358): BGFX 40: GL_EXT_timer_query
../../../src/renderer_gl.cpp(2358): BGFX 48: GL_NVX_gpu_memory_info
../../../src/renderer_gl.cpp(990): BGFX program create: 3: 1, 2
../../../src/renderer_gl.cpp(1101): BGFX Program 3
../../../src/renderer_gl.cpp(1102): BGFX Attributes:
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC4 a_color0 is at location 3
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC4 a_color1 is at location 2
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_position is at location 1
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC2 a_texcoord0 is at location 0
../../../src/renderer_gl.cpp(1120): BGFX Uniforms:
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 0, size 1 ((nil)), offset 0
../../../src/renderer_gl.cpp(1143): BGFX Sampler 0 at 1.
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_SAMPLER_2D u_texColor is at location 1, size 1 ((nil)), offset 0
../../../src/renderer_gl.cpp(1193): BGFX attr a_position: 1
../../../src/renderer_gl.cpp(1193): BGFX attr a_color0: 3
../../../src/renderer_gl.cpp(1193): BGFX attr a_color1: 2
../../../src/renderer_gl.cpp(1193): BGFX attr a_texcoord0: 0
vertexdecl 2637495d (2637495d), stride 28
attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
attr 3 - Attrib::Color0, num 4, type 0, norm 1, asint 0, offset 12
attr 4 - Attrib::Color1, num 4, type 0, norm 1, asint 0, offset 16
attr 7 - Attrib::TexCoord0, num 2, type 3, norm 0, asint 0, offset 20
../../../src/renderer_gl.cpp(990): BGFX program create: 6: 4, 5
../../../src/renderer_gl.cpp(1101): BGFX Program 6
../../../src/renderer_gl.cpp(1102): BGFX Attributes:
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC4 a_color0 is at location 1
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_position is at location 0
../../../src/renderer_gl.cpp(1120): BGFX Uniforms:
../../../src/renderer_gl.cpp(1193): BGFX attr a_position: 0
../../../src/renderer_gl.cpp(1193): BGFX attr a_color0: 1
vertexdecl 4b58a6b8 (4b58a6b8), stride 16
attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
attr 3 - Attrib::Color0, num 4, type 0, norm 1, asint 0, offset 12
../../../src/bgfx.cpp(862): BGFX Init complete.
../../../src/bgfx.cpp(715): BGFX Init complete.
../../../src/image.cpp(1505): BGFX WARN PTC12A decoder is not implemented.
../../../src/image.cpp(1515): BGFX WARN PTC14A decoder is not implemented.
../../../src/image.cpp(1520): BGFX WARN PTC22 decoder is not implemented.
../../../src/image.cpp(1525): BGFX WARN PTC24 decoder is not implemented.
vertexdecl 365a3f8c (365a3f8c), stride 24
attr 0 - Attrib::Position, num 3, type 3, norm 0, asint 0, offset 0
attr 7 - Attrib::TexCoord0, num 3, type 3, norm 0, asint 0, offset 12
../../../src/renderer_gl.cpp(990): BGFX program create: 9: 7, 8
../../../src/renderer_gl.cpp(1101): BGFX Program 9
../../../src/renderer_gl.cpp(1102): BGFX Attributes:
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_position is at location 1
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_texcoord0 is at location 0
../../../src/renderer_gl.cpp(1120): BGFX Uniforms:
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 0, size 1 ((nil)), offset 0
../../../src/renderer_gl.cpp(1166): BGFX store u_texCube 0xb1d45470
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_SAMPLER_CUBE u_texCube is at location 1, size 1 (0xb1d45470), offset 0
../../../src/renderer_gl.cpp(1193): BGFX attr a_position: 1
../../../src/renderer_gl.cpp(1193): BGFX attr a_texcoord0: 0
../../../src/renderer_gl.cpp(990): BGFX program create: 12: 10, 11
../../../src/renderer_gl.cpp(1101): BGFX Program 12
../../../src/renderer_gl.cpp(1102): BGFX Attributes:
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_position is at location 1
../../../src/renderer_gl.cpp(1113): BGFX GL_FLOAT_VEC3 a_texcoord0 is at location 0
../../../src/renderer_gl.cpp(1120): BGFX Uniforms:
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 0, size 1 ((nil)), offset 0
../../../src/renderer_gl.cpp(1143): BGFX Sampler 0 at 1.
../../../src/renderer_gl.cpp(1166): BGFX store u_texColor 0xb1d7f298
../../../src/renderer_gl.cpp(1178): BGFX uniform GL_SAMPLER_2D u_texColor is at location 1, size 1 (0xb1d7f298), offset 0
../../../src/renderer_gl.cpp(1193): BGFX attr a_position: 1
../../../src/renderer_gl.cpp(1193): BGFX attr a_texcoord0: 0
../../../src/bgfx.cpp(720): BGFX Shutdown...
../../../src/bgfx_p.h(1574): BGFX render thread exit
../../../src/bgfx.cpp(746): BGFX Shutdown complete.

drawstress benchmark limited by vsync

I took a look at the pnacl performance on Chrome and I think the benchmark needs some adjustment to show the performance because it is bound by vsync.

The block count seems to adjust up only when fps > 65fps, however Chrome is vsync locked to 60fps so this can't happen.

If the benchmark adjusted up when fps > 58 or so then it would rise until it was draw call bound.

Cheers,
Victor

Weird window resize behavior on a 4/3 screen.

Here is how to reproduce:
(It may have to do with screen ratio, I use a 4/3.)

Start any sample (e.g. cube)
Click on the bottom-left corner of the sample window to resize it.
Try to resize the window... (E.g. make it bigger vertically)

At some point (half a second for me) the window will move to the right very fast until it is not visible anymore.
Resizing from other corners also have some issues but less dramatic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.