23#ifndef VCL_BGFX_IMGUI_IMGUI_SHADERS_H
24#define VCL_BGFX_IMGUI_IMGUI_SHADERS_H
26#include <vclib/bgfx/programs/load_program.h>
28#include <bgfx_imgui/fs_imgui_image.sc.glsl.bin.h>
29#include <bgfx_imgui/vs_imgui_image.sc.glsl.bin.h>
30#include <bgfx_imgui/fs_ocornut_imgui.sc.glsl.bin.h>
31#include <bgfx_imgui/vs_ocornut_imgui.sc.glsl.bin.h>
33#include <bgfx_imgui/fs_imgui_image.sc.essl.bin.h>
34#include <bgfx_imgui/vs_imgui_image.sc.essl.bin.h>
35#include <bgfx_imgui/fs_ocornut_imgui.sc.essl.bin.h>
36#include <bgfx_imgui/vs_ocornut_imgui.sc.essl.bin.h>
38#include <bgfx_imgui/fs_imgui_image.sc.spv.bin.h>
39#include <bgfx_imgui/vs_imgui_image.sc.spv.bin.h>
40#include <bgfx_imgui/fs_ocornut_imgui.sc.spv.bin.h>
41#include <bgfx_imgui/vs_ocornut_imgui.sc.spv.bin.h>
44#include <bgfx_imgui/fs_imgui_image.sc.dx11.bin.h>
45#include <bgfx_imgui/vs_imgui_image.sc.dx11.bin.h>
46#include <bgfx_imgui/fs_ocornut_imgui.sc.dx11.bin.h>
47#include <bgfx_imgui/vs_ocornut_imgui.sc.dx11.bin.h>
50#include <bgfx_imgui/fs_imgui_image.sc.mtl.bin.h>
51#include <bgfx_imgui/vs_imgui_image.sc.mtl.bin.h>
52#include <bgfx_imgui/fs_ocornut_imgui.sc.mtl.bin.h>
53#include <bgfx_imgui/vs_ocornut_imgui.sc.mtl.bin.h>
60 enum Enum {ORCONUT_IMGUI, IMGUI_IMAGE};
65bgfx::EmbeddedShader::Data vertOrconutImgui(bgfx::RendererType::Enum type)
68 case bgfx::RendererType::OpenGLES:
70 case bgfx::RendererType::OpenGL:
71 return {type, vs_ocornut_imgui_glsl,
sizeof(vs_ocornut_imgui_glsl)};
72 case bgfx::RendererType::Vulkan:
73 return {type, vs_ocornut_imgui_spv,
sizeof(vs_ocornut_imgui_spv)};
75 case bgfx::RendererType::Direct3D11:
76 return {type, vs_ocornut_imgui_dx11,
sizeof(vs_ocornut_imgui_dx11)};
77 case bgfx::RendererType::Direct3D12:
81 case bgfx::RendererType::Metal:
82 return {type, vs_ocornut_imgui_mtl,
sizeof(vs_ocornut_imgui_mtl)};
84 default:
return {type,
nullptr, 0};
88bgfx::EmbeddedShader::Data fragOrconutImgui(bgfx::RendererType::Enum type)
91 case bgfx::RendererType::OpenGLES:
92 return {type, fs_ocornut_imgui_essl,
sizeof(fs_ocornut_imgui_essl)};
93 case bgfx::RendererType::OpenGL:
94 return {type, fs_ocornut_imgui_glsl,
sizeof(fs_ocornut_imgui_glsl)};
95 case bgfx::RendererType::Vulkan:
96 return {type, fs_ocornut_imgui_spv,
sizeof(fs_ocornut_imgui_spv)};
98 case bgfx::RendererType::Direct3D11:
99 return {type, fs_ocornut_imgui_dx11,
sizeof(fs_ocornut_imgui_dx11)};
100 case bgfx::RendererType::Direct3D12:
104 case bgfx::RendererType::Metal:
105 return {type, fs_ocornut_imgui_mtl,
sizeof(fs_ocornut_imgui_mtl)};
107 default:
return {type,
nullptr, 0};
111bgfx::ProgramHandle loadOrconutImgui(bgfx::RendererType::Enum type)
113 return vcl::createProgram(
114 vcl::loadShader(vertOrconutImgui(type)),
115 vcl::loadShader(fragOrconutImgui(type)));
118bgfx::EmbeddedShader::Data vertImguiImage(bgfx::RendererType::Enum type)
121 case bgfx::RendererType::OpenGLES:
122 return {type, vs_imgui_image_essl,
sizeof(vs_imgui_image_essl)};
123 case bgfx::RendererType::OpenGL:
124 return {type, vs_imgui_image_glsl,
sizeof(vs_imgui_image_glsl)};
125 case bgfx::RendererType::Vulkan:
126 return {type, vs_imgui_image_spv,
sizeof(vs_imgui_image_spv)};
128 case bgfx::RendererType::Direct3D11:
129 return {type, vs_imgui_image_dx11,
sizeof(vs_imgui_image_dx11)};
130 case bgfx::RendererType::Direct3D12:
134 case bgfx::RendererType::Metal:
135 return {type, vs_imgui_image_mtl,
sizeof(vs_imgui_image_mtl)};
137 default:
return {type,
nullptr, 0};
141bgfx::EmbeddedShader::Data fragImguiImage(bgfx::RendererType::Enum type)
144 case bgfx::RendererType::OpenGLES:
145 return {type, fs_imgui_image_essl,
sizeof(fs_imgui_image_essl)};
146 case bgfx::RendererType::OpenGL:
147 return {type, fs_imgui_image_glsl,
sizeof(fs_imgui_image_glsl)};
148 case bgfx::RendererType::Vulkan:
149 return {type, fs_imgui_image_spv,
sizeof(fs_imgui_image_spv)};
151 case bgfx::RendererType::Direct3D11:
152 return {type, fs_imgui_image_dx11,
sizeof(fs_imgui_image_dx11)};
153 case bgfx::RendererType::Direct3D12:
157 case bgfx::RendererType::Metal:
158 return {type, fs_imgui_image_mtl,
sizeof(fs_imgui_image_mtl)};
160 default:
return {type,
nullptr, 0};
164bgfx::ProgramHandle loadImguiImage(bgfx::RendererType::Enum type)
166 return vcl::createProgram(
167 vcl::loadShader(vertImguiImage(type)),
168 vcl::loadShader(fragImguiImage(type)));
173bgfx::ProgramHandle loadProgram(ImGuiShaders::Enum program, bgfx::RendererType::Enum type)
176 case ImGuiShaders::ORCONUT_IMGUI:
177 return detail::loadOrconutImgui(type);
178 case ImGuiShaders::IMGUI_IMAGE:
179 return detail::loadImguiImage(type);
180 default:
return BGFX_INVALID_HANDLE;
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Definition imgui_shaders.h:59