gamedolphin / bgfx-sample Goto Github PK
View Code? Open in Web Editor NEWThe sample project that integrates bgfx on ubuntu.
Home Page: https://www.sandeepnambiar.com/getting-started-with-bgfx/
The sample project that integrates bgfx on ubuntu.
Home Page: https://www.sandeepnambiar.com/getting-started-with-bgfx/
Is bgfx-sample compatible with the current bgfx version from https://github.com/bkaradzic/bgfx repo?
Because after building bgfx (linux-debug64) I get this error when building the example:
$ make
./bgfx/.build/linux64_gcc/bin/shadercRelease \
-f v_simple.sc \
-o v_simple.bin \
--platform linux \
--type vertex \
--verbose \
-i bgfx/src
../../../tools/shaderc/shaderc.cpp(2448): depends: 0
../../../tools/shaderc/shaderc.cpp(2449): preprocessOnly: 0
../../../tools/shaderc/shaderc.cpp(2450): includeDir: bgfx/src
../../../tools/shaderc/shaderc_glsl.cpp(186): name: u_modelViewProj (type 4, num 1)
../../../tools/shaderc/shaderc_glsl.cpp(332): u_modelViewProj, vec4, 1, 0, 1
./bgfx/.build/linux64_gcc/bin/shadercRelease \
-f f_simple.sc \
-o f_simple.bin \
--platform linux \
--type fragment \
--verbose \
-i bgfx/src
../../../tools/shaderc/shaderc.cpp(2448): depends: 0
../../../tools/shaderc/shaderc.cpp(2449): preprocessOnly: 0
../../../tools/shaderc/shaderc.cpp(2450): includeDir: bgfx/src
g++ main.cpp -o main -w bgfx/.build/linux64_gcc/bin/libbgfxDebug.a -lSDL2 -lGL -lX11 -ldl -lpthread -lrt -Ibgfx/include -Ibx/include -Ibimg/include
main.cpp:47:16: error: ‘VertexDecl’ in namespace ‘bgfx’ does not name a type
static bgfx::VertexDecl ms_decl;
^~~~~~~~~~
main.cpp: In static member function ‘static void PosColorVertex::init()’:
main.cpp:40:5: error: ‘ms_decl’ was not declared in this scope
ms_decl
^~~~~~~
main.cpp: At global scope:
main.cpp:51:7: error: ‘VertexDecl’ in namespace ‘bgfx’ does not name a type
bgfx::VertexDecl PosColorVertex::ms_decl;
^~~~~~~~~~
main.cpp: In function ‘int main(int, char**)’:
main.cpp:110:52: error: ‘ms_decl’ is not a member of ‘PosColorVertex’
PosColorVertex::ms_decl
^~~~~~~
Makefile:16: recipe for target 'all' failed
when compiling the shader I see
./bgfx/.build/linux64_gcc/bin/shadercRelease \
-f src/v_simple.sc \
-o v_simple.bin \
--platform linux \
--type vertex \
--verbose \
-i bgfx/src
../../../tools/shaderc/shaderc.cpp(2639): depends: 0
../../../tools/shaderc/shaderc.cpp(2640): preprocessOnly: 0
../../../tools/shaderc/shaderc.cpp(2641): includeDir: bgfx/src
../../../tools/shaderc/shaderc_glsl.cpp(202): name: u_modelViewProj (type 4, num 1)
../../../tools/shaderc/shaderc_glsl.cpp(350): u_modelViewProj, vec4, 1, 0, 1
at runtime I see
../../../src/bgfx.cpp (526): BGFX VertexLayout e5deb59e (83649179), stride 16
../../../src/bgfx.cpp (542): BGFX attr 0: Attrib::Position num 3, type 4, norm [ ], asint [ ], offset 0
../../../src/bgfx.cpp (542): BGFX attr 4: Attrib::Color0 num 4, type 0, norm [x], asint [ ], offset 12
../../../src/renderer_vk.cpp (5281): BGFX Vertex Shader consts 1
../../../src/renderer_vk.cpp (5388): BGFX predefined: u_modelViewProj (mat4), r.index 0, r.count 1, r.texComponent 0, r.texDimension 0
../../../../bx/include/bx/inline/error.inl (70): BGFX CHECK Error: 33716322
Trace/breakpoint trap
my application just open then crash when try to run it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.