Vulkan renderer backend (#2564)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include <mbgl/shaders/shader_manifest.hpp>
|
||||
#if !MLN_RENDER_BACKEND_METAL
|
||||
#if MLN_RENDER_BACKEND_OPENGL
|
||||
#include <mbgl/gl/program.hpp>
|
||||
#endif
|
||||
|
||||
@@ -52,12 +52,16 @@ public:
|
||||
|
||||
std::unique_ptr<gfx::Program<Name>> program;
|
||||
|
||||
Program(const ProgramParameters& programParameters) {
|
||||
Program([[maybe_unused]] const ProgramParameters& programParameters) {
|
||||
switch (gfx::Backend::GetType()) {
|
||||
#if MLN_RENDER_BACKEND_METAL
|
||||
case gfx::Backend::Type::Metal: {
|
||||
break;
|
||||
}
|
||||
#elif MLN_RENDER_BACKEND_VULKAN
|
||||
case gfx::Backend::Type::Vulkan: {
|
||||
break;
|
||||
}
|
||||
#else // MLN_RENDER_BACKEND_OPENGL
|
||||
case gfx::Backend::Type::OpenGL: {
|
||||
program = std::make_unique<gl::Program<Name>>(programParameters.withDefaultSource(
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <array>
|
||||
|
||||
#include <mbgl/shaders/shader_manifest.hpp>
|
||||
#if !MLN_RENDER_BACKEND_METAL
|
||||
#if MLN_RENDER_BACKEND_OPENGL
|
||||
#include <mbgl/gl/program.hpp>
|
||||
#endif
|
||||
|
||||
@@ -261,9 +261,9 @@ public:
|
||||
|
||||
std::unique_ptr<gfx::Program<Name>> program;
|
||||
|
||||
SymbolProgram(const ProgramParameters& programParameters) {
|
||||
SymbolProgram([[maybe_unused]] const ProgramParameters& programParameters) {
|
||||
switch (gfx::Backend::GetType()) {
|
||||
#if !MLN_RENDER_BACKEND_METAL
|
||||
#if MLN_RENDER_BACKEND_OPENGL
|
||||
case gfx::Backend::Type::OpenGL: {
|
||||
program = std::make_unique<gl::Program<Name>>(programParameters.withDefaultSource(
|
||||
{gfx::Backend::Type::OpenGL,
|
||||
|
||||
Reference in New Issue
Block a user