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
In order to use the
bgfx::setPlatformData
function, you also need to includebgfx/platform.h
header file.bgfx::VertexDecl
has been renamed tobgfx::VertexLayout
.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
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
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/msvc
to your include paths.For
bx::Vec3
you also need to includebx/math.h
.For
FILE
, andfopen
function to compile, you also need to includecstdio
.Thanks for the great tutorial! I learned a lot about using bgfx!
its causes a LNK2019 error