Giter Club home page Giter Club logo

bgfx-sample's People

Contributors

gamedolphin avatar newbytee avatar q4a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

q4a franticware

bgfx-sample's Issues

issue compiling shaders

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

‘VertexDecl’ in namespace ‘bgfx’ does not name a type

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

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.