Bgfx is a rendering library that supports Direct3D, Metal and OpenGL variants across 11 platforms and counting. It's easy to build and there are ma...
For further actions, you may consider blocking this person and/or reporting abuse
bgfx::VertexDeclhas been renamed tobgfx::VertexLayout.In order to use the
bgfx::setPlatformDatafunction, you also need to includebgfx/platform.hheader file.This line:
Should be
this returns null for me.
filePath ends up being "shaders/dx11/vs_cubes.binýýýý"
hard coding this to "shaders/dx11/vs_cubes.bin" results in no change despite the file being present...
Any idea why?
Because he uses memcpy, a null terminator never gets written to the end of the string. You need to allocate with "char* filePath = (char*)calloc(1, shaderLen + fileLen + 1);", then there will be a zero at the end of the string
I should have read this. I took me a good 10 minutes to figure out why I was segfaulting
In order to get bgfx to clear the screen, you also need to call
bgfx::touch(0)beforebgfx::frame().For platform compatibility, you also need to add
bgfx/include/compat/***to your include paths.For example, for Visual Studio 2012 and higher, add
bgfx/include/compat/msvcto your include paths.My program stops at "nULLER7" - dont mind the language its my native lang word
using Tdmgcc 9.2;
Sorry figured it out it was silly
For
FILE, andfopenfunction to compile, you also need to includecstdio.For
bx::Vec3you also need to includebx/math.h.Thanks for the great tutorial! I learned a lot about using bgfx!
its causes a LNK2019 error