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...
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
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
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.In order to get bgfx to clear the screen, you also need to call
bgfx::touch(0)beforebgfx::frame().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
bx::Vec3you also need to includebx/math.h.For
FILE, andfopenfunction to compile, you also need to includecstdio.Thanks for the great tutorial! I learned a lot about using bgfx!
its causes a LNK2019 error