Skip to content

BGFX sample shaders and data

Pre-release
Pre-release
Compare
Choose a tag to compare
@q4a q4a released this 28 Jan 06:02
· 3 commits to bgfx-2022 since this release

This is old BGFX sample data. It's NOT full and missing 6 shaders:

    const bgfx::Memory *memPrimitiveVsh = shaderc::compileShader(shaderc::ST_VERTEX, "shaders/dx9/vs_primitive.sc");
    const bgfx::Memory *memPrimitiveFsh = shaderc::compileShader(shaderc::ST_FRAGMENT, "shaders/dx9/fs_primitive.sc");

    bgfx::ShaderHandle primitiveVsh = bgfx::createShader(memPrimitiveVsh);
    bgfx::ShaderHandle primitiveFsh = bgfx::createShader(memPrimitiveFsh);

    m_primitiveProg = bgfx::createProgram(primitiveVsh, primitiveFsh, true);

    const bgfx::Memory *memTexturedVsh = shaderc::compileShader(shaderc::ST_VERTEX, "shaders/dx9/vs_textured.sc");
    const bgfx::Memory *memTexturedFsh = shaderc::compileShader(shaderc::ST_FRAGMENT, "shaders/dx9/fs_textured.sc");

    bgfx::ShaderHandle texturedVsh = bgfx::createShader(memTexturedVsh);
    bgfx::ShaderHandle texturedFsh = bgfx::createShader(memTexturedFsh);

    m_texturedProg = bgfx::createProgram(texturedVsh, texturedFsh, true);

    const bgfx::Memory *memTexturedColorVsh = shaderc::compileShader(shaderc::ST_VERTEX, "shaders/dx9/vs_textured_color.sc");
    const bgfx::Memory *memTexturedColorFsh = shaderc::compileShader(shaderc::ST_FRAGMENT, "shaders/dx9/fs_textured_color.sc");