3619 lines
188 KiB
Objective-C
3619 lines
188 KiB
Objective-C
#if defined(SOKOL_IMPL) && !defined(SOKOL_IMGUI_IMPL)
|
|
#define SOKOL_IMGUI_IMPL
|
|
#endif
|
|
#ifndef SOKOL_IMGUI_INCLUDED
|
|
/*
|
|
sokol_imgui.h -- drop-in Dear ImGui renderer/event-handler for sokol_gfx.h
|
|
|
|
Project URL: https://github.com/floooh/sokol
|
|
|
|
Do this:
|
|
#define SOKOL_IMPL or
|
|
#define SOKOL_IMGUI_IMPL
|
|
|
|
before you include this file in *one* C or C++ file to create the
|
|
implementation.
|
|
|
|
NOTE that the implementation can be compiled either as C++ or as C.
|
|
When compiled as C++, sokol_imgui.h will directly call into the
|
|
Dear ImGui C++ API. When compiled as C, sokol_imgui.h will call
|
|
cimgui.h functions instead.
|
|
|
|
NOTE that the formerly separate header sokol_cimgui.h has been
|
|
merged into sokol_imgui.h
|
|
|
|
The following defines are used by the implementation to select the
|
|
platform-specific embedded shader code (these are the same defines as
|
|
used by sokol_gfx.h and sokol_app.h):
|
|
|
|
SOKOL_GLCORE
|
|
SOKOL_GLES3
|
|
SOKOL_D3D11
|
|
SOKOL_METAL
|
|
SOKOL_WGPU
|
|
SOKOL_VULKAN
|
|
|
|
Optionally provide the following configuration define both before including the
|
|
the declaration and implementation:
|
|
|
|
SOKOL_IMGUI_NO_SOKOL_APP - don't depend on sokol_app.h (see below for details)
|
|
|
|
Optionally provide the following macros before including the implementation
|
|
to override defaults:
|
|
|
|
SOKOL_ASSERT(c) - your own assert macro (default: assert(c))
|
|
SOKOL_IMGUI_API_DECL- public function declaration prefix (default: extern)
|
|
SOKOL_API_DECL - same as SOKOL_IMGUI_API_DECL
|
|
SOKOL_API_IMPL - public function implementation prefix (default: -)
|
|
|
|
If sokol_imgui.h is compiled as a DLL, define the following before
|
|
including the declaration or implementation:
|
|
|
|
SOKOL_DLL
|
|
|
|
On Windows, SOKOL_DLL will define SOKOL_IMGUI_API_DECL as __declspec(dllexport)
|
|
or __declspec(dllimport) as needed.
|
|
|
|
Include the following headers before sokol_imgui.h (both before including
|
|
the declaration and implementation):
|
|
|
|
sokol_gfx.h
|
|
sokol_app.h (except SOKOL_IMGUI_NO_SOKOL_APP)
|
|
|
|
Additionally, include the following headers before including the
|
|
implementation:
|
|
|
|
If the implementation is compiled as C++:
|
|
imgui.h
|
|
|
|
If the implementation is compiled as C:
|
|
cimgui.h
|
|
|
|
When compiling as C, you can override the Dear ImGui C bindings prefix
|
|
via the define SOKOL_IMGUI_CPREFIX before including the sokol_imgui.h
|
|
implementation:
|
|
|
|
#define SOKOL_IMGUI_IMPL
|
|
#define SOKOL_IMGUI_CPREFIX ImGui_
|
|
#include "sokol_imgui.h"
|
|
|
|
Note that the default prefix is 'ig'.
|
|
|
|
|
|
FEATURE OVERVIEW:
|
|
=================
|
|
sokol_imgui.h implements the initialization, rendering and event-handling
|
|
code for Dear ImGui (https://github.com/ocornut/imgui) on top of
|
|
sokol_gfx.h and (optionally) sokol_app.h.
|
|
|
|
The sokol_app.h dependency is optional and used for input event handling.
|
|
If you only use sokol_gfx.h but not sokol_app.h in your application,
|
|
define SOKOL_IMGUI_NO_SOKOL_APP before including the implementation
|
|
of sokol_imgui.h, this will remove any dependency to sokol_app.h, but
|
|
you must feed input events into Dear ImGui yourself.
|
|
|
|
sokol_imgui.h is not thread-safe, all calls must be made from the
|
|
same thread where sokol_gfx.h is running.
|
|
|
|
HOWTO:
|
|
======
|
|
|
|
--- To initialize sokol-imgui, call:
|
|
|
|
simgui_setup(const simgui_desc_t* desc)
|
|
|
|
This will initialize Dear ImGui and create sokol-gfx resources
|
|
(two buffers for vertices and indices, a font texture and a pipeline-
|
|
state-object).
|
|
|
|
Use the following simgui_desc_t members to configure behaviour:
|
|
|
|
int max_vertices
|
|
The maximum number of vertices used for UI rendering, default is 65536.
|
|
sokol-imgui will use this to compute the size of the vertex-
|
|
and index-buffers allocated via sokol_gfx.h
|
|
|
|
sg_pixel_format color_format
|
|
The color pixel format of the render pass where the UI
|
|
will be rendered. The default (0) matches sokol_gfx.h's
|
|
default pass.
|
|
|
|
sg_pixel_format depth_format
|
|
The depth-buffer pixel format of the render pass where
|
|
the UI will be rendered. The default (0) matches
|
|
sokol_gfx.h's default pass depth format.
|
|
|
|
int sample_count
|
|
The MSAA sample-count of the render pass where the UI
|
|
will be rendered. The default (0) matches sokol_gfx.h's
|
|
default pass sample count.
|
|
|
|
const char* ini_filename
|
|
Sets this path as ImGui::GetIO().IniFilename where ImGui will store
|
|
and load UI persistency data. By default this is 0, so that Dear ImGui
|
|
will not preserve state between sessions (and also won't do
|
|
any filesystem calls). Also see the ImGui functions:
|
|
- LoadIniSettingsFromMemory()
|
|
- SaveIniSettingsFromMemory()
|
|
These functions give you explicit control over loading and saving
|
|
UI state while using your own filesystem wrapper functions (in this
|
|
case keep simgui_desc.ini_filename zero)
|
|
|
|
bool no_default_font
|
|
Set this to true if you don't want to use ImGui's default
|
|
font. In this case you need to initialize the font
|
|
yourself after simgui_setup() is called.
|
|
|
|
bool disable_paste_override
|
|
If set to true, sokol_imgui.h will not 'emulate' a Dear Imgui
|
|
clipboard paste action on SAPP_EVENTTYPE_CLIPBOARD_PASTED event.
|
|
This is mainly a hack/workaround to allow external workarounds
|
|
for making copy/paste work on the web platform. In general,
|
|
copy/paste support isn't properly fleshed out in sokol_imgui.h yet.
|
|
|
|
bool disable_set_mouse_cursor
|
|
If true, sokol_imgui.h will not control the mouse cursor type
|
|
by calling sapp_set_mouse_cursor().
|
|
|
|
bool disable_windows_resize_from_edges
|
|
If true, windows can only be resized from the bottom right corner.
|
|
The default is false, meaning windows can be resized from edges.
|
|
|
|
bool write_alpha_channel
|
|
Set this to true if you want alpha values written to the
|
|
framebuffer. By default this behavior is disabled to prevent
|
|
undesired behavior on platforms like the web where the canvas is
|
|
always alpha-blended with the background.
|
|
|
|
simgui_allocator_t allocator
|
|
Used to override memory allocation functions. See further below
|
|
for details.
|
|
|
|
simgui_logger_t logger
|
|
A user-provided logging callback. Note that without logging
|
|
callback, sokol-imgui will be completely silent!
|
|
See the section about ERROR REPORTING AND LOGGING below
|
|
for more details.
|
|
|
|
--- At the start of a frame, call:
|
|
|
|
simgui_new_frame(&(simgui_frame_desc_t){
|
|
.width = ...,
|
|
.height = ...,
|
|
.delta_time = ...,
|
|
.dpi_scale = ...
|
|
});
|
|
|
|
'width' and 'height' are the dimensions of the rendering surface,
|
|
passed to ImGui::GetIO().DisplaySize.
|
|
|
|
'delta_time' is the frame duration passed to ImGui::GetIO().DeltaTime.
|
|
|
|
'dpi_scale' is the current DPI scale factor, if this is left zero-initialized,
|
|
1.0f will be used instead. Typical values for dpi_scale are >= 1.0f.
|
|
|
|
For example, if you're using sokol_app.h and render to the default framebuffer:
|
|
|
|
simgui_new_frame(&(simgui_frame_desc_t){
|
|
.width = sapp_width(),
|
|
.height = sapp_height(),
|
|
.delta_time = sapp_frame_duration(),
|
|
.dpi_scale = sapp_dpi_scale()
|
|
});
|
|
|
|
--- at the end of the frame, before the sg_end_pass() where you
|
|
want to render the UI, call:
|
|
|
|
simgui_render()
|
|
|
|
This will first call ImGui::Render(), and then render ImGui's draw list
|
|
through sokol_gfx.h
|
|
|
|
--- if you're using sokol_app.h, from inside the sokol_app.h event callback,
|
|
call:
|
|
|
|
bool simgui_handle_event(const sapp_event* ev);
|
|
|
|
The return value is the value of ImGui::GetIO().WantCaptureKeyboard,
|
|
if this is true, you might want to skip keyboard input handling
|
|
in your own event handler.
|
|
|
|
If you want to use the ImGui functions for checking if a key is pressed
|
|
(e.g. ImGui::IsKeyPressed()) the following helper function to map
|
|
an sapp_keycode to an ImGuiKey value may be useful:
|
|
|
|
int simgui_map_keycode(sapp_keycode c);
|
|
|
|
Note that simgui_map_keycode() can be called outside simgui_setup()/simgui_shutdown().
|
|
|
|
--- finally, on application shutdown, call
|
|
|
|
simgui_shutdown()
|
|
|
|
ON ATTACHING YOUR OWN FONTS
|
|
===========================
|
|
Since Dear ImGui 1.92.0 using non-default fonts has been greatly simplified:
|
|
|
|
First, call `simgui_setup()` with the `.no_default_font` so that
|
|
sokol_imgui.h skips adding the default font.
|
|
|
|
...then simply call `AddFontDefault()` or `AddFontFromMemoryTTF()` on
|
|
the Dear ImGui IO object, everything else is taken care of automatically.
|
|
|
|
Specifically, do *NOT*:
|
|
- call the deprecated `GetTexDataAsRGBA32()` function
|
|
- create a sokol-gfx image object for the font atlas
|
|
- set the `Font->TexID` on the ImGui IO object
|
|
|
|
All those things are now handled inside sokol_imgui.h via a new 'texture update'
|
|
callback which is called by Dear ImGui whenever the state of the font atlas
|
|
texture changes.
|
|
|
|
ON USER-PROVIDED IMAGES AND SAMPLERS
|
|
====================================
|
|
To render your own images via ImGui::Image() you need to create a Dear ImGui
|
|
compatible texture handle (ImTextureID) from a sokol-gfx texture view handle
|
|
or optionally a texture view handle and a compatible sampler handle.
|
|
|
|
To create a ImTextureID from a sokol-gfx image handle, call:
|
|
|
|
sg_view tex_view = sg_make_view(&(sg_view_desc){ .texture_binding.image = img });
|
|
ImTextureID imtex_id = simgui_imtextureid(tex_view);
|
|
|
|
Since no sampler is provided, such a texture handle will use a default
|
|
sampler with nearest filtering and clamp-to-edge.
|
|
|
|
If you need to render with a different sampler, do this instead:
|
|
|
|
sg_view tex_view = ...;
|
|
sg_sampler smp = ...;
|
|
ImTextureID imtex_id = simgui_imtextureid_with_sampler(tex_img, smp);
|
|
|
|
You don't need to 'release' the ImTextureID handle, the ImTextureID
|
|
bits is simply a combination of the sg_view and sg_sampler bits.
|
|
|
|
Once you have constructed an ImTextureID handle via simgui_imtextureid()
|
|
or simgui_imtextureid_with_sampler(), it used in the ImGui::Image()
|
|
call like this:
|
|
|
|
ImGui::Image(imtex_id, ...);
|
|
|
|
To extract the sg_view and sg_sampler handle from an ImTextureID:
|
|
|
|
sg_view tex_view = simgui_texture_view_from_imtextureid(imtex_id);
|
|
sg_sampler smp = simgui_sampler_from_imtextureid(imtex_id);
|
|
|
|
...use the sokol-gfx function sg_query_view_image() if you need to
|
|
extract the texture view's image object:
|
|
|
|
sg_image img = sg_query_view_image(tex_view);
|
|
|
|
NOTE on C bindings since Dear ImGui 1.92.0:
|
|
|
|
Since Dear ImGui v1.92.0 the ImGui::Image function takes an
|
|
ImTextureRef object instead of ImTextureID. In C++ this doesn't
|
|
require a code change since the ImTextureRef is automatically constructed
|
|
from the ImTextureID.
|
|
|
|
In C this doesn't work and you need to explicitly create an
|
|
ImTextureRef struct, for instance:
|
|
|
|
igImage((ImTextureRef){ ._TexID = my_tex_id }, ...);
|
|
|
|
Currently Dear Bindings is missing a wrapper function for this,
|
|
also see: https://github.com/dearimgui/dear_bindings/issues/99
|
|
|
|
|
|
MEMORY ALLOCATION OVERRIDE
|
|
==========================
|
|
You can override the memory allocation functions at initialization time
|
|
like this:
|
|
|
|
void* my_alloc(size_t size, void* user_data) {
|
|
return malloc(size);
|
|
}
|
|
|
|
void my_free(void* ptr, void* user_data) {
|
|
free(ptr);
|
|
}
|
|
|
|
...
|
|
simgui_setup(&(simgui_desc_t){
|
|
// ...
|
|
.allocator = {
|
|
.alloc_fn = my_alloc,
|
|
.free_fn = my_free,
|
|
.user_data = ...;
|
|
}
|
|
});
|
|
...
|
|
|
|
If no overrides are provided, malloc and free will be used.
|
|
|
|
This only affects memory allocation calls done by sokol_imgui.h
|
|
itself though, not any allocations in Dear ImGui.
|
|
|
|
|
|
ERROR REPORTING AND LOGGING
|
|
===========================
|
|
To get any logging information at all you need to provide a logging callback in the setup call
|
|
the easiest way is to use sokol_log.h:
|
|
|
|
#include "sokol_log.h"
|
|
|
|
simgui_setup(&(simgui_desc_t){
|
|
.logger.func = slog_func
|
|
});
|
|
|
|
To override logging with your own callback, first write a logging function like this:
|
|
|
|
void my_log(const char* tag, // e.g. 'simgui'
|
|
uint32_t log_level, // 0=panic, 1=error, 2=warn, 3=info
|
|
uint32_t log_item_id, // SIMGUI_LOGITEM_*
|
|
const char* message_or_null, // a message string, may be nullptr in release mode
|
|
uint32_t line_nr, // line number in sokol_imgui.h
|
|
const char* filename_or_null, // source filename, may be nullptr in release mode
|
|
void* user_data)
|
|
{
|
|
...
|
|
}
|
|
|
|
...and then setup sokol-imgui like this:
|
|
|
|
simgui_setup(&(simgui_desc_t){
|
|
.logger = {
|
|
.func = my_log,
|
|
.user_data = my_user_data,
|
|
}
|
|
});
|
|
|
|
The provided logging function must be reentrant (e.g. be callable from
|
|
different threads).
|
|
|
|
If you don't want to provide your own custom logger it is highly recommended to use
|
|
the standard logger in sokol_log.h instead, otherwise you won't see any warnings or
|
|
errors.
|
|
|
|
|
|
IMGUI EVENT HANDLING
|
|
====================
|
|
You can call these functions from your platform's events to handle ImGui events
|
|
when SOKOL_IMGUI_NO_SOKOL_APP is defined.
|
|
|
|
E.g. mouse position events can be dispatched like this:
|
|
|
|
simgui_add_mouse_pos_event(100, 200);
|
|
|
|
For adding key events, you're responsible to map your own key codes to ImGuiKey
|
|
values and pass those as int:
|
|
|
|
simgui_add_key_event(imgui_key, true);
|
|
|
|
Take note that modifiers (shift, ctrl, etc.) must be updated manually.
|
|
|
|
If sokol_app is being used, ImGui events are handled for you.
|
|
|
|
|
|
LICENSE
|
|
=======
|
|
|
|
zlib/libpng license
|
|
|
|
Copyright (c) 2018 Andre Weissflog
|
|
|
|
This software is provided 'as-is', without any express or implied warranty.
|
|
In no event will the authors be held liable for any damages arising from the
|
|
use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software in a
|
|
product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not
|
|
be misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source
|
|
distribution.
|
|
*/
|
|
#define SOKOL_IMGUI_INCLUDED (1)
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h> // size_t
|
|
|
|
#if !defined(SOKOL_GFX_INCLUDED)
|
|
#error "Please include sokol_gfx.h before sokol_imgui.h"
|
|
#endif
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP) && !defined(SOKOL_APP_INCLUDED)
|
|
#error "Please include sokol_app.h before sokol_imgui.h"
|
|
#endif
|
|
|
|
#if defined(SOKOL_API_DECL) && !defined(SOKOL_IMGUI_API_DECL)
|
|
#define SOKOL_IMGUI_API_DECL SOKOL_API_DECL
|
|
#endif
|
|
#ifndef SOKOL_IMGUI_API_DECL
|
|
#if defined(_WIN32) && defined(SOKOL_DLL) && defined(SOKOL_IMGUI_IMPL)
|
|
#define SOKOL_IMGUI_API_DECL __declspec(dllexport)
|
|
#elif defined(_WIN32) && defined(SOKOL_DLL)
|
|
#define SOKOL_IMGUI_API_DECL __declspec(dllimport)
|
|
#else
|
|
#define SOKOL_IMGUI_API_DECL extern
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
simgui_log_item
|
|
|
|
An enum with a unique item for each log message, warning, error
|
|
and validation layer message.
|
|
*/
|
|
#define _SIMGUI_LOG_ITEMS \
|
|
_SIMGUI_LOGITEM_XMACRO(OK, "Ok") \
|
|
_SIMGUI_LOGITEM_XMACRO(MALLOC_FAILED, "memory allocation failed") \
|
|
_SIMGUI_LOGITEM_XMACRO(BUFFER_OVERFLOW, "internal vertex/index buffer overflow (increase simgui_desc_t.max_vertices)")
|
|
|
|
#define _SIMGUI_LOGITEM_XMACRO(item,msg) SIMGUI_LOGITEM_##item,
|
|
typedef enum simgui_log_item_t {
|
|
_SIMGUI_LOG_ITEMS
|
|
} simgui_log_item_t;
|
|
#undef _SIMGUI_LOGITEM_XMACRO
|
|
|
|
/*
|
|
simgui_allocator_t
|
|
|
|
Used in simgui_desc_t to provide custom memory-alloc and -free functions
|
|
to sokol_imgui.h. If memory management should be overridden, both the
|
|
alloc_fn and free_fn function must be provided (e.g. it's not valid to
|
|
override one function but not the other).
|
|
*/
|
|
typedef struct simgui_allocator_t {
|
|
void* (*alloc_fn)(size_t size, void* user_data);
|
|
void (*free_fn)(void* ptr, void* user_data);
|
|
void* user_data;
|
|
} simgui_allocator_t;
|
|
|
|
/*
|
|
simgui_logger
|
|
|
|
Used in simgui_desc_t to provide a logging function. Please be aware
|
|
that without logging function, sokol-imgui will be completely
|
|
silent, e.g. it will not report errors, warnings and
|
|
validation layer messages. For maximum error verbosity,
|
|
compile in debug mode (e.g. NDEBUG *not* defined) and install
|
|
a logger (for instance the standard logging function from sokol_log.h).
|
|
*/
|
|
typedef struct simgui_logger_t {
|
|
void (*func)(
|
|
const char* tag, // always "simgui"
|
|
uint32_t log_level, // 0=panic, 1=error, 2=warning, 3=info
|
|
uint32_t log_item_id, // SIMGUI_LOGITEM_*
|
|
const char* message_or_null, // a message string, may be nullptr in release mode
|
|
uint32_t line_nr, // line number in sokol_imgui.h
|
|
const char* filename_or_null, // source filename, may be nullptr in release mode
|
|
void* user_data);
|
|
void* user_data;
|
|
} simgui_logger_t;
|
|
|
|
typedef struct simgui_desc_t {
|
|
int max_vertices; // default: 65536
|
|
sg_pixel_format color_format;
|
|
sg_pixel_format depth_format;
|
|
int sample_count;
|
|
const char* ini_filename;
|
|
bool no_default_font;
|
|
bool disable_paste_override; // if true, don't send Ctrl-V on EVENTTYPE_CLIPBOARD_PASTED
|
|
bool disable_set_mouse_cursor; // if true, don't control the mouse cursor type via sapp_set_mouse_cursor()
|
|
bool disable_windows_resize_from_edges; // if true, only resize edges from the bottom right corner
|
|
bool write_alpha_channel; // if true, alpha values get written into the framebuffer
|
|
simgui_allocator_t allocator; // optional memory allocation overrides (default: malloc/free)
|
|
simgui_logger_t logger; // optional log function override
|
|
} simgui_desc_t;
|
|
|
|
typedef struct simgui_frame_desc_t {
|
|
int width;
|
|
int height;
|
|
double delta_time;
|
|
float dpi_scale;
|
|
} simgui_frame_desc_t;
|
|
|
|
typedef struct simgui_font_tex_desc_t {
|
|
sg_filter min_filter;
|
|
sg_filter mag_filter;
|
|
} simgui_font_tex_desc_t;
|
|
|
|
SOKOL_IMGUI_API_DECL void simgui_setup(const simgui_desc_t* desc);
|
|
SOKOL_IMGUI_API_DECL void simgui_new_frame(const simgui_frame_desc_t* desc);
|
|
SOKOL_IMGUI_API_DECL void simgui_render(void);
|
|
|
|
SOKOL_IMGUI_API_DECL uint64_t simgui_imtextureid(sg_view tex_view);
|
|
SOKOL_IMGUI_API_DECL uint64_t simgui_imtextureid_with_sampler(sg_view tex_view, sg_sampler smp);
|
|
SOKOL_IMGUI_API_DECL sg_view simgui_texture_view_from_imtextureid(uint64_t imtex_id);
|
|
SOKOL_IMGUI_API_DECL sg_sampler simgui_sampler_from_imtextureid(uint64_t imtex_id);
|
|
|
|
SOKOL_IMGUI_API_DECL void simgui_add_focus_event(bool focus);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_mouse_pos_event(float x, float y);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_touch_pos_event(float x, float y);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_mouse_button_event(int mouse_button, bool down);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_mouse_wheel_event(float wheel_x, float wheel_y);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_key_event(int imgui_key, bool down);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_input_character(uint32_t c);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_input_characters_utf8(const char* c);
|
|
SOKOL_IMGUI_API_DECL void simgui_add_touch_button_event(int mouse_button, bool down);
|
|
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
SOKOL_IMGUI_API_DECL bool simgui_handle_event(const sapp_event* ev);
|
|
SOKOL_IMGUI_API_DECL int simgui_map_keycode(sapp_keycode keycode); // returns ImGuiKey_*
|
|
#endif
|
|
SOKOL_IMGUI_API_DECL void simgui_shutdown(void);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
|
|
// reference-based equivalents for C++
|
|
inline void simgui_setup(const simgui_desc_t& desc) { return simgui_setup(&desc); }
|
|
inline void simgui_new_frame(const simgui_frame_desc_t& desc) { return simgui_new_frame(&desc); }
|
|
|
|
#endif
|
|
#endif /* SOKOL_IMGUI_INCLUDED */
|
|
|
|
//-- IMPLEMENTATION ------------------------------------------------------------
|
|
#ifdef SOKOL_IMGUI_IMPL
|
|
#define SOKOL_IMGUI_IMPL_INCLUDED (1)
|
|
|
|
#ifndef SOKOL_IMGUI_CPREFIX
|
|
#define SOKOL_IMGUI_CPREFIX ig
|
|
#endif
|
|
#define _SIMGUI_CONCAT2(prefix, name) prefix ## name
|
|
#define _SIMGUI_CONCAT(prefix, name) _SIMGUI_CONCAT2(prefix, name)
|
|
#define _SIMGUI_CFUNC(name) _SIMGUI_CONCAT(SOKOL_IMGUI_CPREFIX, name)
|
|
|
|
#if defined(SOKOL_MALLOC) || defined(SOKOL_CALLOC) || defined(SOKOL_FREE)
|
|
#error "SOKOL_MALLOC/CALLOC/FREE macros are no longer supported, please use simgui_desc_t.allocator to override memory allocation functions"
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
|
#if !defined(IMGUI_VERSION)
|
|
#error "Please include imgui.h before the sokol_imgui.h implementation"
|
|
#endif
|
|
#else
|
|
#if !defined(CIMGUI_API)
|
|
#error "Please include cimgui.h before the sokol_imgui.h implementation"
|
|
#endif
|
|
#endif
|
|
|
|
#include <string.h> // memset
|
|
#include <stdlib.h> // malloc/free
|
|
|
|
#if defined(__EMSCRIPTEN__) && !defined(SOKOL_DUMMY_BACKEND)
|
|
#include <emscripten.h>
|
|
#endif
|
|
|
|
#ifndef SOKOL_API_IMPL
|
|
#define SOKOL_API_IMPL
|
|
#endif
|
|
#ifndef SOKOL_DEBUG
|
|
#ifndef NDEBUG
|
|
#define SOKOL_DEBUG
|
|
#endif
|
|
#endif
|
|
#ifndef SOKOL_ASSERT
|
|
#include <assert.h>
|
|
#define SOKOL_ASSERT(c) assert(c)
|
|
#endif
|
|
#ifndef _SOKOL_PRIVATE
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
#define _SOKOL_PRIVATE __attribute__((unused)) static
|
|
#else
|
|
#define _SOKOL_PRIVATE static
|
|
#endif
|
|
#endif
|
|
|
|
#define _SIMGUI_INIT_COOKIE (0xBABEBABE)
|
|
|
|
// helper macros and constants
|
|
#define _simgui_def(val, def) (((val) == 0) ? (def) : (val))
|
|
|
|
// collisions with X11 headers
|
|
#if defined(Status)
|
|
#undef Status
|
|
#endif
|
|
|
|
typedef struct {
|
|
ImVec2 disp_size;
|
|
uint8_t _pad_8[8];
|
|
} _simgui_vs_params_t;
|
|
|
|
typedef struct {
|
|
uint32_t init_cookie;
|
|
simgui_desc_t desc;
|
|
float cur_dpi_scale;
|
|
sg_buffer vbuf;
|
|
sg_buffer ibuf;
|
|
sg_sampler def_smp; // used as default sampler for user images
|
|
sg_shader def_shd;
|
|
sg_pipeline def_pip;
|
|
// separate shader and pipeline for unfilterable user images
|
|
sg_shader shd_unfilterable;
|
|
sg_pipeline pip_unfilterable;
|
|
sg_range vertices;
|
|
sg_range indices;
|
|
bool is_osx;
|
|
} _simgui_state_t;
|
|
static _simgui_state_t _simgui;
|
|
|
|
/*
|
|
Embedded source code compiled with:
|
|
|
|
sokol-shdc -i simgui.glsl -o simgui.h -l glsl410:glsl300es:hlsl4:metal_macos:metal_ios:metal_sim:wgsl -b
|
|
|
|
(not that for Metal and D3D11 byte code, sokol-shdc must be run
|
|
on macOS and Windows)
|
|
|
|
@vs vs
|
|
layout(binding=0) uniform vs_params {
|
|
vec2 disp_size;
|
|
};
|
|
in vec2 position;
|
|
in vec2 texcoord0;
|
|
in vec4 color0;
|
|
out vec2 uv;
|
|
out vec4 color;
|
|
void main() {
|
|
gl_Position = vec4(((position/disp_size)-0.5)*vec2(2.0,-2.0), 0.5, 1.0);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
}
|
|
@end
|
|
|
|
@fs fs
|
|
layout(binding=0) uniform texture2D tex;
|
|
layout(binding=0) uniform sampler smp;
|
|
in vec2 uv;
|
|
in vec4 color;
|
|
out vec4 frag_color;
|
|
void main() {
|
|
frag_color = texture(sampler2D(tex, smp), uv) * color;
|
|
}
|
|
@end
|
|
|
|
@program simgui vs fs
|
|
*/
|
|
#if defined(SOKOL_GLCORE)
|
|
/*
|
|
#version 410
|
|
|
|
uniform vec4 vs_params[1];
|
|
layout(location = 0) in vec2 position;
|
|
layout(location = 0) out vec2 uv;
|
|
layout(location = 1) in vec2 texcoord0;
|
|
layout(location = 1) out vec4 color;
|
|
layout(location = 2) in vec4 color0;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(((position / vs_params[0].xy) - vec2(0.5)) * vec2(2.0, -2.0), 0.5, 1.0);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_source_glsl410[383] = {
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,0x5f,0x70,0x61,
|
|
0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,
|
|
0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,
|
|
0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x6f,
|
|
0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x2f,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
|
|
0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x30,
|
|
0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x32,0x28,0x32,0x2e,0x30,0x2c,
|
|
0x20,0x2d,0x32,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,
|
|
0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
};
|
|
/*
|
|
#version 410
|
|
|
|
uniform sampler2D tex_smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 0) in vec2 uv;
|
|
layout(location = 1) in vec4 color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = texture(tex_smp, uv) * color;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_source_glsl410[219] = {
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
|
|
0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
|
|
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,
|
|
0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
|
|
0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
};
|
|
#elif defined(SOKOL_GLES3)
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 vs_params[1];
|
|
layout(location = 0) in vec2 position;
|
|
out vec2 uv;
|
|
layout(location = 1) in vec2 texcoord0;
|
|
out vec4 color;
|
|
layout(location = 2) in vec4 color0;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(((position / vs_params[0].xy) - vec2(0.5)) * vec2(2.0, -2.0), 0.5, 1.0);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_source_glsl300es[344] = {
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
|
|
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
|
|
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,
|
|
0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
|
|
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x28,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2f,0x20,
|
|
0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x29,
|
|
0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x32,0x2e,0x30,0x2c,0x20,0x2d,0x32,0x2e,0x30,0x29,0x2c,
|
|
0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
};
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
uniform highp sampler2D tex_smp;
|
|
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
in highp vec2 uv;
|
|
in highp vec4 color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = texture(tex_smp, uv) * color;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_source_glsl300es[250] = {
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b,0x0a,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,
|
|
0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
};
|
|
#elif defined(SOKOL_METAL)
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct vs_params
|
|
{
|
|
float2 disp_size;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 position [[attribute(0)]];
|
|
float2 texcoord0 [[attribute(1)]];
|
|
float4 color0 [[attribute(2)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _22 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.gl_Position = float4(((in.position / _22.disp_size) - float2(0.5)) * float2(2.0, -2.0), 0.5, 1.0);
|
|
out.uv = in.texcoord0;
|
|
out.color = in.color0;
|
|
return out;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_bytecode_metal_macos[3116] = {
|
|
0x4d,0x54,0x4c,0x42,0x01,0x80,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x2c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x20,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,
|
|
0x4e,0x41,0x4d,0x45,0x06,0x00,0x6d,0x61,0x69,0x6e,0x30,0x00,0x54,0x59,0x50,0x45,
|
|
0x01,0x00,0x00,0x48,0x41,0x53,0x48,0x20,0x00,0x6c,0xc6,0xce,0x18,0x4d,0xb5,0xf9,
|
|
0xae,0x57,0x9c,0x34,0x76,0x94,0x96,0x17,0x9a,0x2d,0xca,0x04,0xbe,0xda,0x39,0x87,
|
|
0xd4,0x9d,0x6e,0x8c,0x73,0xe8,0x15,0x57,0xa2,0x4f,0x46,0x46,0x54,0x18,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x45,0x52,0x53,0x08,0x00,0x01,0x00,0x08,
|
|
0x00,0x01,0x00,0x01,0x00,0x45,0x4e,0x44,0x54,0x37,0x00,0x00,0x00,0x56,0x41,0x54,
|
|
0x54,0x22,0x00,0x03,0x00,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x00,0x80,
|
|
0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x00,0x01,0x80,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x00,0x02,0x80,0x56,0x41,0x54,0x59,0x05,0x00,0x03,0x00,0x04,0x04,0x06,
|
|
0x45,0x4e,0x44,0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,0x54,0xde,0xc0,0x17,0x0b,
|
|
0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x08,0x0b,0x00,0x00,0xff,0xff,0xff,0xff,
|
|
0x42,0x43,0xc0,0xde,0x21,0x0c,0x00,0x00,0xbf,0x02,0x00,0x00,0x0b,0x82,0x20,0x00,
|
|
0x02,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91,0x41,0xc8,0x04,0x49,
|
|
0x06,0x10,0x32,0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19,0x1e,0x04,0x8b,0x62,
|
|
0x80,0x10,0x45,0x02,0x42,0x92,0x0b,0x42,0x84,0x10,0x32,0x14,0x38,0x08,0x18,0x49,
|
|
0x0a,0x32,0x44,0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80,0x0c,0x19,0x21,0x72,
|
|
0x24,0x07,0xc8,0x08,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0,0x01,0x00,0x00,0x00,
|
|
0x51,0x18,0x00,0x00,0x68,0x00,0x00,0x00,0x1b,0x7e,0x24,0xf8,0xff,0xff,0xff,0xff,
|
|
0x01,0x90,0x00,0x8a,0x08,0x07,0x78,0x80,0x07,0x79,0x78,0x07,0x7c,0x68,0x03,0x73,
|
|
0xa8,0x07,0x77,0x18,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,0x08,0x07,0x7a,0x40,
|
|
0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xda,0x21,0x1d,0xdc,0xa1,0x0d,0xd8,
|
|
0xa1,0x1c,0xce,0x21,0x1c,0xd8,0xa1,0x0d,0xec,0xa1,0x1c,0xc6,0x81,0x1e,0xde,0x41,
|
|
0x1e,0xda,0xe0,0x1e,0xd2,0x81,0x1c,0xe8,0x01,0x1d,0x80,0x38,0x90,0x03,0x3c,0x00,
|
|
0x06,0x77,0x78,0x87,0x36,0x10,0x87,0x7a,0x48,0x07,0x76,0xa0,0x87,0x74,0x70,0x87,
|
|
0x79,0x00,0x08,0x77,0x78,0x87,0x36,0x30,0x07,0x79,0x08,0x87,0x76,0x28,0x87,0x36,
|
|
0x80,0x87,0x77,0x48,0x07,0x77,0xa0,0x87,0x72,0x90,0x87,0x36,0x28,0x07,0x76,0x48,
|
|
0x87,0x76,0x00,0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,0xde,0xa1,0x0d,0xcc,
|
|
0x41,0x1e,0xc2,0xa1,0x1d,0xca,0xa1,0x0d,0xe0,0xe1,0x1d,0xd2,0xc1,0x1d,0xe8,0xa1,
|
|
0x1c,0xe4,0xa1,0x0d,0xca,0x81,0x1d,0xd2,0xa1,0x1d,0xda,0xc0,0x1d,0xde,0xc1,0x1d,
|
|
0xda,0x80,0x1d,0xca,0x21,0x1c,0xcc,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,0x00,0x08,
|
|
0x77,0x78,0x87,0x36,0x48,0x07,0x77,0x30,0x87,0x79,0x68,0x03,0x73,0x80,0x87,0x36,
|
|
0x68,0x87,0x70,0xa0,0x07,0x74,0x00,0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,
|
|
0xde,0xa1,0x0d,0xdc,0x21,0x1c,0xdc,0x61,0x1e,0xda,0xc0,0x1c,0xe0,0xa1,0x0d,0xda,
|
|
0x21,0x1c,0xe8,0x01,0x1d,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x70,0x87,0x77,
|
|
0x68,0x83,0x79,0x48,0x87,0x73,0x70,0x87,0x72,0x20,0x87,0x36,0xd0,0x87,0x72,0x90,
|
|
0x87,0x77,0x98,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,0x08,0x07,0x7a,0x40,0x07,
|
|
0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,0xda,0x80,0x1e,0xe4,0x21,
|
|
0x1c,0xe0,0x01,0x1e,0xd2,0xc1,0x1d,0xce,0xa1,0x0d,0xda,0x21,0x1c,0xe8,0x01,0x1d,
|
|
0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x98,0x07,0x7a,0x08,0x87,0x71,0x58,0x87,
|
|
0x36,0x80,0x07,0x79,0x78,0x07,0x7a,0x28,0x87,0x71,0xa0,0x87,0x77,0x90,0x87,0x36,
|
|
0x10,0x87,0x7a,0x30,0x07,0x73,0x28,0x07,0x79,0x68,0x83,0x79,0x48,0x07,0x7d,0x28,
|
|
0x07,0x00,0x0f,0x00,0xa2,0x1e,0xdc,0x61,0x1e,0xc2,0xc1,0x1c,0xca,0xa1,0x0d,0xcc,
|
|
0x01,0x1e,0xda,0xa0,0x1d,0xc2,0x81,0x1e,0xd0,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,
|
|
0x00,0x36,0x18,0x02,0x01,0x2c,0x40,0x05,0x49,0x18,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x13,0x84,0x40,0x00,0x89,0x20,0x00,0x00,0x16,0x00,0x00,0x00,0x32,0x22,0x08,0x09,
|
|
0x20,0x64,0x85,0x04,0x13,0x22,0xa4,0x84,0x04,0x13,0x22,0xe3,0x84,0xa1,0x90,0x14,
|
|
0x12,0x4c,0x88,0x8c,0x0b,0x84,0x84,0x4c,0x10,0x3c,0x33,0x00,0xc3,0x08,0x02,0x30,
|
|
0x8c,0x40,0x00,0x76,0x08,0x91,0x83,0xa4,0x29,0xa2,0x84,0xc9,0xaf,0xa4,0xff,0x01,
|
|
0x22,0x80,0x91,0x50,0x10,0x83,0x08,0x84,0x50,0x8a,0x89,0x90,0x22,0x1b,0x08,0x98,
|
|
0x23,0x00,0x83,0x14,0xc8,0x39,0x02,0x50,0x18,0x44,0x08,0x84,0x61,0x04,0x22,0x19,
|
|
0x01,0x00,0x00,0x00,0x13,0xb2,0x70,0x48,0x07,0x79,0xb0,0x03,0x3a,0x68,0x83,0x70,
|
|
0x80,0x07,0x78,0x60,0x87,0x72,0x68,0x83,0x76,0x08,0x87,0x71,0x78,0x87,0x79,0xc0,
|
|
0x87,0x38,0x80,0x03,0x37,0x88,0x83,0x38,0x70,0x03,0x38,0xd8,0x70,0x1b,0xe5,0xd0,
|
|
0x06,0xf0,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,
|
|
0x6d,0x90,0x0e,0x71,0xa0,0x07,0x78,0xa0,0x07,0x78,0xd0,0x06,0xe9,0x80,0x07,0x7a,
|
|
0x80,0x07,0x7a,0x80,0x07,0x6d,0x90,0x0e,0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xa0,
|
|
0x07,0x71,0x60,0x07,0x6d,0x90,0x0e,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,
|
|
0x73,0x20,0x07,0x6d,0x90,0x0e,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,
|
|
0x40,0x07,0x6d,0x60,0x0e,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,
|
|
0x07,0x6d,0x60,0x0e,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,
|
|
0x6d,0x60,0x0f,0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x6d,
|
|
0x60,0x0f,0x72,0x40,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x6d,0x60,
|
|
0x0f,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x6d,0x60,0x0f,
|
|
0x74,0x80,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x6d,0x60,0x0f,0x76,
|
|
0x40,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x6d,0x60,0x0f,0x79,0x60,
|
|
0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x6d,0x60,0x0f,
|
|
0x71,0x20,0x07,0x78,0xa0,0x07,0x71,0x20,0x07,0x78,0xa0,0x07,0x71,0x20,0x07,0x78,
|
|
0xd0,0x06,0xf6,0x10,0x07,0x79,0x20,0x07,0x7a,0x20,0x07,0x75,0x60,0x07,0x7a,0x20,
|
|
0x07,0x75,0x60,0x07,0x6d,0x60,0x0f,0x72,0x50,0x07,0x76,0xa0,0x07,0x72,0x50,0x07,
|
|
0x76,0xa0,0x07,0x72,0x50,0x07,0x76,0xd0,0x06,0xf6,0x50,0x07,0x71,0x20,0x07,0x7a,
|
|
0x50,0x07,0x71,0x20,0x07,0x7a,0x50,0x07,0x71,0x20,0x07,0x6d,0x60,0x0f,0x71,0x00,
|
|
0x07,0x72,0x40,0x07,0x7a,0x10,0x07,0x70,0x20,0x07,0x74,0xa0,0x07,0x71,0x00,0x07,
|
|
0x72,0x40,0x07,0x6d,0xe0,0x0e,0x78,0xa0,0x07,0x71,0x60,0x07,0x7a,0x30,0x07,0x72,
|
|
0x30,0x84,0x39,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0xc8,0x02,0x01,0x00,0x00,
|
|
0x09,0x00,0x00,0x00,0x32,0x1e,0x98,0x10,0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,0x47,
|
|
0xc6,0x04,0x43,0xca,0x12,0x18,0x01,0x28,0x88,0x22,0x28,0x84,0x32,0xa0,0x1d,0x01,
|
|
0x20,0x1d,0x4b,0x78,0x00,0x00,0x00,0x00,0x79,0x18,0x00,0x00,0xe9,0x00,0x00,0x00,
|
|
0x1a,0x03,0x4c,0x10,0x97,0x29,0xa2,0x25,0x10,0xab,0x32,0xb9,0xb9,0xb4,0x37,0xb7,
|
|
0x21,0x46,0x42,0x20,0x80,0x82,0x50,0xb9,0x1b,0x43,0x0b,0x93,0xfb,0x9a,0x4b,0xd3,
|
|
0x2b,0x1b,0x62,0x24,0x01,0x22,0x24,0x05,0xe3,0x20,0x08,0x0e,0x8e,0xad,0x0c,0xa4,
|
|
0xad,0x8c,0x2e,0x8c,0x0d,0xc4,0xae,0x4c,0x6e,0x2e,0xed,0xcd,0x0d,0x64,0x46,0x06,
|
|
0x46,0x66,0xc6,0x65,0x66,0xa6,0x06,0x04,0xa5,0xad,0x8c,0x2e,0x8c,0xcd,0xac,0xac,
|
|
0x65,0x46,0x06,0x46,0x66,0xc6,0x65,0x66,0xa6,0x26,0x65,0x88,0x80,0x10,0x43,0x8c,
|
|
0x24,0x48,0x86,0x44,0x60,0xd1,0x54,0x46,0x17,0xc6,0x36,0x04,0x41,0x8e,0x24,0x48,
|
|
0x82,0x44,0xe0,0x16,0x96,0x26,0xe7,0x32,0xf6,0xd6,0x06,0x97,0xc6,0x56,0xe6,0x42,
|
|
0x56,0xe6,0xf6,0x26,0xd7,0x36,0xf7,0x45,0x96,0x36,0x17,0x26,0xc6,0x56,0x36,0x44,
|
|
0x40,0x12,0x72,0x61,0x69,0x72,0x2e,0x63,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x2e,0x66,
|
|
0x61,0x73,0x74,0x5f,0x6d,0x61,0x74,0x68,0x5f,0x65,0x6e,0x61,0x62,0x6c,0x65,0x43,
|
|
0x04,0x64,0x61,0x19,0x84,0xa5,0xc9,0xb9,0x8c,0xbd,0xb5,0xc1,0xa5,0xb1,0x95,0xb9,
|
|
0x98,0xc9,0x85,0xb5,0x95,0x89,0xd5,0x99,0x99,0x95,0xc9,0x7d,0x99,0x95,0xd1,0x8d,
|
|
0xa1,0x7d,0x91,0xa5,0xcd,0x85,0x89,0xb1,0x95,0x0d,0x11,0x90,0x86,0x51,0x58,0x9a,
|
|
0x9c,0x8b,0x5d,0x99,0x1c,0x5d,0x19,0xde,0xd7,0x5b,0x1d,0x1d,0x5c,0x1d,0x1d,0x97,
|
|
0xba,0xb9,0x32,0x39,0x14,0xb6,0xb7,0x31,0x37,0x98,0x14,0x46,0x61,0x69,0x72,0x2e,
|
|
0x61,0x72,0x67,0x5f,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x34,0xcc,0xd8,
|
|
0xde,0xc2,0xe8,0x64,0xc8,0x84,0xa5,0xc9,0xb9,0x84,0xc9,0x9d,0x7d,0xb9,0x85,0xb5,
|
|
0x95,0x51,0xa8,0xb3,0x1b,0xc2,0x20,0x0f,0x02,0x21,0x11,0x22,0x21,0x13,0x42,0x71,
|
|
0xa9,0x9b,0x2b,0x93,0x43,0x61,0x7b,0x1b,0x73,0x8b,0x49,0xa1,0x61,0xc6,0xf6,0x16,
|
|
0x46,0x47,0xc3,0x62,0xec,0x8d,0xed,0x4d,0x6e,0x08,0x83,0x3c,0x88,0x85,0x44,0xc8,
|
|
0x85,0x4c,0x08,0x46,0x26,0x2c,0x4d,0xce,0x05,0xee,0x6d,0x2e,0x8d,0x2e,0xed,0xcd,
|
|
0x8d,0xcb,0x19,0xdb,0x17,0xd4,0xdb,0x5c,0x1a,0x5d,0xda,0x9b,0xdb,0x10,0x05,0xd1,
|
|
0x90,0x08,0xb9,0x90,0x09,0xd9,0x86,0x18,0x48,0x85,0x64,0x08,0x47,0x28,0x2c,0x4d,
|
|
0xce,0xc5,0xae,0x4c,0x8e,0xae,0x0c,0xef,0x2b,0xcd,0x0d,0xae,0x8e,0x8e,0x52,0x58,
|
|
0x9a,0x9c,0x0b,0xdb,0xdb,0x58,0x18,0x5d,0xda,0x9b,0xdb,0x57,0x9a,0x1b,0x59,0x19,
|
|
0x1e,0xbd,0xb3,0x32,0xb7,0x32,0xb9,0x30,0xba,0x32,0x32,0x94,0xaf,0xaf,0xb0,0x34,
|
|
0xb9,0x2f,0x38,0xb6,0xb0,0xb1,0x32,0xb4,0x37,0x36,0xb2,0x32,0xb9,0xaf,0xaf,0x14,
|
|
0x22,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x43,0xa8,0x44,0x40,0x3c,0xe4,0x4b,
|
|
0x84,0x24,0x40,0xc0,0x00,0x89,0x10,0x09,0x99,0x90,0x30,0x60,0x42,0x57,0x86,0x37,
|
|
0xf6,0xf6,0x26,0x47,0x06,0x33,0x84,0x4a,0x02,0xc4,0x43,0xbe,0x24,0x48,0x02,0x04,
|
|
0x0c,0x90,0x08,0x91,0x90,0x09,0x19,0x03,0x1a,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x43,
|
|
0xa8,0x84,0x40,0x3c,0xe4,0x4b,0x88,0x24,0x40,0xc0,0x00,0x89,0x90,0x0b,0x99,0x90,
|
|
0x32,0xa0,0x12,0x96,0x26,0xe7,0x22,0x56,0x67,0x66,0x56,0x26,0xc7,0x27,0x2c,0x4d,
|
|
0xce,0x45,0xac,0xce,0xcc,0xac,0x4c,0xee,0x6b,0x2e,0x4d,0xaf,0x8c,0x48,0x58,0x9a,
|
|
0x9c,0x8b,0x5c,0x59,0x18,0x19,0xa9,0xb0,0x34,0x39,0x97,0x39,0x3a,0xb9,0xba,0x31,
|
|
0xba,0x2f,0xba,0x3c,0xb8,0xb2,0xaf,0x34,0x37,0xb3,0x37,0x26,0x64,0x69,0x73,0x70,
|
|
0x5f,0x73,0x69,0x7a,0x65,0x43,0x94,0x44,0x48,0x86,0x44,0x40,0x24,0x64,0x0d,0x18,
|
|
0x85,0xa5,0xc9,0xb9,0x84,0xc9,0x9d,0x7d,0xd1,0xe5,0xc1,0x95,0x7d,0xcd,0xa5,0xe9,
|
|
0x95,0xf1,0x0a,0x4b,0x93,0x73,0x09,0x93,0x3b,0xfb,0xa2,0xcb,0x83,0x2b,0xfb,0x0a,
|
|
0x63,0x4b,0x3b,0x73,0xfb,0x9a,0x4b,0xd3,0x2b,0x63,0x62,0x37,0xf7,0x05,0x17,0x26,
|
|
0x17,0xd6,0x36,0xc7,0xe1,0x4b,0x46,0x66,0x08,0x19,0x24,0x06,0x72,0x06,0x08,0x1a,
|
|
0x24,0x03,0xf2,0x25,0x42,0x12,0x20,0x69,0x80,0xa8,0x01,0xc2,0x06,0x48,0x1b,0x24,
|
|
0x03,0xe2,0x06,0xc9,0x80,0x44,0xc8,0x1b,0x20,0x13,0x02,0x07,0x43,0x10,0x44,0x0c,
|
|
0x10,0x32,0x40,0xcc,0x00,0x89,0x83,0x21,0xc6,0x01,0x20,0x1d,0x22,0x07,0x7c,0xde,
|
|
0xda,0xdc,0xd2,0xe0,0xde,0xe8,0xca,0xdc,0xe8,0x40,0xc6,0xd0,0xc2,0xe4,0xf8,0x4c,
|
|
0xa5,0xb5,0xc1,0xb1,0x95,0x81,0x0c,0xad,0xac,0x80,0x50,0x09,0x05,0x05,0x0d,0x11,
|
|
0x90,0x3a,0x18,0x62,0x20,0x74,0x80,0xd8,0xc1,0x72,0x0c,0x31,0x90,0x3b,0x40,0xee,
|
|
0x60,0x39,0x46,0x44,0xec,0xc0,0x0e,0xf6,0xd0,0x0e,0x6e,0xd0,0x0e,0xef,0x40,0x0e,
|
|
0xf5,0xc0,0x0e,0xe5,0xe0,0x06,0xe6,0xc0,0x0e,0xe1,0x70,0x0e,0xf3,0x30,0x45,0x08,
|
|
0x86,0x11,0x0a,0x3b,0xb0,0x83,0x3d,0xb4,0x83,0x1b,0xa4,0x03,0x39,0x94,0x83,0x3b,
|
|
0xd0,0xc3,0x94,0xa0,0x18,0xb1,0x84,0x43,0x3a,0xc8,0x83,0x1b,0xd8,0x43,0x39,0xc8,
|
|
0xc3,0x3c,0xa4,0xc3,0x3b,0xb8,0xc3,0x94,0xc0,0x18,0x41,0x85,0x43,0x3a,0xc8,0x83,
|
|
0x1b,0xb0,0x43,0x38,0xb8,0xc3,0x39,0xd4,0x43,0x38,0x9c,0x43,0x39,0xfc,0x82,0x3d,
|
|
0x94,0x83,0x3c,0xcc,0x43,0x3a,0xbc,0x83,0x3b,0x4c,0x09,0x90,0x11,0x53,0x38,0xa4,
|
|
0x83,0x3c,0xb8,0xc1,0x38,0xbc,0x43,0x3b,0xc0,0x43,0x3a,0xb0,0x43,0x39,0xfc,0xc2,
|
|
0x3b,0xc0,0x03,0x3d,0xa4,0xc3,0x3b,0xb8,0xc3,0x3c,0x4c,0x19,0x14,0xc6,0x19,0xa1,
|
|
0x84,0x43,0x3a,0xc8,0x83,0x1b,0xd8,0x43,0x39,0xc8,0x03,0x3d,0x94,0x03,0x3e,0x4c,
|
|
0x09,0xe6,0x00,0x00,0x79,0x18,0x00,0x00,0xa5,0x00,0x00,0x00,0x33,0x08,0x80,0x1c,
|
|
0xc4,0xe1,0x1c,0x66,0x14,0x01,0x3d,0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,0x07,
|
|
0x79,0x78,0x07,0x73,0x98,0x71,0x0c,0xe6,0x00,0x0f,0xed,0x10,0x0e,0xf4,0x80,0x0e,
|
|
0x33,0x0c,0x42,0x1e,0xc2,0xc1,0x1d,0xce,0xa1,0x1c,0x66,0x30,0x05,0x3d,0x88,0x43,
|
|
0x38,0x84,0x83,0x1b,0xcc,0x03,0x3d,0xc8,0x43,0x3d,0x8c,0x03,0x3d,0xcc,0x78,0x8c,
|
|
0x74,0x70,0x07,0x7b,0x08,0x07,0x79,0x48,0x87,0x70,0x70,0x07,0x7a,0x70,0x03,0x76,
|
|
0x78,0x87,0x70,0x20,0x87,0x19,0xcc,0x11,0x0e,0xec,0x90,0x0e,0xe1,0x30,0x0f,0x6e,
|
|
0x30,0x0f,0xe3,0xf0,0x0e,0xf0,0x50,0x0e,0x33,0x10,0xc4,0x1d,0xde,0x21,0x1c,0xd8,
|
|
0x21,0x1d,0xc2,0x61,0x1e,0x66,0x30,0x89,0x3b,0xbc,0x83,0x3b,0xd0,0x43,0x39,0xb4,
|
|
0x03,0x3c,0xbc,0x83,0x3c,0x84,0x03,0x3b,0xcc,0xf0,0x14,0x76,0x60,0x07,0x7b,0x68,
|
|
0x07,0x37,0x68,0x87,0x72,0x68,0x07,0x37,0x80,0x87,0x70,0x90,0x87,0x70,0x60,0x07,
|
|
0x76,0x28,0x07,0x76,0xf8,0x05,0x76,0x78,0x87,0x77,0x80,0x87,0x5f,0x08,0x87,0x71,
|
|
0x18,0x87,0x72,0x98,0x87,0x79,0x98,0x81,0x2c,0xee,0xf0,0x0e,0xee,0xe0,0x0e,0xf5,
|
|
0xc0,0x0e,0xec,0x30,0x03,0x62,0xc8,0xa1,0x1c,0xe4,0xa1,0x1c,0xcc,0xa1,0x1c,0xe4,
|
|
0xa1,0x1c,0xdc,0x61,0x1c,0xca,0x21,0x1c,0xc4,0x81,0x1d,0xca,0x61,0x06,0xd6,0x90,
|
|
0x43,0x39,0xc8,0x43,0x39,0x98,0x43,0x39,0xc8,0x43,0x39,0xb8,0xc3,0x38,0x94,0x43,
|
|
0x38,0x88,0x03,0x3b,0x94,0xc3,0x2f,0xbc,0x83,0x3c,0xfc,0x82,0x3b,0xd4,0x03,0x3b,
|
|
0xb0,0xc3,0x0c,0xc7,0x69,0x87,0x70,0x58,0x87,0x72,0x70,0x83,0x74,0x68,0x07,0x78,
|
|
0x60,0x87,0x74,0x18,0x87,0x74,0xa0,0x87,0x19,0xce,0x53,0x0f,0xee,0x00,0x0f,0xf2,
|
|
0x50,0x0e,0xe4,0x90,0x0e,0xe3,0x40,0x0f,0xe1,0x20,0x0e,0xec,0x50,0x0e,0x33,0x20,
|
|
0x28,0x1d,0xdc,0xc1,0x1e,0xc2,0x41,0x1e,0xd2,0x21,0x1c,0xdc,0x81,0x1e,0xdc,0xe0,
|
|
0x1c,0xe4,0xe1,0x1d,0xea,0x01,0x1e,0x66,0x18,0x51,0x38,0xb0,0x43,0x3a,0x9c,0x83,
|
|
0x3b,0xcc,0x50,0x24,0x76,0x60,0x07,0x7b,0x68,0x07,0x37,0x60,0x87,0x77,0x78,0x07,
|
|
0x78,0x98,0x51,0x4c,0xf4,0x90,0x0f,0xf0,0x50,0x0e,0x33,0x1e,0x6a,0x1e,0xca,0x61,
|
|
0x1c,0xe8,0x21,0x1d,0xde,0xc1,0x1d,0x7e,0x01,0x1e,0xe4,0xa1,0x1c,0xcc,0x21,0x1d,
|
|
0xf0,0x61,0x06,0x54,0x85,0x83,0x38,0xcc,0xc3,0x3b,0xb0,0x43,0x3d,0xd0,0x43,0x39,
|
|
0xfc,0xc2,0x3c,0xe4,0x43,0x3b,0x88,0xc3,0x3b,0xb0,0xc3,0x8c,0xc5,0x0a,0x87,0x79,
|
|
0x98,0x87,0x77,0x18,0x87,0x74,0x08,0x07,0x7a,0x28,0x07,0x72,0x98,0x81,0x5c,0xe3,
|
|
0x10,0x0e,0xec,0xc0,0x0e,0xe5,0x50,0x0e,0xf3,0x30,0x23,0xc1,0xd2,0x41,0x1e,0xe4,
|
|
0xe1,0x17,0xd8,0xe1,0x1d,0xde,0x01,0x1e,0x66,0x48,0x19,0x3b,0xb0,0x83,0x3d,0xb4,
|
|
0x83,0x1b,0x84,0xc3,0x38,0x8c,0x43,0x39,0xcc,0xc3,0x3c,0xb8,0xc1,0x39,0xc8,0xc3,
|
|
0x3b,0xd4,0x03,0x3c,0xcc,0x48,0xb4,0x71,0x08,0x07,0x76,0x60,0x07,0x71,0x08,0x87,
|
|
0x71,0x58,0x87,0x19,0xdb,0xc6,0x0e,0xec,0x60,0x0f,0xed,0xe0,0x06,0xf0,0x20,0x0f,
|
|
0xe5,0x30,0x0f,0xe5,0x20,0x0f,0xf6,0x50,0x0e,0x6e,0x10,0x0e,0xe3,0x30,0x0e,0xe5,
|
|
0x30,0x0f,0xf3,0xe0,0x06,0xe9,0xe0,0x0e,0xe4,0x50,0x0e,0xf8,0x30,0x23,0xe2,0xec,
|
|
0x61,0x1c,0xc2,0x81,0x1d,0xd8,0xe1,0x17,0xec,0x21,0x1d,0xe6,0x21,0x1d,0xc4,0x21,
|
|
0x1d,0xd8,0x21,0x1d,0xe8,0x21,0x1f,0x66,0x20,0x9d,0x3b,0xbc,0x43,0x3d,0xb8,0x03,
|
|
0x39,0x94,0x83,0x39,0xcc,0x58,0xbc,0x70,0x70,0x07,0x77,0x78,0x07,0x7a,0x08,0x07,
|
|
0x7a,0x48,0x87,0x77,0x70,0x87,0x19,0xce,0x87,0x0e,0xe5,0x10,0x0e,0xf0,0x10,0x0e,
|
|
0xec,0xc0,0x0e,0xef,0x30,0x0e,0xf3,0x90,0x0e,0xf4,0x50,0x0e,0x33,0x28,0x30,0x08,
|
|
0x87,0x74,0x90,0x07,0x37,0x30,0x87,0x7a,0x70,0x87,0x71,0xa0,0x87,0x74,0x78,0x07,
|
|
0x77,0xf8,0x85,0x73,0x90,0x87,0x77,0xa8,0x07,0x78,0x98,0x07,0x00,0x00,0x00,0x00,
|
|
0x71,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x50,0x30,0x00,0xd2,0xd0,0x00,0x00,
|
|
0x61,0x20,0x00,0x00,0x23,0x00,0x00,0x00,0x13,0x04,0x41,0x2c,0x10,0x00,0x00,0x00,
|
|
0x11,0x00,0x00,0x00,0xd4,0x63,0x11,0x40,0x60,0x1c,0x73,0x10,0x42,0xf0,0x3c,0x94,
|
|
0x33,0x00,0x14,0x63,0x09,0x20,0x08,0x82,0xf0,0x2f,0x80,0x20,0x08,0xc2,0xbf,0x30,
|
|
0x96,0x00,0x82,0x20,0x08,0x82,0x01,0x08,0x82,0x20,0x08,0x0e,0x33,0x00,0x24,0x73,
|
|
0x10,0xd7,0x65,0x55,0x34,0x33,0x00,0x04,0x63,0x04,0x20,0x08,0x82,0xf8,0x37,0x46,
|
|
0x00,0x82,0x20,0x08,0x7f,0x33,0x00,0x00,0xe3,0x0d,0x4c,0x64,0x51,0x40,0x2c,0x0a,
|
|
0xe8,0x63,0xc1,0x02,0x1f,0x0b,0x16,0xf9,0x0c,0x32,0x04,0xcb,0x33,0xc8,0x10,0x2c,
|
|
0xd1,0x6c,0xc3,0x52,0x01,0xb3,0x0d,0x41,0x15,0xcc,0x36,0x04,0x83,0x90,0x41,0x40,
|
|
0x0c,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x5b,0x86,0x20,0xc0,0x03,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.frag_color = tex.sample(smp, in.uv) * in.color;
|
|
return out;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_bytecode_metal_macos[3017] = {
|
|
0x4d,0x54,0x4c,0x42,0x01,0x80,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0xc9,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0xf0,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,
|
|
0x4e,0x41,0x4d,0x45,0x06,0x00,0x6d,0x61,0x69,0x6e,0x30,0x00,0x54,0x59,0x50,0x45,
|
|
0x01,0x00,0x01,0x48,0x41,0x53,0x48,0x20,0x00,0xfe,0x1f,0x5f,0xc4,0x3f,0x2d,0xaa,
|
|
0xe1,0x41,0x06,0x1f,0xeb,0x88,0x3c,0x97,0xdd,0x86,0x1d,0xfa,0x9c,0xc7,0x3f,0xac,
|
|
0x4b,0x2b,0x8c,0xa0,0x89,0xf7,0x13,0x77,0xee,0x4f,0x46,0x46,0x54,0x18,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x45,0x52,0x53,0x08,0x00,0x01,0x00,0x08,
|
|
0x00,0x01,0x00,0x01,0x00,0x45,0x4e,0x44,0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,
|
|
0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,0x54,0xde,0xc0,0x17,0x0b,0x00,0x00,0x00,
|
|
0x00,0x14,0x00,0x00,0x00,0xdc,0x0a,0x00,0x00,0xff,0xff,0xff,0xff,0x42,0x43,0xc0,
|
|
0xde,0x21,0x0c,0x00,0x00,0xb4,0x02,0x00,0x00,0x0b,0x82,0x20,0x00,0x02,0x00,0x00,
|
|
0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91,0x41,0xc8,0x04,0x49,0x06,0x10,0x32,
|
|
0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19,0x1e,0x04,0x8b,0x62,0x80,0x14,0x45,
|
|
0x02,0x42,0x92,0x0b,0x42,0xa4,0x10,0x32,0x14,0x38,0x08,0x18,0x49,0x0a,0x32,0x44,
|
|
0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80,0x0c,0x19,0x21,0x72,0x24,0x07,0xc8,
|
|
0x48,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0,0x01,0x00,0x00,0x00,0x51,0x18,0x00,
|
|
0x00,0x74,0x00,0x00,0x00,0x1b,0xc2,0x24,0xf8,0xff,0xff,0xff,0xff,0x01,0x60,0x00,
|
|
0x09,0xa8,0x88,0x70,0x80,0x07,0x78,0x90,0x87,0x77,0xc0,0x87,0x36,0x30,0x87,0x7a,
|
|
0x70,0x87,0x71,0x68,0x03,0x73,0x80,0x87,0x36,0x68,0x87,0x70,0xa0,0x07,0x74,0x00,
|
|
0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xa2,0x1d,0xd2,0xc1,0x1d,0xda,0x80,0x1d,0xca,
|
|
0xe1,0x1c,0xc2,0x81,0x1d,0xda,0xc0,0x1e,0xca,0x61,0x1c,0xe8,0xe1,0x1d,0xe4,0xa1,
|
|
0x0d,0xee,0x21,0x1d,0xc8,0x81,0x1e,0xd0,0x01,0x88,0x03,0x39,0xc0,0x03,0x60,0x70,
|
|
0x87,0x77,0x68,0x03,0x71,0xa8,0x87,0x74,0x60,0x07,0x7a,0x48,0x07,0x77,0x98,0x07,
|
|
0x80,0x70,0x87,0x77,0x68,0x03,0x73,0x90,0x87,0x70,0x68,0x87,0x72,0x68,0x03,0x78,
|
|
0x78,0x87,0x74,0x70,0x07,0x7a,0x28,0x07,0x79,0x68,0x83,0x72,0x60,0x87,0x74,0x68,
|
|
0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,0xda,0xc0,0x1c,0xe4,
|
|
0x21,0x1c,0xda,0xa1,0x1c,0xda,0x00,0x1e,0xde,0x21,0x1d,0xdc,0x81,0x1e,0xca,0x41,
|
|
0x1e,0xda,0xa0,0x1c,0xd8,0x21,0x1d,0xda,0xa1,0x0d,0xdc,0xe1,0x1d,0xdc,0xa1,0x0d,
|
|
0xd8,0xa1,0x1c,0xc2,0xc1,0x1c,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x70,0x87,
|
|
0x77,0x68,0x83,0x74,0x70,0x07,0x73,0x98,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,
|
|
0x08,0x07,0x7a,0x40,0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,
|
|
0xda,0xc0,0x1d,0xc2,0xc1,0x1d,0xe6,0xa1,0x0d,0xcc,0x01,0x1e,0xda,0xa0,0x1d,0xc2,
|
|
0x81,0x1e,0xd0,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,0x00,0x08,0x77,0x78,0x87,0x36,
|
|
0x98,0x87,0x74,0x38,0x07,0x77,0x28,0x07,0x72,0x68,0x03,0x7d,0x28,0x07,0x79,0x78,
|
|
0x87,0x79,0x68,0x03,0x73,0x80,0x87,0x36,0x68,0x87,0x70,0xa0,0x07,0x74,0x00,0xe8,
|
|
0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,0xde,0xa1,0x0d,0xe8,0x41,0x1e,0xc2,0x01,
|
|
0x1e,0xe0,0x21,0x1d,0xdc,0xe1,0x1c,0xda,0xa0,0x1d,0xc2,0x81,0x1e,0xd0,0x01,0xa0,
|
|
0x07,0x79,0xa8,0x87,0x72,0x00,0x88,0x79,0xa0,0x87,0x70,0x18,0x87,0x75,0x68,0x03,
|
|
0x78,0x90,0x87,0x77,0xa0,0x87,0x72,0x18,0x07,0x7a,0x78,0x07,0x79,0x68,0x03,0x71,
|
|
0xa8,0x07,0x73,0x30,0x87,0x72,0x90,0x87,0x36,0x98,0x87,0x74,0xd0,0x87,0x72,0x00,
|
|
0xf0,0x00,0x20,0xea,0xc1,0x1d,0xe6,0x21,0x1c,0xcc,0xa1,0x1c,0xda,0xc0,0x1c,0xe0,
|
|
0xa1,0x0d,0xda,0x21,0x1c,0xe8,0x01,0x1d,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x60,
|
|
0x83,0x21,0x0c,0xc0,0x02,0x54,0x1b,0x8c,0x81,0x00,0x16,0xa0,0xda,0x80,0x10,0xff,
|
|
0xff,0xff,0xff,0x3f,0x00,0x0c,0x20,0x01,0xd5,0x06,0xa3,0x08,0x80,0x05,0xa8,0x36,
|
|
0x18,0x86,0x00,0x2c,0x40,0xb5,0x01,0x39,0xfe,0xff,0xff,0xff,0x7f,0x00,0x18,0x40,
|
|
0x02,0x2a,0x00,0x00,0x00,0x49,0x18,0x00,0x00,0x04,0x00,0x00,0x00,0x13,0x86,0x40,
|
|
0x18,0x26,0x0c,0x44,0x61,0x4c,0x18,0x8e,0xc2,0x00,0x00,0x00,0x00,0x89,0x20,0x00,
|
|
0x00,0x1d,0x00,0x00,0x00,0x32,0x22,0x48,0x09,0x20,0x64,0x85,0x04,0x93,0x22,0xa4,
|
|
0x84,0x04,0x93,0x22,0xe3,0x84,0xa1,0x90,0x14,0x12,0x4c,0x8a,0x8c,0x0b,0x84,0xa4,
|
|
0x4c,0x10,0x48,0x33,0x00,0xc3,0x08,0x04,0x60,0x83,0x30,0x8c,0x20,0x00,0x47,0x49,
|
|
0x53,0x44,0x09,0x93,0xff,0x4f,0xc4,0x35,0x51,0x11,0xf1,0xdb,0xc3,0x3f,0x8d,0x11,
|
|
0x00,0x83,0x08,0x44,0x70,0x91,0x34,0x45,0x94,0x30,0xf9,0xbf,0x04,0x30,0xcf,0x42,
|
|
0x44,0xff,0x34,0x46,0x00,0x0c,0x22,0x18,0x42,0x29,0xc4,0x08,0xe5,0x10,0x9a,0x23,
|
|
0x08,0xe6,0x08,0xc0,0x60,0x18,0x41,0x58,0x0a,0x12,0xca,0x19,0x8a,0x29,0x40,0x6d,
|
|
0x20,0x20,0x05,0xd6,0x08,0x00,0x00,0x00,0x00,0x13,0xb2,0x70,0x48,0x07,0x79,0xb0,
|
|
0x03,0x3a,0x68,0x83,0x70,0x80,0x07,0x78,0x60,0x87,0x72,0x68,0x83,0x76,0x08,0x87,
|
|
0x71,0x78,0x87,0x79,0xc0,0x87,0x38,0x80,0x03,0x37,0x88,0x83,0x38,0x70,0x03,0x38,
|
|
0xd8,0x70,0x1b,0xe5,0xd0,0x06,0xf0,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,
|
|
0xa0,0x07,0x76,0x40,0x07,0x6d,0x90,0x0e,0x71,0xa0,0x07,0x78,0xa0,0x07,0x78,0xd0,
|
|
0x06,0xe9,0x80,0x07,0x7a,0x80,0x07,0x7a,0x80,0x07,0x6d,0x90,0x0e,0x71,0x60,0x07,
|
|
0x7a,0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x6d,0x90,0x0e,0x73,0x20,0x07,0x7a,
|
|
0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x6d,0x90,0x0e,0x76,0x40,0x07,0x7a,0x60,
|
|
0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x6d,0x60,0x0e,0x73,0x20,0x07,0x7a,0x30,0x07,
|
|
0x72,0xa0,0x07,0x73,0x20,0x07,0x6d,0x60,0x0e,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,
|
|
0xa0,0x07,0x76,0x40,0x07,0x6d,0x60,0x0f,0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xa0,
|
|
0x07,0x71,0x60,0x07,0x6d,0x60,0x0f,0x72,0x40,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,
|
|
0x73,0x20,0x07,0x6d,0x60,0x0f,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,
|
|
0x20,0x07,0x6d,0x60,0x0f,0x74,0x80,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,
|
|
0x07,0x6d,0x60,0x0f,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,
|
|
0x6d,0x60,0x0f,0x79,0x60,0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x7a,0x10,0x07,0x72,
|
|
0x80,0x07,0x6d,0x60,0x0f,0x71,0x20,0x07,0x78,0xa0,0x07,0x71,0x20,0x07,0x78,0xa0,
|
|
0x07,0x71,0x20,0x07,0x78,0xd0,0x06,0xf6,0x10,0x07,0x79,0x20,0x07,0x7a,0x20,0x07,
|
|
0x75,0x60,0x07,0x7a,0x20,0x07,0x75,0x60,0x07,0x6d,0x60,0x0f,0x72,0x50,0x07,0x76,
|
|
0xa0,0x07,0x72,0x50,0x07,0x76,0xa0,0x07,0x72,0x50,0x07,0x76,0xd0,0x06,0xf6,0x50,
|
|
0x07,0x71,0x20,0x07,0x7a,0x50,0x07,0x71,0x20,0x07,0x7a,0x50,0x07,0x71,0x20,0x07,
|
|
0x6d,0x60,0x0f,0x71,0x00,0x07,0x72,0x40,0x07,0x7a,0x10,0x07,0x70,0x20,0x07,0x74,
|
|
0xa0,0x07,0x71,0x00,0x07,0x72,0x40,0x07,0x6d,0xe0,0x0e,0x78,0xa0,0x07,0x71,0x60,
|
|
0x07,0x7a,0x30,0x07,0x72,0x30,0x84,0x49,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
|
|
0x18,0xc2,0x38,0x40,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x64,0x81,0x00,0x00,0x00,
|
|
0x00,0x08,0x00,0x00,0x00,0x32,0x1e,0x98,0x10,0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,
|
|
0x47,0xc6,0x04,0x43,0x5a,0x25,0x30,0x02,0x50,0x04,0x85,0x50,0x10,0x65,0x40,0x70,
|
|
0x2c,0xe1,0x01,0x00,0x00,0x79,0x18,0x00,0x00,0xd2,0x00,0x00,0x00,0x1a,0x03,0x4c,
|
|
0x10,0x97,0x29,0xa2,0x25,0x10,0xab,0x32,0xb9,0xb9,0xb4,0x37,0xb7,0x21,0xc6,0x42,
|
|
0x3c,0x00,0x84,0x50,0xb9,0x1b,0x43,0x0b,0x93,0xfb,0x9a,0x4b,0xd3,0x2b,0x1b,0x62,
|
|
0x2c,0xc2,0x23,0x2c,0x05,0xe3,0x20,0x08,0x0e,0x8e,0xad,0x0c,0xa4,0xad,0x8c,0x2e,
|
|
0x8c,0x0d,0xc4,0xae,0x4c,0x6e,0x2e,0xed,0xcd,0x0d,0x64,0x46,0x06,0x46,0x66,0xc6,
|
|
0x65,0x66,0xa6,0x06,0x04,0xa5,0xad,0x8c,0x2e,0x8c,0xcd,0xac,0xac,0x65,0x46,0x06,
|
|
0x46,0x66,0xc6,0x65,0x66,0xa6,0x26,0x65,0x88,0xf0,0x10,0x43,0x8c,0x45,0x58,0x8c,
|
|
0x65,0x60,0xd1,0x54,0x46,0x17,0xc6,0x36,0x04,0x79,0x8e,0x45,0x58,0x84,0x65,0xe0,
|
|
0x16,0x96,0x26,0xe7,0x32,0xf6,0xd6,0x06,0x97,0xc6,0x56,0xe6,0x42,0x56,0xe6,0xf6,
|
|
0x26,0xd7,0x36,0xf7,0x45,0x96,0x36,0x17,0x26,0xc6,0x56,0x36,0x44,0x78,0x12,0x72,
|
|
0x61,0x69,0x72,0x2e,0x63,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x2e,0x66,0x61,0x73,0x74,
|
|
0x5f,0x6d,0x61,0x74,0x68,0x5f,0x65,0x6e,0x61,0x62,0x6c,0x65,0x43,0x84,0x67,0x61,
|
|
0x19,0x84,0xa5,0xc9,0xb9,0x8c,0xbd,0xb5,0xc1,0xa5,0xb1,0x95,0xb9,0x98,0xc9,0x85,
|
|
0xb5,0x95,0x89,0xd5,0x99,0x99,0x95,0xc9,0x7d,0x99,0x95,0xd1,0x8d,0xa1,0x7d,0x91,
|
|
0xa5,0xcd,0x85,0x89,0xb1,0x95,0x0d,0x11,0x9e,0x86,0x51,0x58,0x9a,0x9c,0x8b,0x5c,
|
|
0x99,0x1b,0x59,0x99,0xdc,0x17,0x5d,0x98,0xdc,0x59,0x19,0x1d,0xa3,0xb0,0x34,0x39,
|
|
0x97,0x30,0xb9,0xb3,0x2f,0xba,0x3c,0xb8,0xb2,0x2f,0xb7,0xb0,0xb6,0x32,0x1a,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x64,0xc2,0xd2,0xe4,0x5c,0xc2,0xe4,0xce,0xbe,0xdc,0xc2,
|
|
0xda,0xca,0xa8,0x98,0xc9,0x85,0x9d,0x7d,0x8d,0xbd,0xb1,0xbd,0xc9,0x0d,0x61,0x9e,
|
|
0x67,0x19,0x1e,0xe8,0x89,0x1e,0xe9,0x99,0x86,0x08,0x0f,0x45,0x29,0x2c,0x4d,0xce,
|
|
0xc5,0x4c,0x2e,0xec,0xac,0xad,0xcc,0x8d,0xee,0x2b,0xcd,0x0d,0xae,0x8e,0x8e,0x4b,
|
|
0xdd,0x5c,0x99,0x1c,0x0a,0xdb,0xdb,0x98,0x1b,0x4c,0x0a,0x95,0xb0,0x34,0x39,0x97,
|
|
0xb1,0x32,0x37,0xba,0x32,0x39,0x3e,0x61,0x69,0x72,0x2e,0x70,0x65,0x72,0x73,0x70,
|
|
0x65,0x63,0x74,0x69,0x76,0x65,0x34,0xcc,0xd8,0xde,0xc2,0xe8,0x64,0x28,0xd4,0xd9,
|
|
0x0d,0x91,0x96,0xe1,0xb1,0x9e,0xeb,0xc1,0x9e,0xec,0x81,0x1e,0xed,0x91,0x9e,0x8d,
|
|
0x4b,0xdd,0x5c,0x99,0x1c,0x0a,0xdb,0xdb,0x98,0x5b,0x4c,0x0a,0x8b,0xb1,0x37,0xb6,
|
|
0x37,0xb9,0x21,0xd2,0x22,0x3c,0xd6,0xd3,0x3d,0xd8,0x93,0x3d,0xd0,0x13,0x3d,0xd2,
|
|
0xe3,0x71,0x09,0x4b,0x93,0x73,0xa1,0x2b,0xc3,0xa3,0xab,0x93,0x2b,0xa3,0x14,0x96,
|
|
0x26,0xe7,0xc2,0xf6,0x36,0x16,0x46,0x97,0xf6,0xe6,0xf6,0x95,0xe6,0x46,0x56,0x86,
|
|
0x47,0x25,0x2c,0x4d,0xce,0x65,0x2e,0xac,0x0d,0x8e,0xad,0x8c,0x18,0x5d,0x19,0x1e,
|
|
0x5d,0x9d,0x5c,0x99,0x0c,0x19,0x8f,0x19,0xdb,0x5b,0x18,0x1d,0x0b,0xc8,0x5c,0x58,
|
|
0x1b,0x1c,0x5b,0x99,0x0f,0x07,0xba,0x32,0xbc,0x21,0xd4,0x42,0x3c,0x60,0xf0,0x84,
|
|
0xc1,0x32,0x2c,0xc2,0x23,0x06,0x0f,0xf4,0x8c,0xc1,0x23,0x3d,0x64,0xc0,0x25,0x2c,
|
|
0x4d,0xce,0x65,0x2e,0xac,0x0d,0x8e,0xad,0x4c,0x8e,0xc7,0x5c,0x58,0x1b,0x1c,0x5b,
|
|
0x99,0x1c,0x87,0xb9,0x36,0xb8,0x21,0xd2,0x72,0x3c,0x66,0xf0,0x84,0xc1,0x32,0x2c,
|
|
0xc2,0x03,0x3d,0x67,0xf0,0x48,0x0f,0x1a,0x0c,0x41,0x1e,0xee,0xf9,0x9e,0x32,0x78,
|
|
0xd2,0x60,0x88,0x91,0x00,0x4f,0xf5,0xa8,0x01,0xaf,0xb0,0x34,0xb9,0x96,0x30,0xb6,
|
|
0xb4,0xb0,0xb9,0x96,0xb9,0xb1,0x37,0xb8,0xb2,0x39,0x94,0xb6,0xb0,0x34,0x37,0x98,
|
|
0x94,0x21,0xc4,0xd3,0x06,0x0f,0x1b,0x10,0x0b,0x4b,0x93,0x6b,0x09,0x63,0x4b,0x0b,
|
|
0x9b,0x6b,0x99,0x1b,0x7b,0x83,0x2b,0x6b,0xa1,0x2b,0xc3,0xa3,0xab,0x93,0x2b,0x9b,
|
|
0x1b,0x62,0x3c,0x6f,0xf0,0xb4,0xc1,0xe3,0x06,0xc4,0xc2,0xd2,0xe4,0x5a,0xc2,0xd8,
|
|
0xd2,0xc2,0xe6,0x5a,0xe6,0xc6,0xde,0xe0,0xca,0x5a,0xe6,0xc2,0xda,0xe0,0xd8,0xca,
|
|
0xe4,0xe6,0x86,0x18,0x4f,0x1c,0x3c,0x6d,0xf0,0xc0,0xc1,0x10,0xe2,0x79,0x83,0x27,
|
|
0x0e,0x46,0x44,0xec,0xc0,0x0e,0xf6,0xd0,0x0e,0x6e,0xd0,0x0e,0xef,0x40,0x0e,0xf5,
|
|
0xc0,0x0e,0xe5,0xe0,0x06,0xe6,0xc0,0x0e,0xe1,0x70,0x0e,0xf3,0x30,0x45,0x08,0x86,
|
|
0x11,0x0a,0x3b,0xb0,0x83,0x3d,0xb4,0x83,0x1b,0xa4,0x03,0x39,0x94,0x83,0x3b,0xd0,
|
|
0xc3,0x94,0xa0,0x18,0xb1,0x84,0x43,0x3a,0xc8,0x83,0x1b,0xd8,0x43,0x39,0xc8,0xc3,
|
|
0x3c,0xa4,0xc3,0x3b,0xb8,0xc3,0x94,0xc0,0x18,0x41,0x85,0x43,0x3a,0xc8,0x83,0x1b,
|
|
0xb0,0x43,0x38,0xb8,0xc3,0x39,0xd4,0x43,0x38,0x9c,0x43,0x39,0xfc,0x82,0x3d,0x94,
|
|
0x83,0x3c,0xcc,0x43,0x3a,0xbc,0x83,0x3b,0x4c,0x09,0x90,0x11,0x53,0x38,0xa4,0x83,
|
|
0x3c,0xb8,0xc1,0x38,0xbc,0x43,0x3b,0xc0,0x43,0x3a,0xb0,0x43,0x39,0xfc,0xc2,0x3b,
|
|
0xc0,0x03,0x3d,0xa4,0xc3,0x3b,0xb8,0xc3,0x3c,0x4c,0x19,0x14,0xc6,0x19,0xc1,0x84,
|
|
0x43,0x3a,0xc8,0x83,0x1b,0x98,0x83,0x3c,0x84,0xc3,0x39,0xb4,0x43,0x39,0xb8,0x03,
|
|
0x3d,0x4c,0x09,0xd6,0x00,0x79,0x18,0x00,0x00,0xa5,0x00,0x00,0x00,0x33,0x08,0x80,
|
|
0x1c,0xc4,0xe1,0x1c,0x66,0x14,0x01,0x3d,0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,
|
|
0x07,0x79,0x78,0x07,0x73,0x98,0x71,0x0c,0xe6,0x00,0x0f,0xed,0x10,0x0e,0xf4,0x80,
|
|
0x0e,0x33,0x0c,0x42,0x1e,0xc2,0xc1,0x1d,0xce,0xa1,0x1c,0x66,0x30,0x05,0x3d,0x88,
|
|
0x43,0x38,0x84,0x83,0x1b,0xcc,0x03,0x3d,0xc8,0x43,0x3d,0x8c,0x03,0x3d,0xcc,0x78,
|
|
0x8c,0x74,0x70,0x07,0x7b,0x08,0x07,0x79,0x48,0x87,0x70,0x70,0x07,0x7a,0x70,0x03,
|
|
0x76,0x78,0x87,0x70,0x20,0x87,0x19,0xcc,0x11,0x0e,0xec,0x90,0x0e,0xe1,0x30,0x0f,
|
|
0x6e,0x30,0x0f,0xe3,0xf0,0x0e,0xf0,0x50,0x0e,0x33,0x10,0xc4,0x1d,0xde,0x21,0x1c,
|
|
0xd8,0x21,0x1d,0xc2,0x61,0x1e,0x66,0x30,0x89,0x3b,0xbc,0x83,0x3b,0xd0,0x43,0x39,
|
|
0xb4,0x03,0x3c,0xbc,0x83,0x3c,0x84,0x03,0x3b,0xcc,0xf0,0x14,0x76,0x60,0x07,0x7b,
|
|
0x68,0x07,0x37,0x68,0x87,0x72,0x68,0x07,0x37,0x80,0x87,0x70,0x90,0x87,0x70,0x60,
|
|
0x07,0x76,0x28,0x07,0x76,0xf8,0x05,0x76,0x78,0x87,0x77,0x80,0x87,0x5f,0x08,0x87,
|
|
0x71,0x18,0x87,0x72,0x98,0x87,0x79,0x98,0x81,0x2c,0xee,0xf0,0x0e,0xee,0xe0,0x0e,
|
|
0xf5,0xc0,0x0e,0xec,0x30,0x03,0x62,0xc8,0xa1,0x1c,0xe4,0xa1,0x1c,0xcc,0xa1,0x1c,
|
|
0xe4,0xa1,0x1c,0xdc,0x61,0x1c,0xca,0x21,0x1c,0xc4,0x81,0x1d,0xca,0x61,0x06,0xd6,
|
|
0x90,0x43,0x39,0xc8,0x43,0x39,0x98,0x43,0x39,0xc8,0x43,0x39,0xb8,0xc3,0x38,0x94,
|
|
0x43,0x38,0x88,0x03,0x3b,0x94,0xc3,0x2f,0xbc,0x83,0x3c,0xfc,0x82,0x3b,0xd4,0x03,
|
|
0x3b,0xb0,0xc3,0x0c,0xc7,0x69,0x87,0x70,0x58,0x87,0x72,0x70,0x83,0x74,0x68,0x07,
|
|
0x78,0x60,0x87,0x74,0x18,0x87,0x74,0xa0,0x87,0x19,0xce,0x53,0x0f,0xee,0x00,0x0f,
|
|
0xf2,0x50,0x0e,0xe4,0x90,0x0e,0xe3,0x40,0x0f,0xe1,0x20,0x0e,0xec,0x50,0x0e,0x33,
|
|
0x20,0x28,0x1d,0xdc,0xc1,0x1e,0xc2,0x41,0x1e,0xd2,0x21,0x1c,0xdc,0x81,0x1e,0xdc,
|
|
0xe0,0x1c,0xe4,0xe1,0x1d,0xea,0x01,0x1e,0x66,0x18,0x51,0x38,0xb0,0x43,0x3a,0x9c,
|
|
0x83,0x3b,0xcc,0x50,0x24,0x76,0x60,0x07,0x7b,0x68,0x07,0x37,0x60,0x87,0x77,0x78,
|
|
0x07,0x78,0x98,0x51,0x4c,0xf4,0x90,0x0f,0xf0,0x50,0x0e,0x33,0x1e,0x6a,0x1e,0xca,
|
|
0x61,0x1c,0xe8,0x21,0x1d,0xde,0xc1,0x1d,0x7e,0x01,0x1e,0xe4,0xa1,0x1c,0xcc,0x21,
|
|
0x1d,0xf0,0x61,0x06,0x54,0x85,0x83,0x38,0xcc,0xc3,0x3b,0xb0,0x43,0x3d,0xd0,0x43,
|
|
0x39,0xfc,0xc2,0x3c,0xe4,0x43,0x3b,0x88,0xc3,0x3b,0xb0,0xc3,0x8c,0xc5,0x0a,0x87,
|
|
0x79,0x98,0x87,0x77,0x18,0x87,0x74,0x08,0x07,0x7a,0x28,0x07,0x72,0x98,0x81,0x5c,
|
|
0xe3,0x10,0x0e,0xec,0xc0,0x0e,0xe5,0x50,0x0e,0xf3,0x30,0x23,0xc1,0xd2,0x41,0x1e,
|
|
0xe4,0xe1,0x17,0xd8,0xe1,0x1d,0xde,0x01,0x1e,0x66,0x48,0x19,0x3b,0xb0,0x83,0x3d,
|
|
0xb4,0x83,0x1b,0x84,0xc3,0x38,0x8c,0x43,0x39,0xcc,0xc3,0x3c,0xb8,0xc1,0x39,0xc8,
|
|
0xc3,0x3b,0xd4,0x03,0x3c,0xcc,0x48,0xb4,0x71,0x08,0x07,0x76,0x60,0x07,0x71,0x08,
|
|
0x87,0x71,0x58,0x87,0x19,0xdb,0xc6,0x0e,0xec,0x60,0x0f,0xed,0xe0,0x06,0xf0,0x20,
|
|
0x0f,0xe5,0x30,0x0f,0xe5,0x20,0x0f,0xf6,0x50,0x0e,0x6e,0x10,0x0e,0xe3,0x30,0x0e,
|
|
0xe5,0x30,0x0f,0xf3,0xe0,0x06,0xe9,0xe0,0x0e,0xe4,0x50,0x0e,0xf8,0x30,0x23,0xe2,
|
|
0xec,0x61,0x1c,0xc2,0x81,0x1d,0xd8,0xe1,0x17,0xec,0x21,0x1d,0xe6,0x21,0x1d,0xc4,
|
|
0x21,0x1d,0xd8,0x21,0x1d,0xe8,0x21,0x1f,0x66,0x20,0x9d,0x3b,0xbc,0x43,0x3d,0xb8,
|
|
0x03,0x39,0x94,0x83,0x39,0xcc,0x58,0xbc,0x70,0x70,0x07,0x77,0x78,0x07,0x7a,0x08,
|
|
0x07,0x7a,0x48,0x87,0x77,0x70,0x87,0x19,0xce,0x87,0x0e,0xe5,0x10,0x0e,0xf0,0x10,
|
|
0x0e,0xec,0xc0,0x0e,0xef,0x30,0x0e,0xf3,0x90,0x0e,0xf4,0x50,0x0e,0x33,0x28,0x30,
|
|
0x08,0x87,0x74,0x90,0x07,0x37,0x30,0x87,0x7a,0x70,0x87,0x71,0xa0,0x87,0x74,0x78,
|
|
0x07,0x77,0xf8,0x85,0x73,0x90,0x87,0x77,0xa8,0x07,0x78,0x98,0x07,0x00,0x00,0x00,
|
|
0x00,0x71,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x16,0xb0,0x01,0x48,0xe4,0x4b,0x00,
|
|
0xf3,0x2c,0xc4,0x3f,0x11,0xd7,0x44,0x45,0xc4,0x6f,0x0f,0x7e,0x85,0x17,0xb7,0x6d,
|
|
0x00,0x05,0x03,0x20,0x0d,0x0d,0x00,0x00,0x00,0x61,0x20,0x00,0x00,0x11,0x00,0x00,
|
|
0x00,0x13,0x04,0x41,0x2c,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xc4,0x46,0x00,
|
|
0x48,0x8d,0x00,0xd4,0x00,0x89,0x19,0x00,0x02,0x23,0x00,0x00,0x00,0x23,0x06,0xca,
|
|
0x10,0x44,0x87,0x91,0x0c,0x05,0x11,0x58,0x90,0xc8,0x67,0xb6,0x81,0x08,0x80,0x0c,
|
|
0x02,0x62,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x5b,0x06,0xe0,0x90,0x03,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct vs_params
|
|
{
|
|
float2 disp_size;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 position [[attribute(0)]];
|
|
float2 texcoord0 [[attribute(1)]];
|
|
float4 color0 [[attribute(2)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _22 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.gl_Position = float4(((in.position / _22.disp_size) - float2(0.5)) * float2(2.0, -2.0), 0.5, 1.0);
|
|
out.uv = in.texcoord0;
|
|
out.color = in.color0;
|
|
returnout;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_bytecode_metal_ios[3212] = {
|
|
0x4d,0x54,0x4c,0x42,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x8c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x80,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,
|
|
0x4e,0x41,0x4d,0x45,0x06,0x00,0x6d,0x61,0x69,0x6e,0x30,0x00,0x54,0x59,0x50,0x45,
|
|
0x01,0x00,0x00,0x48,0x41,0x53,0x48,0x20,0x00,0x3f,0x6b,0x6d,0x57,0x85,0xfd,0x52,
|
|
0x34,0x9e,0x07,0x97,0x4a,0x4b,0x88,0xe4,0x3f,0x9d,0x84,0x48,0x96,0x11,0x29,0xeb,
|
|
0xd5,0xc4,0xa7,0x46,0x02,0x51,0xea,0x2a,0x0b,0x4f,0x46,0x46,0x54,0x18,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x45,0x52,0x53,0x08,0x00,0x01,0x00,0x08,
|
|
0x00,0x01,0x00,0x01,0x00,0x45,0x4e,0x44,0x54,0x37,0x00,0x00,0x00,0x56,0x41,0x54,
|
|
0x54,0x22,0x00,0x03,0x00,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x00,0x80,
|
|
0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x00,0x01,0x80,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x00,0x02,0x80,0x56,0x41,0x54,0x59,0x05,0x00,0x03,0x00,0x04,0x04,0x06,
|
|
0x45,0x4e,0x44,0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,0x54,0xde,0xc0,0x17,0x0b,
|
|
0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x64,0x0b,0x00,0x00,0xff,0xff,0xff,0xff,
|
|
0x42,0x43,0xc0,0xde,0x21,0x0c,0x00,0x00,0xd6,0x02,0x00,0x00,0x0b,0x82,0x20,0x00,
|
|
0x02,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91,0x41,0xc8,0x04,0x49,
|
|
0x06,0x10,0x32,0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19,0x1e,0x04,0x8b,0x62,
|
|
0x80,0x10,0x45,0x02,0x42,0x92,0x0b,0x42,0x84,0x10,0x32,0x14,0x38,0x08,0x18,0x49,
|
|
0x0a,0x32,0x44,0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80,0x0c,0x19,0x21,0x72,
|
|
0x24,0x07,0xc8,0x08,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0,0x01,0x00,0x00,0x00,
|
|
0x51,0x18,0x00,0x00,0x70,0x00,0x00,0x00,0x1b,0x7e,0x24,0xf8,0xff,0xff,0xff,0xff,
|
|
0x01,0x90,0x00,0x8a,0x08,0x07,0x78,0x80,0x07,0x79,0x78,0x07,0x7c,0x68,0x03,0x73,
|
|
0xa8,0x07,0x77,0x18,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,0x08,0x07,0x7a,0x40,
|
|
0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xda,0x21,0x1d,0xdc,0xa1,0x0d,0xd8,
|
|
0xa1,0x1c,0xce,0x21,0x1c,0xd8,0xa1,0x0d,0xec,0xa1,0x1c,0xc6,0x81,0x1e,0xde,0x41,
|
|
0x1e,0xda,0xe0,0x1e,0xd2,0x81,0x1c,0xe8,0x01,0x1d,0x80,0x38,0x90,0x03,0x3c,0x00,
|
|
0x06,0x77,0x78,0x87,0x36,0x10,0x87,0x7a,0x48,0x07,0x76,0xa0,0x87,0x74,0x70,0x87,
|
|
0x79,0x00,0x08,0x77,0x78,0x87,0x36,0x30,0x07,0x79,0x08,0x87,0x76,0x28,0x87,0x36,
|
|
0x80,0x87,0x77,0x48,0x07,0x77,0xa0,0x87,0x72,0x90,0x87,0x36,0x28,0x07,0x76,0x48,
|
|
0x87,0x76,0x00,0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,0xde,0xa1,0x0d,0xcc,
|
|
0x41,0x1e,0xc2,0xa1,0x1d,0xca,0xa1,0x0d,0xe0,0xe1,0x1d,0xd2,0xc1,0x1d,0xe8,0xa1,
|
|
0x1c,0xe4,0xa1,0x0d,0xca,0x81,0x1d,0xd2,0xa1,0x1d,0xda,0xc0,0x1d,0xde,0xc1,0x1d,
|
|
0xda,0x80,0x1d,0xca,0x21,0x1c,0xcc,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,0x00,0x08,
|
|
0x77,0x78,0x87,0x36,0x48,0x07,0x77,0x30,0x87,0x79,0x68,0x03,0x73,0x80,0x87,0x36,
|
|
0x68,0x87,0x70,0xa0,0x07,0x74,0x00,0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,
|
|
0xde,0xa1,0x0d,0xdc,0x21,0x1c,0xdc,0x61,0x1e,0xda,0xc0,0x1c,0xe0,0xa1,0x0d,0xda,
|
|
0x21,0x1c,0xe8,0x01,0x1d,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x70,0x87,0x77,
|
|
0x68,0x83,0x79,0x48,0x87,0x73,0x70,0x87,0x72,0x20,0x87,0x36,0xd0,0x87,0x72,0x90,
|
|
0x87,0x77,0x98,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,0x08,0x07,0x7a,0x40,0x07,
|
|
0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,0xda,0x80,0x1e,0xe4,0x21,
|
|
0x1c,0xe0,0x01,0x1e,0xd2,0xc1,0x1d,0xce,0xa1,0x0d,0xda,0x21,0x1c,0xe8,0x01,0x1d,
|
|
0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x98,0x07,0x7a,0x08,0x87,0x71,0x58,0x87,
|
|
0x36,0x80,0x07,0x79,0x78,0x07,0x7a,0x28,0x87,0x71,0xa0,0x87,0x77,0x90,0x87,0x36,
|
|
0x10,0x87,0x7a,0x30,0x07,0x73,0x28,0x07,0x79,0x68,0x83,0x79,0x48,0x07,0x7d,0x28,
|
|
0x07,0x00,0x0f,0x00,0xa2,0x1e,0xdc,0x61,0x1e,0xc2,0xc1,0x1c,0xca,0xa1,0x0d,0xcc,
|
|
0x01,0x1e,0xda,0xa0,0x1d,0xc2,0x81,0x1e,0xd0,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,
|
|
0x00,0x36,0x6c,0x02,0x01,0x2c,0x40,0x35,0x84,0x43,0x3a,0xc8,0x43,0x1b,0x88,0x43,
|
|
0x3d,0x98,0x83,0x39,0x94,0x83,0x3c,0xb4,0x81,0x3b,0xbc,0x43,0x1b,0x84,0x03,0x3b,
|
|
0xa4,0x43,0x38,0xcc,0x03,0x00,0x00,0x00,0x49,0x18,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x13,0x84,0x40,0x00,0x89,0x20,0x00,0x00,0x16,0x00,0x00,0x00,0x32,0x22,0x08,0x09,
|
|
0x20,0x64,0x85,0x04,0x13,0x22,0xa4,0x84,0x04,0x13,0x22,0xe3,0x84,0xa1,0x90,0x14,
|
|
0x12,0x4c,0x88,0x8c,0x0b,0x84,0x84,0x4c,0x10,0x3c,0x33,0x00,0xc3,0x08,0x02,0x30,
|
|
0x8c,0x40,0x00,0x76,0x08,0x91,0x83,0xa4,0x29,0xa2,0x84,0xc9,0xaf,0xa4,0xff,0x01,
|
|
0x22,0x80,0x91,0x50,0x10,0x83,0x08,0x84,0x50,0x8a,0x89,0x90,0x22,0x1b,0x08,0x98,
|
|
0x23,0x00,0x83,0x14,0xc8,0x39,0x02,0x50,0x18,0x44,0x08,0x84,0x61,0x04,0x22,0x19,
|
|
0x01,0x00,0x00,0x00,0x13,0xa8,0x70,0x48,0x07,0x79,0xb0,0x03,0x3a,0x68,0x83,0x70,
|
|
0x80,0x07,0x78,0x60,0x87,0x72,0x68,0x83,0x74,0x78,0x87,0x79,0xc8,0x03,0x37,0x80,
|
|
0x03,0x37,0x80,0x83,0x0d,0xb7,0x51,0x0e,0x6d,0x00,0x0f,0x7a,0x60,0x07,0x74,0xa0,
|
|
0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xe9,0x10,0x07,0x7a,0x80,0x07,
|
|
0x7a,0x80,0x07,0x6d,0x90,0x0e,0x78,0xa0,0x07,0x78,0xa0,0x07,0x78,0xd0,0x06,0xe9,
|
|
0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xd0,0x06,0xe9,0x30,
|
|
0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xe9,0x60,0x07,
|
|
0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xe6,0x30,0x07,0x72,
|
|
0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xe6,0x60,0x07,0x74,0xa0,
|
|
0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6,0x10,0x07,0x76,0xa0,0x07,
|
|
0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xd0,0x06,0xf6,0x20,0x07,0x74,0xa0,0x07,0x73,
|
|
0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xf6,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,
|
|
0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xf6,0x40,0x07,0x78,0xa0,0x07,0x76,0x40,0x07,
|
|
0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,
|
|
0x60,0x07,0x74,0xd0,0x06,0xf6,0x90,0x07,0x76,0xa0,0x07,0x71,0x20,0x07,0x78,0xa0,
|
|
0x07,0x71,0x20,0x07,0x78,0xd0,0x06,0xf6,0x10,0x07,0x72,0x80,0x07,0x7a,0x10,0x07,
|
|
0x72,0x80,0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x6d,0x60,0x0f,0x71,0x90,0x07,0x72,
|
|
0xa0,0x07,0x72,0x50,0x07,0x76,0xa0,0x07,0x72,0x50,0x07,0x76,0xd0,0x06,0xf6,0x20,
|
|
0x07,0x75,0x60,0x07,0x7a,0x20,0x07,0x75,0x60,0x07,0x7a,0x20,0x07,0x75,0x60,0x07,
|
|
0x6d,0x60,0x0f,0x75,0x10,0x07,0x72,0xa0,0x07,0x75,0x10,0x07,0x72,0xa0,0x07,0x75,
|
|
0x10,0x07,0x72,0xd0,0x06,0xf6,0x10,0x07,0x70,0x20,0x07,0x74,0xa0,0x07,0x71,0x00,
|
|
0x07,0x72,0x40,0x07,0x7a,0x10,0x07,0x70,0x20,0x07,0x74,0xd0,0x06,0xee,0x80,0x07,
|
|
0x7a,0x10,0x07,0x76,0xa0,0x07,0x73,0x20,0x07,0x43,0x98,0x03,0x00,0x80,0x00,0x00,
|
|
0x00,0x00,0x00,0x80,0x2c,0x10,0x00,0x00,0x09,0x00,0x00,0x00,0x32,0x1e,0x98,0x10,
|
|
0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,0x47,0xc6,0x04,0x43,0xca,0x12,0x18,0x01,0x28,
|
|
0x88,0x22,0x28,0x84,0x32,0xa0,0x1d,0x01,0x20,0x1d,0x4b,0x90,0x00,0x00,0x00,0x00,
|
|
0x79,0x18,0x00,0x00,0xfa,0x00,0x00,0x00,0x1a,0x03,0x4c,0x10,0x97,0x29,0xa2,0x25,
|
|
0x10,0xab,0x32,0xb9,0xb9,0xb4,0x37,0xb7,0x21,0x46,0x42,0x20,0x80,0x82,0x50,0xb9,
|
|
0x1b,0x43,0x0b,0x93,0xfb,0x9a,0x4b,0xd3,0x2b,0x1b,0x62,0x24,0x01,0x22,0x24,0x05,
|
|
0xe3,0x20,0x08,0x0e,0x8e,0xad,0x0c,0xa4,0xad,0x8c,0x2e,0x8c,0x0d,0xc4,0xae,0x4c,
|
|
0x6e,0x2e,0xed,0xcd,0x0d,0x64,0x46,0x06,0x46,0x66,0xc6,0x65,0x66,0xa6,0x06,0x04,
|
|
0xa5,0xad,0x8c,0x2e,0x8c,0xcd,0xac,0xac,0x65,0x46,0x06,0x46,0x66,0xc6,0x65,0x66,
|
|
0xa6,0x26,0x65,0x88,0x80,0x10,0x43,0x8c,0x24,0x48,0x86,0x44,0x60,0xd1,0x54,0x46,
|
|
0x17,0xc6,0x36,0x04,0x41,0x8e,0x24,0x48,0x82,0x44,0xe0,0x16,0x96,0x26,0xe7,0x32,
|
|
0xf6,0xd6,0x06,0x97,0xc6,0x56,0xe6,0x42,0x56,0xe6,0xf6,0x26,0xd7,0x36,0xf7,0x45,
|
|
0x96,0x36,0x17,0x26,0xc6,0x56,0x36,0x44,0x40,0x12,0x72,0x61,0x69,0x72,0x2e,0x63,
|
|
0x6f,0x6d,0x70,0x69,0x6c,0x65,0x2e,0x66,0x61,0x73,0x74,0x5f,0x6d,0x61,0x74,0x68,
|
|
0x5f,0x65,0x6e,0x61,0x62,0x6c,0x65,0x43,0x04,0x64,0x21,0x19,0x84,0xa5,0xc9,0xb9,
|
|
0x8c,0xbd,0xb5,0xc1,0xa5,0xb1,0x95,0xb9,0x98,0xc9,0x85,0xb5,0x95,0x89,0xd5,0x99,
|
|
0x99,0x95,0xc9,0x7d,0x99,0x95,0xd1,0x8d,0xa1,0x7d,0x95,0xb9,0x85,0x89,0xb1,0x95,
|
|
0x0d,0x11,0x90,0x86,0x51,0x58,0x9a,0x9c,0x8b,0x5d,0x99,0x1c,0x5d,0x19,0xde,0xd7,
|
|
0x5b,0x1d,0x1d,0x5c,0x1d,0x1d,0x97,0xba,0xb9,0x32,0x39,0x14,0xb6,0xb7,0x31,0x37,
|
|
0x98,0x14,0x46,0x61,0x69,0x72,0x2e,0x61,0x72,0x67,0x5f,0x74,0x79,0x70,0x65,0x5f,
|
|
0x6e,0x61,0x6d,0x65,0x34,0xcc,0xd8,0xde,0xc2,0xe8,0x64,0xc8,0x84,0xa5,0xc9,0xb9,
|
|
0x84,0xc9,0x9d,0x7d,0xb9,0x85,0xb5,0x95,0x51,0xa8,0xb3,0x1b,0xc2,0x20,0x0f,0x02,
|
|
0x21,0x11,0x22,0x21,0x13,0x42,0x71,0xa9,0x9b,0x2b,0x93,0x43,0x61,0x7b,0x1b,0x73,
|
|
0x8b,0x49,0xa1,0x61,0xc6,0xf6,0x16,0x46,0x47,0xc3,0x62,0xec,0x8d,0xed,0x4d,0x6e,
|
|
0x08,0x83,0x3c,0x88,0x85,0x44,0xc8,0x85,0x4c,0x08,0x46,0x26,0x2c,0x4d,0xce,0x05,
|
|
0xee,0x6d,0x2e,0x8d,0x2e,0xed,0xcd,0x8d,0xcb,0x19,0xdb,0x17,0xd4,0xdb,0x5c,0x1a,
|
|
0x5d,0xda,0x9b,0xdb,0x10,0x05,0xd1,0x90,0x08,0xb9,0x90,0x09,0xd9,0x86,0x18,0x48,
|
|
0x85,0x64,0x08,0x47,0x28,0x2c,0x4d,0xce,0xc5,0xae,0x4c,0x8e,0xae,0x0c,0xef,0x2b,
|
|
0xcd,0x0d,0xae,0x8e,0x8e,0x52,0x58,0x9a,0x9c,0x0b,0xdb,0xdb,0x58,0x18,0x5d,0xda,
|
|
0x9b,0xdb,0x57,0x9a,0x1b,0x59,0x19,0x1e,0xbd,0xb3,0x32,0xb7,0x32,0xb9,0x30,0xba,
|
|
0x32,0x32,0x94,0xaf,0xaf,0xb0,0x34,0xb9,0x2f,0x38,0xb6,0xb0,0xb1,0x32,0xb4,0x37,
|
|
0x36,0xb2,0x32,0xb9,0xaf,0xaf,0x14,0x22,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
|
0x43,0xa8,0x44,0x40,0x3c,0xe4,0x4b,0x84,0x24,0x40,0xc0,0x00,0x89,0x10,0x09,0x99,
|
|
0x90,0x30,0x60,0x42,0x57,0x86,0x37,0xf6,0xf6,0x26,0x47,0x06,0x33,0x84,0x4a,0x02,
|
|
0xc4,0x43,0xbe,0x24,0x48,0x02,0x04,0x0c,0x90,0x08,0x91,0x90,0x09,0x19,0x03,0x1a,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x30,0x43,0xa8,0x84,0x40,0x3c,0xe4,0x4b,0x88,0x24,0x40,
|
|
0xc0,0x00,0x89,0x90,0x0b,0x99,0x90,0x32,0xa0,0x12,0x96,0x26,0xe7,0x22,0x56,0x67,
|
|
0x66,0x56,0x26,0xc7,0x27,0x2c,0x4d,0xce,0x45,0xac,0xce,0xcc,0xac,0x4c,0xee,0x6b,
|
|
0x2e,0x4d,0xaf,0x8c,0x48,0x58,0x9a,0x9c,0x8b,0x5c,0x59,0x18,0x19,0xa9,0xb0,0x34,
|
|
0x39,0x97,0x39,0x3a,0xb9,0xba,0x31,0xba,0x2f,0xba,0x3c,0xb8,0xb2,0xaf,0x34,0x37,
|
|
0xb3,0x37,0x26,0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,0x65,0x43,0x94,0x44,0x48,
|
|
0x86,0x44,0x40,0x24,0x64,0x0d,0x18,0x85,0xa5,0xc9,0xb9,0x84,0xc9,0x9d,0x7d,0xd1,
|
|
0xe5,0xc1,0x95,0x7d,0xcd,0xa5,0xe9,0x95,0xf1,0x0a,0x4b,0x93,0x73,0x09,0x93,0x3b,
|
|
0xfb,0xa2,0xcb,0x83,0x2b,0xfb,0x0a,0x63,0x4b,0x3b,0x73,0xfb,0x9a,0x4b,0xd3,0x2b,
|
|
0x63,0x62,0x37,0xf7,0x05,0x17,0x26,0x17,0xd6,0x36,0xc7,0xe1,0x4b,0x46,0x66,0x08,
|
|
0x19,0x24,0x06,0x72,0x06,0x08,0x1a,0x24,0x03,0xf2,0x25,0x42,0x12,0x20,0x69,0x80,
|
|
0xa8,0x01,0xc2,0x06,0x48,0x1b,0x24,0x03,0xe2,0x06,0xc9,0x80,0x44,0xc8,0x1b,0x20,
|
|
0x13,0x02,0x07,0x43,0x10,0x44,0x0c,0x10,0x32,0x40,0xcc,0x00,0x89,0x83,0x21,0xc6,
|
|
0x01,0x20,0x1d,0x22,0x07,0x7c,0xde,0xda,0xdc,0xd2,0xe0,0xde,0xe8,0xca,0xdc,0xe8,
|
|
0x40,0xc6,0xd0,0xc2,0xe4,0xf8,0x4c,0xa5,0xb5,0xc1,0xb1,0x95,0x81,0x0c,0xad,0xac,
|
|
0x80,0x50,0x09,0x05,0x05,0x0d,0x11,0x90,0x3a,0x18,0x62,0x20,0x74,0x80,0xd8,0xc1,
|
|
0x72,0x0c,0x31,0x90,0x3b,0x40,0xee,0x60,0x39,0x78,0x85,0xa5,0xc9,0xb5,0x84,0xb1,
|
|
0xa5,0x85,0xcd,0xb5,0xcc,0x8d,0xbd,0xc1,0x95,0xcd,0xa1,0xb4,0x85,0xa5,0xb9,0xc1,
|
|
0xa4,0x0c,0x21,0x10,0x3d,0x40,0xf2,0x80,0x56,0x58,0x9a,0x5c,0x4b,0x18,0x5b,0x5a,
|
|
0xd8,0x5c,0xcb,0xdc,0xd8,0x1b,0x5c,0x59,0x4b,0x98,0xdc,0x19,0xca,0x4c,0xca,0x10,
|
|
0x03,0xe1,0x03,0x44,0x0f,0x90,0x3d,0x18,0x22,0x20,0x7c,0x30,0x22,0x62,0x07,0x76,
|
|
0xb0,0x87,0x76,0x70,0x83,0x76,0x78,0x07,0x72,0xa8,0x07,0x76,0x28,0x07,0x37,0x30,
|
|
0x07,0x76,0x08,0x87,0x73,0x98,0x87,0x29,0x42,0x30,0x8c,0x50,0xd8,0x81,0x1d,0xec,
|
|
0xa1,0x1d,0xdc,0x20,0x1d,0xc8,0xa1,0x1c,0xdc,0x81,0x1e,0xa6,0x04,0xc5,0x88,0x25,
|
|
0x1c,0xd2,0x41,0x1e,0xdc,0xc0,0x1e,0xca,0x41,0x1e,0xe6,0x21,0x1d,0xde,0xc1,0x1d,
|
|
0xa6,0x04,0xc6,0x08,0x2a,0x1c,0xd2,0x41,0x1e,0xdc,0x80,0x1d,0xc2,0xc1,0x1d,0xce,
|
|
0xa1,0x1e,0xc2,0xe1,0x1c,0xca,0xe1,0x17,0xec,0xa1,0x1c,0xe4,0x61,0x1e,0xd2,0xe1,
|
|
0x1d,0xdc,0x61,0x4a,0x80,0x8c,0x98,0xc2,0x21,0x1d,0xe4,0xc1,0x0d,0xc6,0xe1,0x1d,
|
|
0xda,0x01,0x1e,0xd2,0x81,0x1d,0xca,0xe1,0x17,0xde,0x01,0x1e,0xe8,0x21,0x1d,0xde,
|
|
0xc1,0x1d,0xe6,0x61,0xca,0xa0,0x30,0xce,0x08,0x25,0x1c,0xd2,0x41,0x1e,0xdc,0xc0,
|
|
0x1e,0xca,0x41,0x1e,0xe8,0xa1,0x1c,0xf0,0x61,0x4a,0x30,0x07,0x00,0x00,0x00,0x00,
|
|
0x79,0x18,0x00,0x00,0xa5,0x00,0x00,0x00,0x33,0x08,0x80,0x1c,0xc4,0xe1,0x1c,0x66,
|
|
0x14,0x01,0x3d,0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,0x07,0x79,0x78,0x07,0x73,
|
|
0x98,0x71,0x0c,0xe6,0x00,0x0f,0xed,0x10,0x0e,0xf4,0x80,0x0e,0x33,0x0c,0x42,0x1e,
|
|
0xc2,0xc1,0x1d,0xce,0xa1,0x1c,0x66,0x30,0x05,0x3d,0x88,0x43,0x38,0x84,0x83,0x1b,
|
|
0xcc,0x03,0x3d,0xc8,0x43,0x3d,0x8c,0x03,0x3d,0xcc,0x78,0x8c,0x74,0x70,0x07,0x7b,
|
|
0x08,0x07,0x79,0x48,0x87,0x70,0x70,0x07,0x7a,0x70,0x03,0x76,0x78,0x87,0x70,0x20,
|
|
0x87,0x19,0xcc,0x11,0x0e,0xec,0x90,0x0e,0xe1,0x30,0x0f,0x6e,0x30,0x0f,0xe3,0xf0,
|
|
0x0e,0xf0,0x50,0x0e,0x33,0x10,0xc4,0x1d,0xde,0x21,0x1c,0xd8,0x21,0x1d,0xc2,0x61,
|
|
0x1e,0x66,0x30,0x89,0x3b,0xbc,0x83,0x3b,0xd0,0x43,0x39,0xb4,0x03,0x3c,0xbc,0x83,
|
|
0x3c,0x84,0x03,0x3b,0xcc,0xf0,0x14,0x76,0x60,0x07,0x7b,0x68,0x07,0x37,0x68,0x87,
|
|
0x72,0x68,0x07,0x37,0x80,0x87,0x70,0x90,0x87,0x70,0x60,0x07,0x76,0x28,0x07,0x76,
|
|
0xf8,0x05,0x76,0x78,0x87,0x77,0x80,0x87,0x5f,0x08,0x87,0x71,0x18,0x87,0x72,0x98,
|
|
0x87,0x79,0x98,0x81,0x2c,0xee,0xf0,0x0e,0xee,0xe0,0x0e,0xf5,0xc0,0x0e,0xec,0x30,
|
|
0x03,0x62,0xc8,0xa1,0x1c,0xe4,0xa1,0x1c,0xcc,0xa1,0x1c,0xe4,0xa1,0x1c,0xdc,0x61,
|
|
0x1c,0xca,0x21,0x1c,0xc4,0x81,0x1d,0xca,0x61,0x06,0xd6,0x90,0x43,0x39,0xc8,0x43,
|
|
0x39,0x98,0x43,0x39,0xc8,0x43,0x39,0xb8,0xc3,0x38,0x94,0x43,0x38,0x88,0x03,0x3b,
|
|
0x94,0xc3,0x2f,0xbc,0x83,0x3c,0xfc,0x82,0x3b,0xd4,0x03,0x3b,0xb0,0xc3,0x0c,0xc7,
|
|
0x69,0x87,0x70,0x58,0x87,0x72,0x70,0x83,0x74,0x68,0x07,0x78,0x60,0x87,0x74,0x18,
|
|
0x87,0x74,0xa0,0x87,0x19,0xce,0x53,0x0f,0xee,0x00,0x0f,0xf2,0x50,0x0e,0xe4,0x90,
|
|
0x0e,0xe3,0x40,0x0f,0xe1,0x20,0x0e,0xec,0x50,0x0e,0x33,0x20,0x28,0x1d,0xdc,0xc1,
|
|
0x1e,0xc2,0x41,0x1e,0xd2,0x21,0x1c,0xdc,0x81,0x1e,0xdc,0xe0,0x1c,0xe4,0xe1,0x1d,
|
|
0xea,0x01,0x1e,0x66,0x18,0x51,0x38,0xb0,0x43,0x3a,0x9c,0x83,0x3b,0xcc,0x50,0x24,
|
|
0x76,0x60,0x07,0x7b,0x68,0x07,0x37,0x60,0x87,0x77,0x78,0x07,0x78,0x98,0x51,0x4c,
|
|
0xf4,0x90,0x0f,0xf0,0x50,0x0e,0x33,0x1e,0x6a,0x1e,0xca,0x61,0x1c,0xe8,0x21,0x1d,
|
|
0xde,0xc1,0x1d,0x7e,0x01,0x1e,0xe4,0xa1,0x1c,0xcc,0x21,0x1d,0xf0,0x61,0x06,0x54,
|
|
0x85,0x83,0x38,0xcc,0xc3,0x3b,0xb0,0x43,0x3d,0xd0,0x43,0x39,0xfc,0xc2,0x3c,0xe4,
|
|
0x43,0x3b,0x88,0xc3,0x3b,0xb0,0xc3,0x8c,0xc5,0x0a,0x87,0x79,0x98,0x87,0x77,0x18,
|
|
0x87,0x74,0x08,0x07,0x7a,0x28,0x07,0x72,0x98,0x81,0x5c,0xe3,0x10,0x0e,0xec,0xc0,
|
|
0x0e,0xe5,0x50,0x0e,0xf3,0x30,0x23,0xc1,0xd2,0x41,0x1e,0xe4,0xe1,0x17,0xd8,0xe1,
|
|
0x1d,0xde,0x01,0x1e,0x66,0x48,0x19,0x3b,0xb0,0x83,0x3d,0xb4,0x83,0x1b,0x84,0xc3,
|
|
0x38,0x8c,0x43,0x39,0xcc,0xc3,0x3c,0xb8,0xc1,0x39,0xc8,0xc3,0x3b,0xd4,0x03,0x3c,
|
|
0xcc,0x48,0xb4,0x71,0x08,0x07,0x76,0x60,0x07,0x71,0x08,0x87,0x71,0x58,0x87,0x19,
|
|
0xdb,0xc6,0x0e,0xec,0x60,0x0f,0xed,0xe0,0x06,0xf0,0x20,0x0f,0xe5,0x30,0x0f,0xe5,
|
|
0x20,0x0f,0xf6,0x50,0x0e,0x6e,0x10,0x0e,0xe3,0x30,0x0e,0xe5,0x30,0x0f,0xf3,0xe0,
|
|
0x06,0xe9,0xe0,0x0e,0xe4,0x50,0x0e,0xf8,0x30,0x23,0xe2,0xec,0x61,0x1c,0xc2,0x81,
|
|
0x1d,0xd8,0xe1,0x17,0xec,0x21,0x1d,0xe6,0x21,0x1d,0xc4,0x21,0x1d,0xd8,0x21,0x1d,
|
|
0xe8,0x21,0x1f,0x66,0x20,0x9d,0x3b,0xbc,0x43,0x3d,0xb8,0x03,0x39,0x94,0x83,0x39,
|
|
0xcc,0x58,0xbc,0x70,0x70,0x07,0x77,0x78,0x07,0x7a,0x08,0x07,0x7a,0x48,0x87,0x77,
|
|
0x70,0x87,0x19,0xce,0x87,0x0e,0xe5,0x10,0x0e,0xf0,0x10,0x0e,0xec,0xc0,0x0e,0xef,
|
|
0x30,0x0e,0xf3,0x90,0x0e,0xf4,0x50,0x0e,0x33,0x28,0x30,0x08,0x87,0x74,0x90,0x07,
|
|
0x37,0x30,0x87,0x7a,0x70,0x87,0x71,0xa0,0x87,0x74,0x78,0x07,0x77,0xf8,0x85,0x73,
|
|
0x90,0x87,0x77,0xa8,0x07,0x78,0x98,0x07,0x00,0x00,0x00,0x00,0x71,0x20,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x06,0x50,0x30,0x00,0xd2,0xd0,0x00,0x00,0x61,0x20,0x00,0x00,
|
|
0x23,0x00,0x00,0x00,0x13,0x04,0x41,0x2c,0x10,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
|
|
0xd4,0x63,0x11,0x40,0x60,0x1c,0x73,0x10,0x42,0xf0,0x3c,0x94,0x33,0x00,0x14,0x63,
|
|
0x09,0x20,0x08,0x82,0xf0,0x2f,0x80,0x20,0x08,0xc2,0xbf,0x30,0x96,0x00,0x82,0x20,
|
|
0x08,0x82,0x01,0x08,0x82,0x20,0x08,0x0e,0x33,0x00,0x24,0x73,0x10,0xd7,0x65,0x55,
|
|
0x34,0x33,0x00,0x04,0x63,0x04,0x20,0x08,0x82,0xf8,0x37,0x46,0x00,0x82,0x20,0x08,
|
|
0x7f,0x33,0x00,0x00,0xe3,0x0d,0x4c,0x64,0x51,0x40,0x2c,0x0a,0xe8,0x63,0xc1,0x02,
|
|
0x1f,0x0b,0x16,0xf9,0x0c,0x32,0x04,0xcb,0x33,0xc8,0x10,0x2c,0xd1,0x6c,0xc3,0x52,
|
|
0x01,0xb3,0x0d,0x41,0x15,0xcc,0x36,0x04,0x83,0x90,0x41,0x40,0x0c,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x5b,0x8a,0x20,0xc0,0x83,0xa3,0x0f,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.frag_color = tex.sample(smp, in.uv) * in.color;
|
|
return out;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_bytecode_metal_ios[3017] = {
|
|
0x4d,0x54,0x4c,0x42,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0xc9,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0xf0,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,
|
|
0x4e,0x41,0x4d,0x45,0x06,0x00,0x6d,0x61,0x69,0x6e,0x30,0x00,0x54,0x59,0x50,0x45,
|
|
0x01,0x00,0x01,0x48,0x41,0x53,0x48,0x20,0x00,0x4a,0x26,0x79,0xc0,0xb7,0x63,0xb4,
|
|
0xc2,0x1d,0xe8,0x10,0x46,0x41,0x83,0x17,0xea,0x3a,0x9a,0x24,0x37,0x8e,0xb3,0xb9,
|
|
0x44,0xa4,0x85,0x3d,0x7c,0xd2,0xec,0x4b,0x4a,0x4f,0x46,0x46,0x54,0x18,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x45,0x52,0x53,0x08,0x00,0x01,0x00,0x08,
|
|
0x00,0x01,0x00,0x01,0x00,0x45,0x4e,0x44,0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,
|
|
0x54,0x04,0x00,0x00,0x00,0x45,0x4e,0x44,0x54,0xde,0xc0,0x17,0x0b,0x00,0x00,0x00,
|
|
0x00,0x14,0x00,0x00,0x00,0xd4,0x0a,0x00,0x00,0xff,0xff,0xff,0xff,0x42,0x43,0xc0,
|
|
0xde,0x21,0x0c,0x00,0x00,0xb2,0x02,0x00,0x00,0x0b,0x82,0x20,0x00,0x02,0x00,0x00,
|
|
0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91,0x41,0xc8,0x04,0x49,0x06,0x10,0x32,
|
|
0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19,0x1e,0x04,0x8b,0x62,0x80,0x14,0x45,
|
|
0x02,0x42,0x92,0x0b,0x42,0xa4,0x10,0x32,0x14,0x38,0x08,0x18,0x49,0x0a,0x32,0x44,
|
|
0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80,0x0c,0x19,0x21,0x72,0x24,0x07,0xc8,
|
|
0x48,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0,0x01,0x00,0x00,0x00,0x51,0x18,0x00,
|
|
0x00,0x74,0x00,0x00,0x00,0x1b,0xc2,0x24,0xf8,0xff,0xff,0xff,0xff,0x01,0x60,0x00,
|
|
0x09,0xa8,0x88,0x70,0x80,0x07,0x78,0x90,0x87,0x77,0xc0,0x87,0x36,0x30,0x87,0x7a,
|
|
0x70,0x87,0x71,0x68,0x03,0x73,0x80,0x87,0x36,0x68,0x87,0x70,0xa0,0x07,0x74,0x00,
|
|
0xe8,0x41,0x1e,0xea,0xa1,0x1c,0x00,0xa2,0x1d,0xd2,0xc1,0x1d,0xda,0x80,0x1d,0xca,
|
|
0xe1,0x1c,0xc2,0x81,0x1d,0xda,0xc0,0x1e,0xca,0x61,0x1c,0xe8,0xe1,0x1d,0xe4,0xa1,
|
|
0x0d,0xee,0x21,0x1d,0xc8,0x81,0x1e,0xd0,0x01,0x88,0x03,0x39,0xc0,0x03,0x60,0x70,
|
|
0x87,0x77,0x68,0x03,0x71,0xa8,0x87,0x74,0x60,0x07,0x7a,0x48,0x07,0x77,0x98,0x07,
|
|
0x80,0x70,0x87,0x77,0x68,0x03,0x73,0x90,0x87,0x70,0x68,0x87,0x72,0x68,0x03,0x78,
|
|
0x78,0x87,0x74,0x70,0x07,0x7a,0x28,0x07,0x79,0x68,0x83,0x72,0x60,0x87,0x74,0x68,
|
|
0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,0xda,0xc0,0x1c,0xe4,
|
|
0x21,0x1c,0xda,0xa1,0x1c,0xda,0x00,0x1e,0xde,0x21,0x1d,0xdc,0x81,0x1e,0xca,0x41,
|
|
0x1e,0xda,0xa0,0x1c,0xd8,0x21,0x1d,0xda,0xa1,0x0d,0xdc,0xe1,0x1d,0xdc,0xa1,0x0d,
|
|
0xd8,0xa1,0x1c,0xc2,0xc1,0x1c,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x80,0x70,0x87,
|
|
0x77,0x68,0x83,0x74,0x70,0x07,0x73,0x98,0x87,0x36,0x30,0x07,0x78,0x68,0x83,0x76,
|
|
0x08,0x07,0x7a,0x40,0x07,0x80,0x1e,0xe4,0xa1,0x1e,0xca,0x01,0x20,0xdc,0xe1,0x1d,
|
|
0xda,0xc0,0x1d,0xc2,0xc1,0x1d,0xe6,0xa1,0x0d,0xcc,0x01,0x1e,0xda,0xa0,0x1d,0xc2,
|
|
0x81,0x1e,0xd0,0x01,0xa0,0x07,0x79,0xa8,0x87,0x72,0x00,0x08,0x77,0x78,0x87,0x36,
|
|
0x98,0x87,0x74,0x38,0x07,0x77,0x28,0x07,0x72,0x68,0x03,0x7d,0x28,0x07,0x79,0x78,
|
|
0x87,0x79,0x68,0x03,0x73,0x80,0x87,0x36,0x68,0x87,0x70,0xa0,0x07,0x74,0x00,0xe8,
|
|
0x41,0x1e,0xea,0xa1,0x1c,0x00,0xc2,0x1d,0xde,0xa1,0x0d,0xe8,0x41,0x1e,0xc2,0x01,
|
|
0x1e,0xe0,0x21,0x1d,0xdc,0xe1,0x1c,0xda,0xa0,0x1d,0xc2,0x81,0x1e,0xd0,0x01,0xa0,
|
|
0x07,0x79,0xa8,0x87,0x72,0x00,0x88,0x79,0xa0,0x87,0x70,0x18,0x87,0x75,0x68,0x03,
|
|
0x78,0x90,0x87,0x77,0xa0,0x87,0x72,0x18,0x07,0x7a,0x78,0x07,0x79,0x68,0x03,0x71,
|
|
0xa8,0x07,0x73,0x30,0x87,0x72,0x90,0x87,0x36,0x98,0x87,0x74,0xd0,0x87,0x72,0x00,
|
|
0xf0,0x00,0x20,0xea,0xc1,0x1d,0xe6,0x21,0x1c,0xcc,0xa1,0x1c,0xda,0xc0,0x1c,0xe0,
|
|
0xa1,0x0d,0xda,0x21,0x1c,0xe8,0x01,0x1d,0x00,0x7a,0x90,0x87,0x7a,0x28,0x07,0x60,
|
|
0x83,0x21,0x0c,0xc0,0x02,0x54,0x1b,0x8c,0x81,0x00,0x16,0xa0,0xda,0x80,0x10,0xff,
|
|
0xff,0xff,0xff,0x3f,0x00,0x0c,0x20,0x01,0xd5,0x06,0xa3,0x08,0x80,0x05,0xa8,0x36,
|
|
0x18,0x86,0x00,0x2c,0x40,0xb5,0x01,0x39,0xfe,0xff,0xff,0xff,0x7f,0x00,0x18,0x40,
|
|
0x02,0x2a,0x00,0x00,0x00,0x49,0x18,0x00,0x00,0x04,0x00,0x00,0x00,0x13,0x86,0x40,
|
|
0x18,0x26,0x0c,0x44,0x61,0x4c,0x18,0x8e,0xc2,0x00,0x00,0x00,0x00,0x89,0x20,0x00,
|
|
0x00,0x1d,0x00,0x00,0x00,0x32,0x22,0x48,0x09,0x20,0x64,0x85,0x04,0x93,0x22,0xa4,
|
|
0x84,0x04,0x93,0x22,0xe3,0x84,0xa1,0x90,0x14,0x12,0x4c,0x8a,0x8c,0x0b,0x84,0xa4,
|
|
0x4c,0x10,0x48,0x33,0x00,0xc3,0x08,0x04,0x60,0x83,0x30,0x8c,0x20,0x00,0x47,0x49,
|
|
0x53,0x44,0x09,0x93,0xff,0x4f,0xc4,0x35,0x51,0x11,0xf1,0xdb,0xc3,0x3f,0x8d,0x11,
|
|
0x00,0x83,0x08,0x44,0x70,0x91,0x34,0x45,0x94,0x30,0xf9,0xbf,0x04,0x30,0xcf,0x42,
|
|
0x44,0xff,0x34,0x46,0x00,0x0c,0x22,0x18,0x42,0x29,0xc4,0x08,0xe5,0x10,0x9a,0x23,
|
|
0x08,0xe6,0x08,0xc0,0x60,0x18,0x41,0x58,0x0a,0x12,0xca,0x19,0x8a,0x29,0x40,0x6d,
|
|
0x20,0x20,0x05,0xd6,0x08,0x00,0x00,0x00,0x00,0x13,0xa8,0x70,0x48,0x07,0x79,0xb0,
|
|
0x03,0x3a,0x68,0x83,0x70,0x80,0x07,0x78,0x60,0x87,0x72,0x68,0x83,0x74,0x78,0x87,
|
|
0x79,0xc8,0x03,0x37,0x80,0x03,0x37,0x80,0x83,0x0d,0xb7,0x51,0x0e,0x6d,0x00,0x0f,
|
|
0x7a,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xe9,
|
|
0x10,0x07,0x7a,0x80,0x07,0x7a,0x80,0x07,0x6d,0x90,0x0e,0x78,0xa0,0x07,0x78,0xa0,
|
|
0x07,0x78,0xd0,0x06,0xe9,0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x7a,0x10,0x07,
|
|
0x76,0xd0,0x06,0xe9,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,
|
|
0xd0,0x06,0xe9,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,
|
|
0x06,0xe6,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,
|
|
0xe6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6,
|
|
0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x7a,0x10,0x07,0x76,0xd0,0x06,0xf6,0x20,
|
|
0x07,0x74,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xf6,0x30,0x07,
|
|
0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06,0xf6,0x40,0x07,0x78,
|
|
0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6,0x60,0x07,0x74,0xa0,
|
|
0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6,0x90,0x07,0x76,0xa0,0x07,
|
|
0x71,0x20,0x07,0x78,0xa0,0x07,0x71,0x20,0x07,0x78,0xd0,0x06,0xf6,0x10,0x07,0x72,
|
|
0x80,0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x7a,0x10,0x07,0x72,0x80,0x07,0x6d,0x60,
|
|
0x0f,0x71,0x90,0x07,0x72,0xa0,0x07,0x72,0x50,0x07,0x76,0xa0,0x07,0x72,0x50,0x07,
|
|
0x76,0xd0,0x06,0xf6,0x20,0x07,0x75,0x60,0x07,0x7a,0x20,0x07,0x75,0x60,0x07,0x7a,
|
|
0x20,0x07,0x75,0x60,0x07,0x6d,0x60,0x0f,0x75,0x10,0x07,0x72,0xa0,0x07,0x75,0x10,
|
|
0x07,0x72,0xa0,0x07,0x75,0x10,0x07,0x72,0xd0,0x06,0xf6,0x10,0x07,0x70,0x20,0x07,
|
|
0x74,0xa0,0x07,0x71,0x00,0x07,0x72,0x40,0x07,0x7a,0x10,0x07,0x70,0x20,0x07,0x74,
|
|
0xd0,0x06,0xee,0x80,0x07,0x7a,0x10,0x07,0x76,0xa0,0x07,0x73,0x20,0x07,0x43,0x98,
|
|
0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0x21,0x8c,0x03,0x04,0x80,0x00,0x00,
|
|
0x00,0x00,0x00,0x40,0x16,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x32,0x1e,0x98,
|
|
0x10,0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,0x47,0xc6,0x04,0x43,0x5a,0x25,0x30,0x02,
|
|
0x50,0x04,0x85,0x50,0x10,0x65,0x40,0x70,0x2c,0x41,0x02,0x00,0x00,0x79,0x18,0x00,
|
|
0x00,0xd2,0x00,0x00,0x00,0x1a,0x03,0x4c,0x10,0x97,0x29,0xa2,0x25,0x10,0xab,0x32,
|
|
0xb9,0xb9,0xb4,0x37,0xb7,0x21,0xc6,0x42,0x3c,0x00,0x84,0x50,0xb9,0x1b,0x43,0x0b,
|
|
0x93,0xfb,0x9a,0x4b,0xd3,0x2b,0x1b,0x62,0x2c,0xc2,0x23,0x2c,0x05,0xe3,0x20,0x08,
|
|
0x0e,0x8e,0xad,0x0c,0xa4,0xad,0x8c,0x2e,0x8c,0x0d,0xc4,0xae,0x4c,0x6e,0x2e,0xed,
|
|
0xcd,0x0d,0x64,0x46,0x06,0x46,0x66,0xc6,0x65,0x66,0xa6,0x06,0x04,0xa5,0xad,0x8c,
|
|
0x2e,0x8c,0xcd,0xac,0xac,0x65,0x46,0x06,0x46,0x66,0xc6,0x65,0x66,0xa6,0x26,0x65,
|
|
0x88,0xf0,0x10,0x43,0x8c,0x45,0x58,0x8c,0x65,0x60,0xd1,0x54,0x46,0x17,0xc6,0x36,
|
|
0x04,0x79,0x8e,0x45,0x58,0x84,0x65,0xe0,0x16,0x96,0x26,0xe7,0x32,0xf6,0xd6,0x06,
|
|
0x97,0xc6,0x56,0xe6,0x42,0x56,0xe6,0xf6,0x26,0xd7,0x36,0xf7,0x45,0x96,0x36,0x17,
|
|
0x26,0xc6,0x56,0x36,0x44,0x78,0x12,0x72,0x61,0x69,0x72,0x2e,0x63,0x6f,0x6d,0x70,
|
|
0x69,0x6c,0x65,0x2e,0x66,0x61,0x73,0x74,0x5f,0x6d,0x61,0x74,0x68,0x5f,0x65,0x6e,
|
|
0x61,0x62,0x6c,0x65,0x43,0x84,0x67,0x21,0x19,0x84,0xa5,0xc9,0xb9,0x8c,0xbd,0xb5,
|
|
0xc1,0xa5,0xb1,0x95,0xb9,0x98,0xc9,0x85,0xb5,0x95,0x89,0xd5,0x99,0x99,0x95,0xc9,
|
|
0x7d,0x99,0x95,0xd1,0x8d,0xa1,0x7d,0x95,0xb9,0x85,0x89,0xb1,0x95,0x0d,0x11,0x9e,
|
|
0x86,0x51,0x58,0x9a,0x9c,0x8b,0x5c,0x99,0x1b,0x59,0x99,0xdc,0x17,0x5d,0x98,0xdc,
|
|
0x59,0x19,0x1d,0xa3,0xb0,0x34,0x39,0x97,0x30,0xb9,0xb3,0x2f,0xba,0x3c,0xb8,0xb2,
|
|
0x2f,0xb7,0xb0,0xb6,0x32,0x1a,0x66,0x6c,0x6f,0x61,0x74,0x34,0x64,0xc2,0xd2,0xe4,
|
|
0x5c,0xc2,0xe4,0xce,0xbe,0xdc,0xc2,0xda,0xca,0xa8,0x98,0xc9,0x85,0x9d,0x7d,0x8d,
|
|
0xbd,0xb1,0xbd,0xc9,0x0d,0x61,0x9e,0x67,0x19,0x1e,0xe8,0x89,0x1e,0xe9,0x99,0x86,
|
|
0x08,0x0f,0x45,0x29,0x2c,0x4d,0xce,0xc5,0x4c,0x2e,0xec,0xac,0xad,0xcc,0x8d,0xee,
|
|
0x2b,0xcd,0x0d,0xae,0x8e,0x8e,0x4b,0xdd,0x5c,0x99,0x1c,0x0a,0xdb,0xdb,0x98,0x1b,
|
|
0x4c,0x0a,0x95,0xb0,0x34,0x39,0x97,0xb1,0x32,0x37,0xba,0x32,0x39,0x3e,0x61,0x69,
|
|
0x72,0x2e,0x70,0x65,0x72,0x73,0x70,0x65,0x63,0x74,0x69,0x76,0x65,0x34,0xcc,0xd8,
|
|
0xde,0xc2,0xe8,0x64,0x28,0xd4,0xd9,0x0d,0x91,0x96,0xe1,0xb1,0x9e,0xeb,0xc1,0x9e,
|
|
0xec,0x81,0x1e,0xed,0x91,0x9e,0x8d,0x4b,0xdd,0x5c,0x99,0x1c,0x0a,0xdb,0xdb,0x98,
|
|
0x5b,0x4c,0x0a,0x8b,0xb1,0x37,0xb6,0x37,0xb9,0x21,0xd2,0x22,0x3c,0xd6,0xd3,0x3d,
|
|
0xd8,0x93,0x3d,0xd0,0x13,0x3d,0xd2,0xe3,0x71,0x09,0x4b,0x93,0x73,0xa1,0x2b,0xc3,
|
|
0xa3,0xab,0x93,0x2b,0xa3,0x14,0x96,0x26,0xe7,0xc2,0xf6,0x36,0x16,0x46,0x97,0xf6,
|
|
0xe6,0xf6,0x95,0xe6,0x46,0x56,0x86,0x47,0x25,0x2c,0x4d,0xce,0x65,0x2e,0xac,0x0d,
|
|
0x8e,0xad,0x8c,0x18,0x5d,0x19,0x1e,0x5d,0x9d,0x5c,0x99,0x0c,0x19,0x8f,0x19,0xdb,
|
|
0x5b,0x18,0x1d,0x0b,0xc8,0x5c,0x58,0x1b,0x1c,0x5b,0x99,0x0f,0x07,0xba,0x32,0xbc,
|
|
0x21,0xd4,0x42,0x3c,0x60,0xf0,0x84,0xc1,0x32,0x2c,0xc2,0x23,0x06,0x0f,0xf4,0x8c,
|
|
0xc1,0x23,0x3d,0x64,0xc0,0x25,0x2c,0x4d,0xce,0x65,0x2e,0xac,0x0d,0x8e,0xad,0x4c,
|
|
0x8e,0xc7,0x5c,0x58,0x1b,0x1c,0x5b,0x99,0x1c,0x87,0xb9,0x36,0xb8,0x21,0xd2,0x72,
|
|
0x3c,0x66,0xf0,0x84,0xc1,0x32,0x2c,0xc2,0x03,0x3d,0x67,0xf0,0x48,0x0f,0x1a,0x0c,
|
|
0x41,0x1e,0xee,0xf9,0x9e,0x32,0x78,0xd2,0x60,0x88,0x91,0x00,0x4f,0xf5,0xa8,0x01,
|
|
0xaf,0xb0,0x34,0xb9,0x96,0x30,0xb6,0xb4,0xb0,0xb9,0x96,0xb9,0xb1,0x37,0xb8,0xb2,
|
|
0x39,0x94,0xb6,0xb0,0x34,0x37,0x98,0x94,0x21,0xc4,0xd3,0x06,0x0f,0x1b,0x10,0x0b,
|
|
0x4b,0x93,0x6b,0x09,0x63,0x4b,0x0b,0x9b,0x6b,0x99,0x1b,0x7b,0x83,0x2b,0x6b,0xa1,
|
|
0x2b,0xc3,0xa3,0xab,0x93,0x2b,0x9b,0x1b,0x62,0x3c,0x6f,0xf0,0xb4,0xc1,0xe3,0x06,
|
|
0xc4,0xc2,0xd2,0xe4,0x5a,0xc2,0xd8,0xd2,0xc2,0xe6,0x5a,0xe6,0xc6,0xde,0xe0,0xca,
|
|
0x5a,0xe6,0xc2,0xda,0xe0,0xd8,0xca,0xe4,0xe6,0x86,0x18,0x4f,0x1c,0x3c,0x6d,0xf0,
|
|
0xc0,0xc1,0x10,0xe2,0x79,0x83,0x27,0x0e,0x46,0x44,0xec,0xc0,0x0e,0xf6,0xd0,0x0e,
|
|
0x6e,0xd0,0x0e,0xef,0x40,0x0e,0xf5,0xc0,0x0e,0xe5,0xe0,0x06,0xe6,0xc0,0x0e,0xe1,
|
|
0x70,0x0e,0xf3,0x30,0x45,0x08,0x86,0x11,0x0a,0x3b,0xb0,0x83,0x3d,0xb4,0x83,0x1b,
|
|
0xa4,0x03,0x39,0x94,0x83,0x3b,0xd0,0xc3,0x94,0xa0,0x18,0xb1,0x84,0x43,0x3a,0xc8,
|
|
0x83,0x1b,0xd8,0x43,0x39,0xc8,0xc3,0x3c,0xa4,0xc3,0x3b,0xb8,0xc3,0x94,0xc0,0x18,
|
|
0x41,0x85,0x43,0x3a,0xc8,0x83,0x1b,0xb0,0x43,0x38,0xb8,0xc3,0x39,0xd4,0x43,0x38,
|
|
0x9c,0x43,0x39,0xfc,0x82,0x3d,0x94,0x83,0x3c,0xcc,0x43,0x3a,0xbc,0x83,0x3b,0x4c,
|
|
0x09,0x90,0x11,0x53,0x38,0xa4,0x83,0x3c,0xb8,0xc1,0x38,0xbc,0x43,0x3b,0xc0,0x43,
|
|
0x3a,0xb0,0x43,0x39,0xfc,0xc2,0x3b,0xc0,0x03,0x3d,0xa4,0xc3,0x3b,0xb8,0xc3,0x3c,
|
|
0x4c,0x19,0x14,0xc6,0x19,0xc1,0x84,0x43,0x3a,0xc8,0x83,0x1b,0x98,0x83,0x3c,0x84,
|
|
0xc3,0x39,0xb4,0x43,0x39,0xb8,0x03,0x3d,0x4c,0x09,0xd6,0x00,0x00,0x79,0x18,0x00,
|
|
0x00,0xa5,0x00,0x00,0x00,0x33,0x08,0x80,0x1c,0xc4,0xe1,0x1c,0x66,0x14,0x01,0x3d,
|
|
0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,0x07,0x79,0x78,0x07,0x73,0x98,0x71,0x0c,
|
|
0xe6,0x00,0x0f,0xed,0x10,0x0e,0xf4,0x80,0x0e,0x33,0x0c,0x42,0x1e,0xc2,0xc1,0x1d,
|
|
0xce,0xa1,0x1c,0x66,0x30,0x05,0x3d,0x88,0x43,0x38,0x84,0x83,0x1b,0xcc,0x03,0x3d,
|
|
0xc8,0x43,0x3d,0x8c,0x03,0x3d,0xcc,0x78,0x8c,0x74,0x70,0x07,0x7b,0x08,0x07,0x79,
|
|
0x48,0x87,0x70,0x70,0x07,0x7a,0x70,0x03,0x76,0x78,0x87,0x70,0x20,0x87,0x19,0xcc,
|
|
0x11,0x0e,0xec,0x90,0x0e,0xe1,0x30,0x0f,0x6e,0x30,0x0f,0xe3,0xf0,0x0e,0xf0,0x50,
|
|
0x0e,0x33,0x10,0xc4,0x1d,0xde,0x21,0x1c,0xd8,0x21,0x1d,0xc2,0x61,0x1e,0x66,0x30,
|
|
0x89,0x3b,0xbc,0x83,0x3b,0xd0,0x43,0x39,0xb4,0x03,0x3c,0xbc,0x83,0x3c,0x84,0x03,
|
|
0x3b,0xcc,0xf0,0x14,0x76,0x60,0x07,0x7b,0x68,0x07,0x37,0x68,0x87,0x72,0x68,0x07,
|
|
0x37,0x80,0x87,0x70,0x90,0x87,0x70,0x60,0x07,0x76,0x28,0x07,0x76,0xf8,0x05,0x76,
|
|
0x78,0x87,0x77,0x80,0x87,0x5f,0x08,0x87,0x71,0x18,0x87,0x72,0x98,0x87,0x79,0x98,
|
|
0x81,0x2c,0xee,0xf0,0x0e,0xee,0xe0,0x0e,0xf5,0xc0,0x0e,0xec,0x30,0x03,0x62,0xc8,
|
|
0xa1,0x1c,0xe4,0xa1,0x1c,0xcc,0xa1,0x1c,0xe4,0xa1,0x1c,0xdc,0x61,0x1c,0xca,0x21,
|
|
0x1c,0xc4,0x81,0x1d,0xca,0x61,0x06,0xd6,0x90,0x43,0x39,0xc8,0x43,0x39,0x98,0x43,
|
|
0x39,0xc8,0x43,0x39,0xb8,0xc3,0x38,0x94,0x43,0x38,0x88,0x03,0x3b,0x94,0xc3,0x2f,
|
|
0xbc,0x83,0x3c,0xfc,0x82,0x3b,0xd4,0x03,0x3b,0xb0,0xc3,0x0c,0xc7,0x69,0x87,0x70,
|
|
0x58,0x87,0x72,0x70,0x83,0x74,0x68,0x07,0x78,0x60,0x87,0x74,0x18,0x87,0x74,0xa0,
|
|
0x87,0x19,0xce,0x53,0x0f,0xee,0x00,0x0f,0xf2,0x50,0x0e,0xe4,0x90,0x0e,0xe3,0x40,
|
|
0x0f,0xe1,0x20,0x0e,0xec,0x50,0x0e,0x33,0x20,0x28,0x1d,0xdc,0xc1,0x1e,0xc2,0x41,
|
|
0x1e,0xd2,0x21,0x1c,0xdc,0x81,0x1e,0xdc,0xe0,0x1c,0xe4,0xe1,0x1d,0xea,0x01,0x1e,
|
|
0x66,0x18,0x51,0x38,0xb0,0x43,0x3a,0x9c,0x83,0x3b,0xcc,0x50,0x24,0x76,0x60,0x07,
|
|
0x7b,0x68,0x07,0x37,0x60,0x87,0x77,0x78,0x07,0x78,0x98,0x51,0x4c,0xf4,0x90,0x0f,
|
|
0xf0,0x50,0x0e,0x33,0x1e,0x6a,0x1e,0xca,0x61,0x1c,0xe8,0x21,0x1d,0xde,0xc1,0x1d,
|
|
0x7e,0x01,0x1e,0xe4,0xa1,0x1c,0xcc,0x21,0x1d,0xf0,0x61,0x06,0x54,0x85,0x83,0x38,
|
|
0xcc,0xc3,0x3b,0xb0,0x43,0x3d,0xd0,0x43,0x39,0xfc,0xc2,0x3c,0xe4,0x43,0x3b,0x88,
|
|
0xc3,0x3b,0xb0,0xc3,0x8c,0xc5,0x0a,0x87,0x79,0x98,0x87,0x77,0x18,0x87,0x74,0x08,
|
|
0x07,0x7a,0x28,0x07,0x72,0x98,0x81,0x5c,0xe3,0x10,0x0e,0xec,0xc0,0x0e,0xe5,0x50,
|
|
0x0e,0xf3,0x30,0x23,0xc1,0xd2,0x41,0x1e,0xe4,0xe1,0x17,0xd8,0xe1,0x1d,0xde,0x01,
|
|
0x1e,0x66,0x48,0x19,0x3b,0xb0,0x83,0x3d,0xb4,0x83,0x1b,0x84,0xc3,0x38,0x8c,0x43,
|
|
0x39,0xcc,0xc3,0x3c,0xb8,0xc1,0x39,0xc8,0xc3,0x3b,0xd4,0x03,0x3c,0xcc,0x48,0xb4,
|
|
0x71,0x08,0x07,0x76,0x60,0x07,0x71,0x08,0x87,0x71,0x58,0x87,0x19,0xdb,0xc6,0x0e,
|
|
0xec,0x60,0x0f,0xed,0xe0,0x06,0xf0,0x20,0x0f,0xe5,0x30,0x0f,0xe5,0x20,0x0f,0xf6,
|
|
0x50,0x0e,0x6e,0x10,0x0e,0xe3,0x30,0x0e,0xe5,0x30,0x0f,0xf3,0xe0,0x06,0xe9,0xe0,
|
|
0x0e,0xe4,0x50,0x0e,0xf8,0x30,0x23,0xe2,0xec,0x61,0x1c,0xc2,0x81,0x1d,0xd8,0xe1,
|
|
0x17,0xec,0x21,0x1d,0xe6,0x21,0x1d,0xc4,0x21,0x1d,0xd8,0x21,0x1d,0xe8,0x21,0x1f,
|
|
0x66,0x20,0x9d,0x3b,0xbc,0x43,0x3d,0xb8,0x03,0x39,0x94,0x83,0x39,0xcc,0x58,0xbc,
|
|
0x70,0x70,0x07,0x77,0x78,0x07,0x7a,0x08,0x07,0x7a,0x48,0x87,0x77,0x70,0x87,0x19,
|
|
0xce,0x87,0x0e,0xe5,0x10,0x0e,0xf0,0x10,0x0e,0xec,0xc0,0x0e,0xef,0x30,0x0e,0xf3,
|
|
0x90,0x0e,0xf4,0x50,0x0e,0x33,0x28,0x30,0x08,0x87,0x74,0x90,0x07,0x37,0x30,0x87,
|
|
0x7a,0x70,0x87,0x71,0xa0,0x87,0x74,0x78,0x07,0x77,0xf8,0x85,0x73,0x90,0x87,0x77,
|
|
0xa8,0x07,0x78,0x98,0x07,0x00,0x00,0x00,0x00,0x71,0x20,0x00,0x00,0x08,0x00,0x00,
|
|
0x00,0x16,0xb0,0x01,0x48,0xe4,0x4b,0x00,0xf3,0x2c,0xc4,0x3f,0x11,0xd7,0x44,0x45,
|
|
0xc4,0x6f,0x0f,0x7e,0x85,0x17,0xb7,0x6d,0x00,0x05,0x03,0x20,0x0d,0x0d,0x00,0x00,
|
|
0x00,0x61,0x20,0x00,0x00,0x11,0x00,0x00,0x00,0x13,0x04,0x41,0x2c,0x10,0x00,0x00,
|
|
0x00,0x04,0x00,0x00,0x00,0xc4,0x46,0x00,0x48,0x8d,0x00,0xd4,0x00,0x89,0x19,0x00,
|
|
0x02,0x23,0x00,0x00,0x00,0x23,0x06,0xca,0x10,0x44,0x87,0x91,0x0c,0x05,0x11,0x58,
|
|
0x90,0xc8,0x67,0xb6,0x81,0x08,0x80,0x0c,0x02,0x62,0x00,0x00,0x00,0x02,0x00,0x00,
|
|
0x00,0x5b,0x06,0xe0,0x90,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct vs_params
|
|
{
|
|
float2 disp_size;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 position [[attribute(0)]];
|
|
float2 texcoord0 [[attribute(1)]];
|
|
float4 color0 [[attribute(2)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _22 [[buffer(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.gl_Position = float4(((in.position / _22.disp_size) - float2(0.5)) * float2(2.0, -2.0), 0.5, 1.0);
|
|
out.uv = in.texcoord0;
|
|
out.color = in.color0;
|
|
return out;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_source_metal_sim[672] = {
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x76,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,0x65,0x3b,
|
|
0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x32,0x20,0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,
|
|
0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
|
|
0x6f,0x63,0x6e,0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,
|
|
0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,
|
|
0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,
|
|
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,
|
|
0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,
|
|
0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,
|
|
0x6e,0x74,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x32,
|
|
0x32,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,
|
|
0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,
|
|
0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,
|
|
0x69,0x74,0x69,0x6f,0x6e,0x20,0x2f,0x20,0x5f,0x32,0x32,0x2e,0x64,0x69,0x73,0x70,
|
|
0x5f,0x73,0x69,0x7a,0x65,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x32,
|
|
0x2e,0x30,0x2c,0x20,0x2d,0x32,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x75,0x76,
|
|
0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
};
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 uv [[user(locn0)]];
|
|
float4 color [[user(locn1)]];
|
|
};
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> tex [[texture(0)]], sampler smp [[sampler(0)]])
|
|
{
|
|
main0_out out = {};
|
|
out.frag_color = tex.sample(smp, in.uv) * in.color;
|
|
return out;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_source_metal_sim[436] = {
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,
|
|
0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
|
0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,
|
|
0x75,0x76,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,
|
|
0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
|
|
0x31,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,
|
|
0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,
|
|
0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x74,0x65,
|
|
0x78,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x30,0x29,0x5d,0x5d,
|
|
0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x6d,0x70,0x20,0x5b,0x5b,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,
|
|
0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,
|
|
0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,
|
|
0x75,0x76,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x00,
|
|
};
|
|
#elif defined(SOKOL_D3D11)
|
|
/*
|
|
cbuffer vs_params : register(b0)
|
|
{
|
|
float2 _22_disp_size : packoffset(c0);
|
|
};
|
|
|
|
|
|
static float4 gl_Position;
|
|
static float2 position;
|
|
static float2 uv;
|
|
static float2 texcoord0;
|
|
static float4 color;
|
|
static float4 color0;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float2 position : TEXCOORD0;
|
|
float2 texcoord0 : TEXCOORD1;
|
|
float4 color0 : TEXCOORD2;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
float4 color : TEXCOORD1;
|
|
float4 gl_Position : SV_Position;
|
|
};
|
|
|
|
void vert_main()
|
|
{
|
|
gl_Position = float4(((position / _22_disp_size) - 0.5f.xx) * float2(2.0f, -2.0f), 0.5f, 1.0f);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
position = stage_input.position;
|
|
texcoord0 = stage_input.texcoord0;
|
|
color0 = stage_input.color0;
|
|
vert_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.gl_Position = gl_Position;
|
|
stage_output.uv = uv;
|
|
stage_output.color = color;
|
|
return stage_output;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_bytecode_hlsl4[892] = {
|
|
0x44,0x58,0x42,0x43,0x0d,0xbd,0x9e,0x9e,0x7d,0xc0,0x2b,0x54,0x88,0xf9,0xca,0x89,
|
|
0x32,0xe4,0x0c,0x59,0x01,0x00,0x00,0x00,0x7c,0x03,0x00,0x00,0x05,0x00,0x00,0x00,
|
|
0x34,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x60,0x01,0x00,0x00,0xd0,0x01,0x00,0x00,
|
|
0x00,0x03,0x00,0x00,0x52,0x44,0x45,0x46,0xc0,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x04,0xfe,0xff,
|
|
0x10,0x81,0x00,0x00,0x98,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x00,0xab,0xab,0x3c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x60,0x00,0x00,0x00,
|
|
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x5f,0x32,0x32,0x5f,0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,
|
|
0x65,0x00,0xab,0xab,0x01,0x00,0x03,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,
|
|
0x29,0x20,0x48,0x4c,0x53,0x4c,0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,
|
|
0x6d,0x70,0x69,0x6c,0x65,0x72,0x20,0x31,0x30,0x2e,0x31,0x00,0x49,0x53,0x47,0x4e,
|
|
0x5c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x03,0x03,0x00,0x00,0x50,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x50,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
|
|
0x0f,0x0f,0x00,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0xab,0xab,0xab,
|
|
0x4f,0x53,0x47,0x4e,0x68,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
|
|
0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x03,0x0c,0x00,0x00,0x50,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,
|
|
0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
|
|
0x00,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0xab,0xab,0xab,
|
|
0x53,0x48,0x44,0x52,0x28,0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x4a,0x00,0x00,0x00,
|
|
0x59,0x00,0x00,0x04,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x5f,0x00,0x00,0x03,0x32,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,
|
|
0x32,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0xf2,0x10,0x10,0x00,
|
|
0x02,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0x32,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x67,0x00,0x00,0x04,
|
|
0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x68,0x00,0x00,0x02,
|
|
0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0x32,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x46,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0xf2,0x20,0x10,0x00,
|
|
0x01,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x02,0x00,0x00,0x00,0x0e,0x00,0x00,0x08,
|
|
0x32,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x46,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,
|
|
0x32,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x02,0x40,0x00,0x00,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x0a,0x32,0x20,0x10,0x00,0x02,0x00,0x00,0x00,
|
|
0x46,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x40,
|
|
0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x08,
|
|
0xc2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x00,0x80,0x3f,0x3e,0x00,0x00,0x01,
|
|
0x53,0x54,0x41,0x54,0x74,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
/*
|
|
Texture2D<float4> tex : register(t0);
|
|
SamplerState smp : register(s0);
|
|
|
|
static float4 frag_color;
|
|
static float2 uv;
|
|
static float4 color;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float2 uv : TEXCOORD0;
|
|
float4 color : TEXCOORD1;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float4 frag_color : SV_Target0;
|
|
};
|
|
|
|
void frag_main()
|
|
{
|
|
frag_color = tex.Sample(smp, uv) * color;
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
uv = stage_input.uv;
|
|
color = stage_input.color;
|
|
frag_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.frag_color = frag_color;
|
|
return stage_output;
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_bytecode_hlsl4[608] = {
|
|
0x44,0x58,0x42,0x43,0x3a,0xa7,0x41,0x21,0xb4,0x2d,0xa7,0x6e,0xfe,0x31,0xb0,0xe0,
|
|
0x14,0xe0,0xdf,0x5a,0x01,0x00,0x00,0x00,0x60,0x02,0x00,0x00,0x05,0x00,0x00,0x00,
|
|
0x34,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x14,0x01,0x00,0x00,0x48,0x01,0x00,0x00,
|
|
0xe4,0x01,0x00,0x00,0x52,0x44,0x45,0x46,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x04,0xff,0xff,
|
|
0x10,0x81,0x00,0x00,0x64,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
|
|
0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x73,0x6d,0x70,0x00,0x74,0x65,0x78,0x00,
|
|
0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,
|
|
0x53,0x4c,0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,0x6d,0x70,0x69,0x6c,
|
|
0x65,0x72,0x20,0x31,0x30,0x2e,0x31,0x00,0x49,0x53,0x47,0x4e,0x44,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,
|
|
0x38,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
|
|
0x00,0xab,0xab,0xab,0x4f,0x53,0x47,0x4e,0x2c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x08,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x53,0x56,0x5f,0x54,
|
|
0x61,0x72,0x67,0x65,0x74,0x00,0xab,0xab,0x53,0x48,0x44,0x52,0x94,0x00,0x00,0x00,
|
|
0x40,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x5a,0x00,0x00,0x03,0x00,0x60,0x10,0x00,
|
|
0x00,0x00,0x00,0x00,0x58,0x18,0x00,0x04,0x00,0x70,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x55,0x55,0x00,0x00,0x62,0x10,0x00,0x03,0x32,0x10,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x62,0x10,0x00,0x03,0xf2,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x65,0x00,0x00,0x03,
|
|
0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,
|
|
0x45,0x00,0x00,0x09,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,
|
|
0x00,0x00,0x00,0x00,0x46,0x7e,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x10,0x00,
|
|
0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x07,0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
|
|
0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,
|
|
0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,0x74,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
};
|
|
#elif defined(SOKOL_WGPU)
|
|
/*
|
|
diagnostic(off, derivative_uniformity);
|
|
|
|
struct vs_params {
|
|
/_ @offset(0) _/
|
|
disp_size : vec2f,
|
|
}
|
|
|
|
var<private> position_1 : vec2f;
|
|
|
|
@binding(0) @group(0) var<uniform> x_22 : vs_params;
|
|
|
|
var<private> uv : vec2f;
|
|
|
|
var<private> texcoord0 : vec2f;
|
|
|
|
var<private> color : vec4f;
|
|
|
|
var<private> color0 : vec4f;
|
|
|
|
var<private> gl_Position : vec4f;
|
|
|
|
fn main_1() {
|
|
let x_33 = (((position_1 / x_22.disp_size) - vec2f(0.5f)) * vec2f(2.0f, -2.0f));
|
|
gl_Position = vec4f(x_33.x, x_33.y, 0.5f, 1.0f);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
return;
|
|
}
|
|
|
|
struct main_out {
|
|
@builtin(position)
|
|
gl_Position : vec4f,
|
|
@location(0)
|
|
uv_1 : vec2f,
|
|
@location(1)
|
|
color_1 : vec4f,
|
|
}
|
|
|
|
@vertex
|
|
fn main(@location(0) position_1_param : vec2f, @location(1) texcoord0_param : vec2f, @location(2) color0_param : vec4f) -> main_out {
|
|
position_1 = position_1_param;
|
|
texcoord0 = texcoord0_param;
|
|
color0 = color0_param;
|
|
main_1();
|
|
return main_out(gl_Position, uv, color);
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_vs_source_wgsl[960] = {
|
|
0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
|
|
0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
|
|
0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
|
|
0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x7b,0x0a,0x20,0x20,0x2f,0x2a,
|
|
0x20,0x40,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x30,0x29,0x20,0x2a,0x2f,0x0a,0x20,
|
|
0x20,0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,0x65,0x20,0x3a,0x20,0x76,0x65,0x63,
|
|
0x32,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,
|
|
0x74,0x65,0x3e,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,0x20,0x3a,
|
|
0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x40,0x62,0x69,0x6e,0x64,0x69,0x6e,
|
|
0x67,0x28,0x30,0x29,0x20,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x30,0x29,0x20,0x76,
|
|
0x61,0x72,0x3c,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x3e,0x20,0x78,0x5f,0x32,0x32,
|
|
0x20,0x3a,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x3b,0x0a,0x0a,0x76,
|
|
0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,
|
|
0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
|
|
0x76,0x61,0x74,0x65,0x3e,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,
|
|
0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,
|
|
0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,
|
|
0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,
|
|
0x74,0x65,0x3e,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,
|
|
0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,
|
|
0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,
|
|
0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,
|
|
0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,
|
|
0x20,0x3d,0x20,0x28,0x28,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,
|
|
0x20,0x2f,0x20,0x78,0x5f,0x32,0x32,0x2e,0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,
|
|
0x65,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x66,0x28,0x30,0x2e,0x35,0x66,0x29,
|
|
0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x32,0x66,0x28,0x32,0x2e,0x30,0x66,0x2c,0x20,
|
|
0x2d,0x32,0x2e,0x30,0x66,0x29,0x29,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x66,0x28,0x78,
|
|
0x5f,0x33,0x33,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x33,0x33,0x2e,0x79,0x2c,0x20,0x30,
|
|
0x2e,0x35,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x75,0x76,
|
|
0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,
|
|
0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,
|
|
0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,
|
|
0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,
|
|
0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,
|
|
0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,
|
|
0x31,0x29,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,
|
|
0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5f,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x5f,0x31,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,
|
|
0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,
|
|
0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,0x70,
|
|
0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,
|
|
0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,
|
|
0x20,0x75,0x76,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x00,
|
|
|
|
};
|
|
/*
|
|
diagnostic(off, derivative_uniformity);
|
|
|
|
var<private> frag_color : vec4f;
|
|
|
|
@binding(0) @group(1) var tex : texture_2d<f32>;
|
|
|
|
@binding(32) @group(1) var smp : sampler;
|
|
|
|
var<private> uv : vec2f;
|
|
|
|
var<private> color : vec4f;
|
|
|
|
fn main_1() {
|
|
let x_23 = uv;
|
|
let x_24 = textureSample(tex, smp, x_23);
|
|
frag_color = (x_24 * color);
|
|
return;
|
|
}
|
|
|
|
struct main_out {
|
|
@location(0)
|
|
frag_color_1 : vec4f,
|
|
}
|
|
|
|
@fragment
|
|
fn main(@location(0) uv_param : vec2f, @location(1) color_param : vec4f) -> main_out {
|
|
uv = uv_param;
|
|
color = color_param;
|
|
main_1();
|
|
return main_out(frag_color);
|
|
}
|
|
*/
|
|
static const uint8_t _simgui_fs_source_wgsl[585] = {
|
|
0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20,
|
|
0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f,
|
|
0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,
|
|
0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x40,0x62,0x69,0x6e,0x64,
|
|
0x69,0x6e,0x67,0x28,0x30,0x29,0x20,0x40,0x67,0x72,0x6f,0x75,0x70,0x28,0x31,0x29,
|
|
0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x78,0x20,0x3a,0x20,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a,0x0a,0x40,0x62,0x69,
|
|
0x6e,0x64,0x69,0x6e,0x67,0x28,0x33,0x32,0x29,0x20,0x40,0x67,0x72,0x6f,0x75,0x70,
|
|
0x28,0x31,0x29,0x20,0x76,0x61,0x72,0x20,0x73,0x6d,0x70,0x20,0x3a,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,
|
|
0x61,0x74,0x65,0x3e,0x20,0x75,0x76,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x3b,
|
|
0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,
|
|
0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,
|
|
0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,
|
|
0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x2c,0x20,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,
|
|
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x28,0x78,0x5f,0x32,0x34,0x20,0x2a,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,
|
|
0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,
|
|
0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,
|
|
0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,
|
|
0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
|
|
0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x00,
|
|
};
|
|
#elif defined(SOKOL_VULKAN)
|
|
/*
|
|
#version 460
|
|
|
|
layout(set = 0, binding = 0, std140) uniform vs_params
|
|
{
|
|
vec2 disp_size;
|
|
} _22;
|
|
|
|
layout(location = 0) in vec2 position;
|
|
layout(location = 0) out vec2 uv;
|
|
layout(location = 1) in vec2 texcoord0;
|
|
layout(location = 1) out vec4 color;
|
|
layout(location = 2) in vec4 color0;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(((position / _22.disp_size) - vec2(0.5)) * vec2(2.0, -2.0), 0.5, 1.0);
|
|
uv = texcoord0;
|
|
color = color0;
|
|
}
|
|
|
|
*/
|
|
static const uint8_t _simgui_vs_bytecode_spirv_vk[1472] = {
|
|
0x03,0x02,0x23,0x07,0x00,0x04,0x01,0x00,0x0b,0x00,0x08,0x00,0x30,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x11,0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x0b,0x00,0x06,0x00,
|
|
0x01,0x00,0x00,0x00,0x47,0x4c,0x53,0x4c,0x2e,0x73,0x74,0x64,0x2e,0x34,0x35,0x30,
|
|
0x00,0x00,0x00,0x00,0x0e,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x0f,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,
|
|
0x00,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
|
|
0x29,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,
|
|
0x03,0x00,0x03,0x00,0x02,0x00,0x00,0x00,0xcc,0x01,0x00,0x00,0x05,0x00,0x04,0x00,
|
|
0x04,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x00,0x00,0x00,0x05,0x00,0x06,0x00,
|
|
0x0b,0x00,0x00,0x00,0x67,0x6c,0x5f,0x50,0x65,0x72,0x56,0x65,0x72,0x74,0x65,0x78,
|
|
0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x06,0x00,0x07,0x00,
|
|
0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x67,0x6c,0x5f,0x50,0x6f,0x69,0x6e,0x74,
|
|
0x53,0x69,0x7a,0x65,0x00,0x00,0x00,0x00,0x06,0x00,0x07,0x00,0x0b,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x67,0x6c,0x5f,0x43,0x6c,0x69,0x70,0x44,0x69,0x73,0x74,0x61,
|
|
0x6e,0x63,0x65,0x00,0x06,0x00,0x07,0x00,0x0b,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x67,0x6c,0x5f,0x43,0x75,0x6c,0x6c,0x44,0x69,0x73,0x74,0x61,0x6e,0x63,0x65,0x00,
|
|
0x05,0x00,0x03,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x05,0x00,
|
|
0x12,0x00,0x00,0x00,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x00,0x00,0x00,0x00,
|
|
0x05,0x00,0x05,0x00,0x14,0x00,0x00,0x00,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x64,0x69,0x73,0x70,0x5f,0x73,0x69,0x7a,0x65,0x00,0x00,0x00,0x05,0x00,0x03,0x00,
|
|
0x16,0x00,0x00,0x00,0x5f,0x32,0x32,0x00,0x05,0x00,0x03,0x00,0x29,0x00,0x00,0x00,
|
|
0x75,0x76,0x00,0x00,0x05,0x00,0x05,0x00,0x2a,0x00,0x00,0x00,0x74,0x65,0x78,0x63,
|
|
0x6f,0x6f,0x72,0x64,0x30,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x2c,0x00,0x00,0x00,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x2e,0x00,0x00,0x00,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x30,0x00,0x00,0x47,0x00,0x03,0x00,0x0b,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x48,0x00,0x05,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x05,0x00,0x0b,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48,0x00,0x05,0x00,
|
|
0x0b,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x48,0x00,0x05,0x00,0x0b,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,
|
|
0x04,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x12,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x47,0x00,0x03,0x00,0x14,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
|
|
0x48,0x00,0x05,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x16,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x16,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x29,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x2a,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x2c,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x2e,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x13,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x21,0x00,0x03,0x00,
|
|
0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x16,0x00,0x03,0x00,0x06,0x00,0x00,0x00,
|
|
0x20,0x00,0x00,0x00,0x17,0x00,0x04,0x00,0x07,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
|
|
0x04,0x00,0x00,0x00,0x15,0x00,0x04,0x00,0x08,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x2b,0x00,0x04,0x00,0x08,0x00,0x00,0x00,0x09,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x1c,0x00,0x04,0x00,0x0a,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
|
|
0x09,0x00,0x00,0x00,0x1e,0x00,0x06,0x00,0x0b,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
|
|
0x06,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x20,0x00,0x04,0x00,
|
|
0x0c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,
|
|
0x0c,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x15,0x00,0x04,0x00,
|
|
0x0e,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x2b,0x00,0x04,0x00,
|
|
0x0e,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x00,0x04,0x00,
|
|
0x10,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x20,0x00,0x04,0x00,
|
|
0x11,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,
|
|
0x11,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1e,0x00,0x03,0x00,
|
|
0x14,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x15,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,0x15,0x00,0x00,0x00,
|
|
0x16,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x17,0x00,0x00,0x00,
|
|
0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x2b,0x00,0x04,0x00,0x06,0x00,0x00,0x00,
|
|
0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x2c,0x00,0x05,0x00,0x10,0x00,0x00,0x00,
|
|
0x1c,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x2b,0x00,0x04,0x00,
|
|
0x06,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x2b,0x00,0x04,0x00,
|
|
0x06,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x2c,0x00,0x05,0x00,
|
|
0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,
|
|
0x2b,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,
|
|
0x20,0x00,0x04,0x00,0x26,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
|
|
0x20,0x00,0x04,0x00,0x28,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x28,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x11,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x26,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
|
0x20,0x00,0x04,0x00,0x2d,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x2d,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x36,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x03,0x00,0x00,0x00,0xf8,0x00,0x02,0x00,0x05,0x00,0x00,0x00,0x3d,0x00,0x04,0x00,
|
|
0x10,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x41,0x00,0x05,0x00,
|
|
0x17,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,
|
|
0x3d,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
|
|
0x88,0x00,0x05,0x00,0x10,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
|
|
0x19,0x00,0x00,0x00,0x83,0x00,0x05,0x00,0x10,0x00,0x00,0x00,0x1d,0x00,0x00,0x00,
|
|
0x1a,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x85,0x00,0x05,0x00,0x10,0x00,0x00,0x00,
|
|
0x21,0x00,0x00,0x00,0x1d,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x51,0x00,0x05,0x00,
|
|
0x06,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x51,0x00,0x05,0x00,0x06,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x21,0x00,0x00,0x00,
|
|
0x01,0x00,0x00,0x00,0x50,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
|
|
0x23,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
|
|
0x41,0x00,0x05,0x00,0x26,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,
|
|
0x0f,0x00,0x00,0x00,0x3e,0x00,0x03,0x00,0x27,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
|
|
0x3d,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,
|
|
0x3e,0x00,0x03,0x00,0x29,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,0x3d,0x00,0x04,0x00,
|
|
0x07,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x3e,0x00,0x03,0x00,
|
|
0x2c,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0xfd,0x00,0x01,0x00,0x38,0x00,0x01,0x00,
|
|
};
|
|
/*
|
|
#version 460
|
|
|
|
layout(set = 1, binding = 0) uniform texture2D tex;
|
|
layout(set = 1, binding = 32) uniform sampler smp;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 0) in vec2 uv;
|
|
layout(location = 1) in vec4 color;
|
|
|
|
void main()
|
|
{
|
|
frag_color = texture(sampler2D(tex, smp), uv) * color;
|
|
}
|
|
|
|
*/
|
|
static const uint8_t _simgui_fs_bytecode_spirv_vk[780] = {
|
|
0x03,0x02,0x23,0x07,0x00,0x04,0x01,0x00,0x0b,0x00,0x08,0x00,0x1d,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x11,0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x0b,0x00,0x06,0x00,
|
|
0x01,0x00,0x00,0x00,0x47,0x4c,0x53,0x4c,0x2e,0x73,0x74,0x64,0x2e,0x34,0x35,0x30,
|
|
0x00,0x00,0x00,0x00,0x0e,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x0f,0x00,0x0a,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,
|
|
0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
|
|
0x16,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x10,0x00,0x03,0x00,0x04,0x00,0x00,0x00,
|
|
0x07,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x02,0x00,0x00,0x00,0xcc,0x01,0x00,0x00,
|
|
0x05,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x6d,0x61,0x69,0x6e,0x00,0x00,0x00,0x00,
|
|
0x05,0x00,0x05,0x00,0x09,0x00,0x00,0x00,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x00,0x00,0x05,0x00,0x03,0x00,0x0c,0x00,0x00,0x00,0x74,0x65,0x78,0x00,
|
|
0x05,0x00,0x03,0x00,0x10,0x00,0x00,0x00,0x73,0x6d,0x70,0x00,0x05,0x00,0x03,0x00,
|
|
0x16,0x00,0x00,0x00,0x75,0x76,0x00,0x00,0x05,0x00,0x04,0x00,0x1a,0x00,0x00,0x00,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x09,0x00,0x00,0x00,
|
|
0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x0c,0x00,0x00,0x00,
|
|
0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x0c,0x00,0x00,0x00,
|
|
0x22,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
|
|
0x21,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
|
|
0x22,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x16,0x00,0x00,0x00,
|
|
0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x04,0x00,0x1a,0x00,0x00,0x00,
|
|
0x1e,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x13,0x00,0x02,0x00,0x02,0x00,0x00,0x00,
|
|
0x21,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x16,0x00,0x03,0x00,
|
|
0x06,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x17,0x00,0x04,0x00,0x07,0x00,0x00,0x00,
|
|
0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x08,0x00,0x00,0x00,
|
|
0x03,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,0x08,0x00,0x00,0x00,
|
|
0x09,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x19,0x00,0x09,0x00,0x0a,0x00,0x00,0x00,
|
|
0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x04,0x00,
|
|
0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,
|
|
0x0b,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0x00,0x02,0x00,
|
|
0x0e,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x0e,0x00,0x00,0x00,0x3b,0x00,0x04,0x00,0x0f,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,0x1b,0x00,0x03,0x00,0x12,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
|
|
0x17,0x00,0x04,0x00,0x14,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
|
|
0x20,0x00,0x04,0x00,0x15,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x15,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x20,0x00,0x04,0x00,0x19,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
|
|
0x3b,0x00,0x04,0x00,0x19,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
|
|
0x36,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
0x03,0x00,0x00,0x00,0xf8,0x00,0x02,0x00,0x05,0x00,0x00,0x00,0x3d,0x00,0x04,0x00,
|
|
0x0a,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x3d,0x00,0x04,0x00,
|
|
0x0e,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x56,0x00,0x05,0x00,
|
|
0x12,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x11,0x00,0x00,0x00,
|
|
0x3d,0x00,0x04,0x00,0x14,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x16,0x00,0x00,0x00,
|
|
0x57,0x00,0x05,0x00,0x07,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
|
|
0x17,0x00,0x00,0x00,0x3d,0x00,0x04,0x00,0x07,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,
|
|
0x1a,0x00,0x00,0x00,0x85,0x00,0x05,0x00,0x07,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,
|
|
0x18,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x3e,0x00,0x03,0x00,0x09,0x00,0x00,0x00,
|
|
0x1c,0x00,0x00,0x00,0xfd,0x00,0x01,0x00,0x38,0x00,0x01,0x00,
|
|
};
|
|
#elif defined(SOKOL_DUMMY_BACKEND)
|
|
static const char* _simgui_vs_source_dummy = "";
|
|
static const char* _simgui_fs_source_dummy = "";
|
|
#else
|
|
#error "Please define one of SOKOL_GLCORE, SOKOL_GLES3, SOKOL_D3D11, SOKOL_METAL, SOKOL_WGPU or SOKOL_DUMMY_BACKEND!"
|
|
#endif
|
|
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
static void _simgui_set_clipboard(ImGuiContext* ctx, const char* text) {
|
|
(void)ctx;
|
|
sapp_set_clipboard_string(text);
|
|
}
|
|
|
|
static const char* _simgui_get_clipboard(ImGuiContext* ctx) {
|
|
(void)ctx;
|
|
return sapp_get_clipboard_string();
|
|
}
|
|
#endif
|
|
|
|
#if defined(__EMSCRIPTEN__) && !defined(SOKOL_DUMMY_BACKEND)
|
|
EM_JS(int, simgui_js_is_osx, (void), {
|
|
if (navigator.userAgent.includes('Macintosh')) {
|
|
return 1;
|
|
} else {
|
|
return 0;
|
|
}
|
|
})
|
|
#endif
|
|
|
|
// ██ ██████ ██████ ██████ ██ ███ ██ ██████
|
|
// ██ ██ ██ ██ ██ ██ ████ ██ ██
|
|
// ██ ██ ██ ██ ███ ██ ███ ██ ██ ██ ██ ██ ███
|
|
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
// ███████ ██████ ██████ ██████ ██ ██ ████ ██████
|
|
//
|
|
// >>logging
|
|
#if defined(SOKOL_DEBUG)
|
|
#define _SIMGUI_LOGITEM_XMACRO(item,msg) #item ": " msg,
|
|
static const char* _simgui_log_messages[] = {
|
|
_SIMGUI_LOG_ITEMS
|
|
};
|
|
#undef _SIMGUI_LOGITEM_XMACRO
|
|
#endif // SOKOL_DEBUG
|
|
|
|
#define _SIMGUI_PANIC(code) _simgui_log(SIMGUI_LOGITEM_ ##code, 0, 0, __LINE__)
|
|
#define _SIMGUI_ERROR(code) _simgui_log(SIMGUI_LOGITEM_ ##code, 1, 0, __LINE__)
|
|
#define _SIMGUI_WARN(code) _simgui_log(SIMGUI_LOGITEM_ ##code, 2, 0, __LINE__)
|
|
#define _SIMGUI_INFO(code) _simgui_log(SIMGUI_LOGITEM_ ##code, 3, 0, __LINE__)
|
|
#define _SIMGUI_LOGMSG(code,msg) _simgui_log(SIMGUI_LOGITEM_ ##code, 3, msg, __LINE__)
|
|
|
|
static void _simgui_log(simgui_log_item_t log_item, uint32_t log_level, const char* msg, uint32_t line_nr) {
|
|
if (_simgui.desc.logger.func) {
|
|
const char* filename = 0;
|
|
#if defined(SOKOL_DEBUG)
|
|
filename = __FILE__;
|
|
if (0 == msg) {
|
|
msg = _simgui_log_messages[log_item];
|
|
}
|
|
#endif
|
|
_simgui.desc.logger.func("simgui", log_level, (uint32_t)log_item, msg, line_nr, filename, _simgui.desc.logger.user_data);
|
|
} else {
|
|
// for log level PANIC it would be 'undefined behaviour' to continue
|
|
if (log_level == 0) {
|
|
abort();
|
|
}
|
|
}
|
|
}
|
|
|
|
// ███ ███ ███████ ███ ███ ██████ ██████ ██ ██
|
|
// ████ ████ ██ ████ ████ ██ ██ ██ ██ ██ ██
|
|
// ██ ████ ██ █████ ██ ████ ██ ██ ██ ██████ ████
|
|
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
// ██ ██ ███████ ██ ██ ██████ ██ ██ ██
|
|
//
|
|
// >>memory
|
|
static void _simgui_clear(void* ptr, size_t size) {
|
|
SOKOL_ASSERT(ptr && (size > 0));
|
|
memset(ptr, 0, size);
|
|
}
|
|
|
|
static void* _simgui_malloc(size_t size) {
|
|
SOKOL_ASSERT(size > 0);
|
|
void* ptr;
|
|
if (_simgui.desc.allocator.alloc_fn) {
|
|
ptr = _simgui.desc.allocator.alloc_fn(size, _simgui.desc.allocator.user_data);
|
|
} else {
|
|
ptr = malloc(size);
|
|
}
|
|
if (0 == ptr) {
|
|
_SIMGUI_PANIC(MALLOC_FAILED);
|
|
}
|
|
return ptr;
|
|
}
|
|
|
|
static void _simgui_free(void* ptr) {
|
|
if (_simgui.desc.allocator.free_fn) {
|
|
_simgui.desc.allocator.free_fn(ptr, _simgui.desc.allocator.user_data);
|
|
} else {
|
|
free(ptr);
|
|
}
|
|
}
|
|
|
|
static bool _simgui_is_osx(void) {
|
|
#if defined(SOKOL_DUMMY_BACKEND)
|
|
return false;
|
|
#elif defined(__EMSCRIPTEN__)
|
|
return simgui_js_is_osx();
|
|
#elif defined(__APPLE__)
|
|
return true;
|
|
#else
|
|
return false;
|
|
#endif
|
|
}
|
|
|
|
static simgui_desc_t _simgui_desc_defaults(const simgui_desc_t* desc) {
|
|
SOKOL_ASSERT((desc->allocator.alloc_fn && desc->allocator.free_fn) || (!desc->allocator.alloc_fn && !desc->allocator.free_fn));
|
|
simgui_desc_t res = *desc;
|
|
res.max_vertices = _simgui_def(res.max_vertices, 65536);
|
|
return res;
|
|
}
|
|
|
|
static ImGuiPlatformIO* _simgui_imgui_get_platform_io(void) {
|
|
#if defined(__cplusplus)
|
|
return &ImGui::GetPlatformIO();
|
|
#else
|
|
#if defined(CIMGUI_INCLUDED)
|
|
// 'original' cimgui
|
|
return _SIMGUI_CFUNC(GetPlatformIO_Nil)();
|
|
#else
|
|
// dear bindings cimgui
|
|
return _SIMGUI_CFUNC(GetPlatformIO)();
|
|
#endif
|
|
#endif
|
|
}
|
|
|
|
static ImGuiIO* _simgui_imgui_get_io(void) {
|
|
#if defined(__cplusplus)
|
|
return &ImGui::GetIO();
|
|
#else
|
|
#if defined(CIMGUI_INCLUDED)
|
|
// 'original' cimgui
|
|
return _SIMGUI_CFUNC(GetIO_Nil)();
|
|
#else
|
|
// dear bindings cimgui
|
|
return _SIMGUI_CFUNC(GetIO)();
|
|
#endif
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imgui_newframe(void) {
|
|
#if defined(__cplusplus)
|
|
ImGui::NewFrame();
|
|
#else
|
|
_SIMGUI_CFUNC(NewFrame)();
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imgui_create_context(void) {
|
|
#if defined(__cplusplus)
|
|
ImGui::CreateContext();
|
|
#else
|
|
_SIMGUI_CFUNC(CreateContext)(0);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imgui_destroy_context(void) {
|
|
#if defined(__cplusplus)
|
|
ImGui::DestroyContext();
|
|
#else
|
|
_SIMGUI_CFUNC(DestroyContext)(0);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imgui_style_colors_dark(void) {
|
|
#if defined(__cplusplus)
|
|
ImGui::StyleColorsDark();
|
|
#else
|
|
_SIMGUI_CFUNC(StyleColorsDark)(_SIMGUI_CFUNC(GetStyle)());
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_font_default(ImGuiIO* io) {
|
|
#if defined(__cplusplus)
|
|
io->Fonts->AddFontDefault();
|
|
#else
|
|
ImFontAtlas_AddFontDefault(io->Fonts, 0);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_focus_event(ImGuiIO* io, bool focus) {
|
|
#if defined(__cplusplus)
|
|
io->AddFocusEvent(focus);
|
|
#else
|
|
ImGuiIO_AddFocusEvent(io, focus);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_mouse_source_event(ImGuiIO* io, ImGuiMouseSource source) {
|
|
#if defined(__cplusplus)
|
|
io->AddMouseSourceEvent(source);
|
|
#else
|
|
ImGuiIO_AddMouseSourceEvent(io, source);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_mouse_pos_event(ImGuiIO* io, float x, float y) {
|
|
#if defined(__cplusplus)
|
|
io->AddMousePosEvent(x, y);
|
|
#else
|
|
ImGuiIO_AddMousePosEvent(io, x, y);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_mouse_button_event(ImGuiIO* io, int mouse_button, bool down) {
|
|
#if defined(__cplusplus)
|
|
io->AddMouseButtonEvent(mouse_button, down);
|
|
#else
|
|
ImGuiIO_AddMouseButtonEvent(io, mouse_button, down);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_mouse_wheel_event(ImGuiIO* io, float x, float y) {
|
|
#if defined(__cplusplus)
|
|
io->AddMouseWheelEvent(x, y);
|
|
#else
|
|
ImGuiIO_AddMouseWheelEvent(io, x, y);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_key_event(ImGuiIO* io, ImGuiKey imgui_key, bool down) {
|
|
#if defined(__cplusplus)
|
|
io->AddKeyEvent(imgui_key, down);
|
|
#else
|
|
ImGuiIO_AddKeyEvent(io, imgui_key, down);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_input_character(ImGuiIO* io, uint32_t c) {
|
|
#if defined(__cplusplus)
|
|
io->AddInputCharacter(c);
|
|
#else
|
|
ImGuiIO_AddInputCharacter(io, c);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_io_add_input_characters_utf8(ImGuiIO* io, const char* c) {
|
|
#if defined(__cplusplus)
|
|
io->AddInputCharactersUTF8(c);
|
|
#else
|
|
ImGuiIO_AddInputCharactersUTF8(io, c);
|
|
#endif
|
|
}
|
|
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
static ImGuiMouseCursor _simgui_imgui_get_mouse_cursor(void) {
|
|
#if defined(__cplusplus)
|
|
return ImGui::GetMouseCursor();
|
|
#else
|
|
return _SIMGUI_CFUNC(GetMouseCursor)();
|
|
#endif
|
|
}
|
|
#endif
|
|
|
|
static ImDrawList* _simgui_imdrawlist_at(ImDrawData* draw_data, int cl_index) {
|
|
#if defined(__cplusplus)
|
|
return draw_data->CmdLists[cl_index];
|
|
#else
|
|
return draw_data->CmdLists.Data[cl_index];
|
|
#endif
|
|
}
|
|
|
|
static ImTextureID _simgui_imtexturedata_gettexid(ImTextureData* tex) {
|
|
#if defined(__cplusplus)
|
|
return tex->GetTexID();
|
|
#else
|
|
return ImTextureData_GetTexID(tex);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imtexturedata_settexid(ImTextureData* tex, ImTextureID tex_id) {
|
|
#if defined(__cplusplus)
|
|
tex->SetTexID(tex_id);
|
|
#else
|
|
ImTextureData_SetTexID(tex, tex_id);
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imtexturedata_setstatus(ImTextureData* tex, ImTextureStatus status) {
|
|
#if defined(__cplusplus)
|
|
tex->SetStatus(status);
|
|
#else
|
|
ImTextureData_SetStatus(tex, status);
|
|
#endif
|
|
}
|
|
|
|
static void* _simgui_imtexturedata_getpixels(ImTextureData* tex) {
|
|
#if defined(__cplusplus)
|
|
return tex->GetPixels();
|
|
#else
|
|
return ImTextureData_GetPixels(tex);
|
|
#endif
|
|
}
|
|
|
|
static int _simgui_imtexturedata_getsizeinbytes(ImTextureData* tex) {
|
|
#if defined(__cplusplus)
|
|
return tex->GetSizeInBytes();
|
|
#else
|
|
return ImTextureData_GetSizeInBytes(tex);
|
|
#endif
|
|
}
|
|
|
|
static ImTextureID _simgui_imdrawcmd_gettexid(ImDrawCmd* cmd) {
|
|
#if defined(__cplusplus)
|
|
return cmd->GetTexID();
|
|
#else
|
|
return ImDrawCmd_GetTexID(cmd);
|
|
#endif
|
|
}
|
|
|
|
static int _simgui_imdrawlist_cmd_buffer_size(ImDrawList* cl) {
|
|
#if defined(__cplusplus)
|
|
return cl->CmdBuffer.size();
|
|
#else
|
|
return cl->CmdBuffer.Size;
|
|
#endif
|
|
}
|
|
|
|
static int _simgui_imdrawlist_vtx_buffer_size(ImDrawList* cl) {
|
|
#if defined(__cplusplus)
|
|
return cl->VtxBuffer.size();
|
|
#else
|
|
return cl->VtxBuffer.Size;
|
|
#endif
|
|
}
|
|
|
|
static int _simgui_imdrawlist_idx_buffer_size(ImDrawList* cl) {
|
|
#if defined(__cplusplus)
|
|
return cl->IdxBuffer.size();
|
|
#else
|
|
return cl->IdxBuffer.Size;
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_imgui_render(void) {
|
|
#if defined(__cplusplus)
|
|
ImGui::Render();
|
|
#else
|
|
_SIMGUI_CFUNC(Render)();
|
|
#endif
|
|
}
|
|
|
|
static ImDrawData* _simgui_imgui_get_draw_data(void) {
|
|
#if defined(__cplusplus)
|
|
return ImGui::GetDrawData();
|
|
#else
|
|
return _SIMGUI_CFUNC(GetDrawData)();
|
|
#endif
|
|
}
|
|
|
|
static void _simgui_destroy_texture(ImTextureData* tex) {
|
|
SOKOL_ASSERT(tex);
|
|
const sg_view view = simgui_texture_view_from_imtextureid(_simgui_imtexturedata_gettexid(tex));
|
|
const sg_image img = sg_query_view_image(view);
|
|
SOKOL_ASSERT(img.id != SG_INVALID_ID);
|
|
const sg_sampler smp = simgui_sampler_from_imtextureid(_simgui_imtexturedata_gettexid(tex));
|
|
sg_destroy_view(view);
|
|
sg_destroy_image(img);
|
|
sg_destroy_sampler(smp);
|
|
_simgui_imtexturedata_settexid(tex, ImTextureID_Invalid);
|
|
_simgui_imtexturedata_setstatus(tex, ImTextureStatus_Destroyed);
|
|
}
|
|
|
|
static void _simgui_update_texture(ImTextureData* tex) {
|
|
SOKOL_ASSERT(tex);
|
|
SOKOL_ASSERT(tex->Format == ImTextureFormat_RGBA32);
|
|
if (tex->Status == ImTextureStatus_WantCreate) {
|
|
// create new sokol-gfx image, view and sampler
|
|
SOKOL_ASSERT(tex->TexID == 0);
|
|
sg_image_desc img_desc;
|
|
_simgui_clear(&img_desc, sizeof(img_desc));
|
|
img_desc.usage.dynamic_update = true;
|
|
img_desc.width = tex->Width;
|
|
img_desc.height = tex->Height;
|
|
img_desc.pixel_format = SG_PIXELFORMAT_RGBA8;
|
|
img_desc.label = "sokol-imgui-texture";
|
|
sg_image img = sg_make_image(&img_desc);
|
|
|
|
sg_view_desc view_desc;
|
|
_simgui_clear(&view_desc, sizeof(view_desc));
|
|
view_desc.texture.image = img;
|
|
view_desc.label = "sokol-imgui-texture-view";
|
|
sg_view view = sg_make_view(&view_desc);
|
|
|
|
sg_sampler_desc smp_desc;
|
|
_simgui_clear(&smp_desc, sizeof(smp_desc));
|
|
smp_desc.wrap_u = SG_WRAP_CLAMP_TO_EDGE;
|
|
smp_desc.wrap_v = SG_WRAP_CLAMP_TO_EDGE;
|
|
smp_desc.min_filter = SG_FILTER_LINEAR;
|
|
smp_desc.mag_filter = SG_FILTER_LINEAR;
|
|
smp_desc.label = "sokol-imgui-sampler";
|
|
sg_sampler smp = sg_make_sampler(&smp_desc);
|
|
|
|
_simgui_imtexturedata_settexid(tex, simgui_imtextureid_with_sampler(view, smp));
|
|
}
|
|
if ((tex->Status == ImTextureStatus_WantCreate) || (tex->Status == ImTextureStatus_WantUpdates)) {
|
|
SOKOL_ASSERT(tex->TexID != 0);
|
|
const sg_view view = simgui_texture_view_from_imtextureid(_simgui_imtexturedata_gettexid(tex));
|
|
const sg_image img = sg_query_view_image(view);
|
|
SOKOL_ASSERT(img.id != SG_INVALID_ID);
|
|
sg_image_data img_data;
|
|
_simgui_clear(&img_data, sizeof(img_data));
|
|
img_data.mip_levels[0].ptr = _simgui_imtexturedata_getpixels(tex);
|
|
img_data.mip_levels[0].size = (size_t)_simgui_imtexturedata_getsizeinbytes(tex);
|
|
sg_update_image(img, &img_data);
|
|
_simgui_imtexturedata_setstatus(tex, ImTextureStatus_OK);
|
|
}
|
|
if ((tex->Status == ImTextureStatus_WantDestroy) && (tex->UnusedFrames > 0)) {
|
|
SOKOL_ASSERT(tex->TexID != 0);
|
|
_simgui_destroy_texture(tex);
|
|
}
|
|
}
|
|
|
|
// ██████ ██ ██ ██████ ██ ██ ██████
|
|
// ██ ██ ██ ██ ██ ██ ██ ██ ██
|
|
// ██████ ██ ██ ██████ ██ ██ ██
|
|
// ██ ██ ██ ██ ██ ██ ██ ██
|
|
// ██ ██████ ██████ ███████ ██ ██████
|
|
//
|
|
// >>public
|
|
SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) {
|
|
SOKOL_ASSERT(desc);
|
|
_simgui_clear(&_simgui, sizeof(_simgui));
|
|
_simgui.init_cookie = _SIMGUI_INIT_COOKIE;
|
|
_simgui.desc = _simgui_desc_defaults(desc);
|
|
_simgui.cur_dpi_scale = 1.0f;
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
_simgui.is_osx = _simgui_is_osx();
|
|
#endif
|
|
// can keep color_format, depth_format and sample_count as is,
|
|
// since sokol_gfx.h will do its own default-value handling
|
|
|
|
// allocate an intermediate vertex- and index-buffer
|
|
SOKOL_ASSERT(_simgui.desc.max_vertices > 0);
|
|
_simgui.vertices.size = (size_t)_simgui.desc.max_vertices * sizeof(ImDrawVert);
|
|
_simgui.vertices.ptr = _simgui_malloc(_simgui.vertices.size);
|
|
_simgui.indices.size = (size_t)_simgui.desc.max_vertices * 3 * sizeof(ImDrawIdx);
|
|
_simgui.indices.ptr = _simgui_malloc(_simgui.indices.size);
|
|
|
|
// initialize Dear ImGui
|
|
_simgui_imgui_create_context();
|
|
_simgui_imgui_style_colors_dark();
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
if (!_simgui.desc.no_default_font) {
|
|
_simgui_io_add_font_default(io);
|
|
}
|
|
io->IniFilename = _simgui.desc.ini_filename;
|
|
io->ConfigMacOSXBehaviors = _simgui_is_osx();
|
|
io->BackendRendererName = "sokol-imgui";
|
|
io->BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset | ImGuiBackendFlags_RendererHasTextures;
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
if (!_simgui.desc.disable_set_mouse_cursor) {
|
|
io->BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
|
|
}
|
|
ImGuiPlatformIO* pio = _simgui_imgui_get_platform_io();
|
|
pio->Platform_SetClipboardTextFn = _simgui_set_clipboard;
|
|
pio->Platform_GetClipboardTextFn = _simgui_get_clipboard;
|
|
#endif
|
|
io->ConfigWindowsResizeFromEdges = !_simgui.desc.disable_windows_resize_from_edges;
|
|
|
|
// create sokol-gfx resources
|
|
sg_push_debug_group("sokol-imgui");
|
|
|
|
// shader object for using the embedded shader source (or bytecode)
|
|
sg_shader_desc shd_desc;
|
|
_simgui_clear(&shd_desc, sizeof(shd_desc));
|
|
shd_desc.attrs[0].glsl_name = "position";
|
|
shd_desc.attrs[1].glsl_name = "texcoord0";
|
|
shd_desc.attrs[2].glsl_name = "color0";
|
|
shd_desc.attrs[0].hlsl_sem_name = "TEXCOORD";
|
|
shd_desc.attrs[0].hlsl_sem_index = 0;
|
|
shd_desc.attrs[1].hlsl_sem_name = "TEXCOORD";
|
|
shd_desc.attrs[1].hlsl_sem_index = 1;
|
|
shd_desc.attrs[2].hlsl_sem_name = "TEXCOORD";
|
|
shd_desc.attrs[2].hlsl_sem_index = 2;
|
|
shd_desc.attrs[0].base_type = SG_SHADERATTRBASETYPE_FLOAT;
|
|
shd_desc.attrs[1].base_type = SG_SHADERATTRBASETYPE_FLOAT;
|
|
shd_desc.attrs[2].base_type = SG_SHADERATTRBASETYPE_FLOAT;
|
|
shd_desc.uniform_blocks[0].stage = SG_SHADERSTAGE_VERTEX;
|
|
shd_desc.uniform_blocks[0].size = sizeof(_simgui_vs_params_t);
|
|
shd_desc.uniform_blocks[0].hlsl_register_b_n = 0;
|
|
shd_desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
shd_desc.uniform_blocks[0].wgsl_group0_binding_n = 0;
|
|
shd_desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
|
|
shd_desc.uniform_blocks[0].glsl_uniforms[0].type = SG_UNIFORMTYPE_FLOAT4;
|
|
shd_desc.uniform_blocks[0].glsl_uniforms[0].array_count = 1;
|
|
shd_desc.uniform_blocks[0].spirv_set0_binding_n = 0;
|
|
shd_desc.views[0].texture.stage = SG_SHADERSTAGE_FRAGMENT;
|
|
shd_desc.views[0].texture.image_type = SG_IMAGETYPE_2D;
|
|
shd_desc.views[0].texture.sample_type = SG_IMAGESAMPLETYPE_FLOAT;
|
|
shd_desc.views[0].texture.hlsl_register_t_n = 0;
|
|
shd_desc.views[0].texture.msl_texture_n = 0;
|
|
shd_desc.views[0].texture.wgsl_group1_binding_n = 0;
|
|
shd_desc.views[0].texture.spirv_set1_binding_n = 0;
|
|
shd_desc.samplers[0].stage = SG_SHADERSTAGE_FRAGMENT;
|
|
shd_desc.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING;
|
|
shd_desc.samplers[0].hlsl_register_s_n = 0;
|
|
shd_desc.samplers[0].msl_sampler_n = 0;
|
|
shd_desc.samplers[0].wgsl_group1_binding_n = 32;
|
|
shd_desc.samplers[0].spirv_set1_binding_n = 32;
|
|
shd_desc.texture_sampler_pairs[0].stage = SG_SHADERSTAGE_FRAGMENT;
|
|
shd_desc.texture_sampler_pairs[0].view_slot = 0;
|
|
shd_desc.texture_sampler_pairs[0].sampler_slot = 0;
|
|
shd_desc.texture_sampler_pairs[0].glsl_name = "tex_smp";
|
|
shd_desc.label = "sokol-imgui-shader";
|
|
#if defined(SOKOL_GLCORE)
|
|
shd_desc.vertex_func.source = (const char*)_simgui_vs_source_glsl410;
|
|
shd_desc.fragment_func.source = (const char*)_simgui_fs_source_glsl410;
|
|
#elif defined(SOKOL_GLES3)
|
|
shd_desc.vertex_func.source = (const char*)_simgui_vs_source_glsl300es;
|
|
shd_desc.fragment_func.source = (const char*)_simgui_fs_source_glsl300es;
|
|
#elif defined(SOKOL_METAL)
|
|
shd_desc.vertex_func.entry = "main0";
|
|
shd_desc.fragment_func.entry = "main0";
|
|
switch (sg_query_backend()) {
|
|
case SG_BACKEND_METAL_MACOS:
|
|
shd_desc.vertex_func.bytecode = SG_RANGE(_simgui_vs_bytecode_metal_macos);
|
|
shd_desc.fragment_func.bytecode = SG_RANGE(_simgui_fs_bytecode_metal_macos);
|
|
break;
|
|
case SG_BACKEND_METAL_IOS:
|
|
shd_desc.vertex_func.bytecode = SG_RANGE(_simgui_vs_bytecode_metal_ios);
|
|
shd_desc.fragment_func.bytecode = SG_RANGE(_simgui_fs_bytecode_metal_ios);
|
|
break;
|
|
default:
|
|
shd_desc.vertex_func.source = (const char*)_simgui_vs_source_metal_sim;
|
|
shd_desc.fragment_func.source = (const char*)_simgui_fs_source_metal_sim;
|
|
break;
|
|
}
|
|
#elif defined(SOKOL_D3D11)
|
|
shd_desc.vertex_func.bytecode = SG_RANGE(_simgui_vs_bytecode_hlsl4);
|
|
shd_desc.fragment_func.bytecode = SG_RANGE(_simgui_fs_bytecode_hlsl4);
|
|
#elif defined(SOKOL_WGPU)
|
|
shd_desc.vertex_func.source = (const char*)_simgui_vs_source_wgsl;
|
|
shd_desc.fragment_func.source = (const char*)_simgui_fs_source_wgsl;
|
|
#elif defined(SOKOL_VULKAN)
|
|
shd_desc.vertex_func.bytecode = SG_RANGE(_simgui_vs_bytecode_spirv_vk);
|
|
shd_desc.vertex_func.entry = "main";
|
|
shd_desc.fragment_func.bytecode = SG_RANGE(_simgui_fs_bytecode_spirv_vk);
|
|
shd_desc.fragment_func.entry = "main";
|
|
#else
|
|
shd_desc.vertex_func.source = _simgui_vs_source_dummy;
|
|
shd_desc.fragment_func.source = _simgui_fs_source_dummy;
|
|
#endif
|
|
_simgui.def_shd = sg_make_shader(&shd_desc);
|
|
|
|
// pipeline object for imgui rendering
|
|
sg_pipeline_desc pip_desc;
|
|
_simgui_clear(&pip_desc, sizeof(pip_desc));
|
|
pip_desc.layout.buffers[0].stride = sizeof(ImDrawVert);
|
|
{
|
|
sg_vertex_attr_state* attr = &pip_desc.layout.attrs[0];
|
|
attr->offset = offsetof(ImDrawVert, pos);
|
|
attr->format = SG_VERTEXFORMAT_FLOAT2;
|
|
}
|
|
{
|
|
sg_vertex_attr_state* attr = &pip_desc.layout.attrs[1];
|
|
attr->offset = offsetof(ImDrawVert, uv);
|
|
attr->format = SG_VERTEXFORMAT_FLOAT2;
|
|
}
|
|
{
|
|
sg_vertex_attr_state* attr = &pip_desc.layout.attrs[2];
|
|
attr->offset = offsetof(ImDrawVert, col);
|
|
attr->format = SG_VERTEXFORMAT_UBYTE4N;
|
|
}
|
|
pip_desc.shader = _simgui.def_shd;
|
|
pip_desc.index_type = SG_INDEXTYPE_UINT16;
|
|
pip_desc.sample_count = _simgui.desc.sample_count;
|
|
pip_desc.depth.pixel_format = _simgui.desc.depth_format;
|
|
pip_desc.colors[0].pixel_format = _simgui.desc.color_format;
|
|
pip_desc.colors[0].write_mask = _simgui.desc.write_alpha_channel ? SG_COLORMASK_RGBA : SG_COLORMASK_RGB;
|
|
pip_desc.colors[0].blend.enabled = true;
|
|
pip_desc.colors[0].blend.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA;
|
|
pip_desc.colors[0].blend.dst_factor_rgb = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
|
|
if (_simgui.desc.write_alpha_channel) {
|
|
pip_desc.colors[0].blend.src_factor_alpha = SG_BLENDFACTOR_ONE;
|
|
pip_desc.colors[0].blend.dst_factor_alpha = SG_BLENDFACTOR_ONE;
|
|
}
|
|
pip_desc.label = "sokol-imgui-pipeline";
|
|
_simgui.def_pip = sg_make_pipeline(&pip_desc);
|
|
|
|
// create unfilterable/nonfiltering variants of the shader and pipeline
|
|
shd_desc.views[0].texture.sample_type = SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT;
|
|
shd_desc.samplers[0].sampler_type = SG_SAMPLERTYPE_NONFILTERING;
|
|
shd_desc.label = "sokol-imgui-shader-unfilterable";
|
|
_simgui.shd_unfilterable = sg_make_shader(&shd_desc);
|
|
pip_desc.shader = _simgui.shd_unfilterable;
|
|
pip_desc.label = "sokol-imgui-pipeline-unfilterable";
|
|
_simgui.pip_unfilterable = sg_make_pipeline(&pip_desc);
|
|
|
|
// NOTE: since we're in C++ mode here we can't use C99 designated init
|
|
sg_buffer_desc vb_desc;
|
|
_simgui_clear(&vb_desc, sizeof(vb_desc));
|
|
vb_desc.usage.stream_update = true;
|
|
vb_desc.size = _simgui.vertices.size;
|
|
vb_desc.label = "sokol-imgui-vertices";
|
|
_simgui.vbuf = sg_make_buffer(&vb_desc);
|
|
|
|
sg_buffer_desc ib_desc;
|
|
_simgui_clear(&ib_desc, sizeof(ib_desc));
|
|
ib_desc.usage.index_buffer = true;
|
|
ib_desc.usage.stream_update = true;
|
|
ib_desc.size = _simgui.indices.size;
|
|
ib_desc.label = "sokol-imgui-indices";
|
|
_simgui.ibuf = sg_make_buffer(&ib_desc);
|
|
|
|
// a default user-image sampler
|
|
sg_sampler_desc def_sampler_desc;
|
|
_simgui_clear(&def_sampler_desc, sizeof(def_sampler_desc));
|
|
def_sampler_desc.min_filter = SG_FILTER_NEAREST;
|
|
def_sampler_desc.mag_filter = SG_FILTER_NEAREST;
|
|
def_sampler_desc.wrap_u = SG_WRAP_CLAMP_TO_EDGE;
|
|
def_sampler_desc.wrap_v = SG_WRAP_CLAMP_TO_EDGE;
|
|
def_sampler_desc.label = "sokol-imgui-default-sampler";
|
|
_simgui.def_smp = sg_make_sampler(&def_sampler_desc);
|
|
|
|
sg_pop_debug_group();
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_shutdown(void) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
|
|
const ImGuiPlatformIO* pio = _simgui_imgui_get_platform_io();
|
|
for (size_t i = 0; i < (size_t)pio->Textures.Size; i++) {
|
|
ImTextureData* tex = pio->Textures.Data[i];
|
|
if (tex->RefCount == 1) {
|
|
_simgui_destroy_texture(tex);
|
|
}
|
|
}
|
|
_simgui_imgui_destroy_context();
|
|
|
|
// NOTE: it's valid to call the destroy funcs with SG_INVALID_ID
|
|
sg_destroy_pipeline(_simgui.pip_unfilterable);
|
|
sg_destroy_shader(_simgui.shd_unfilterable);
|
|
sg_destroy_pipeline(_simgui.def_pip);
|
|
sg_destroy_shader(_simgui.def_shd);
|
|
sg_destroy_sampler(_simgui.def_smp);
|
|
sg_destroy_buffer(_simgui.ibuf);
|
|
sg_destroy_buffer(_simgui.vbuf);
|
|
sg_pop_debug_group();
|
|
sg_push_debug_group("sokol-imgui");
|
|
SOKOL_ASSERT(_simgui.vertices.ptr);
|
|
_simgui_free((void*)_simgui.vertices.ptr);
|
|
SOKOL_ASSERT(_simgui.indices.ptr);
|
|
_simgui_free((void*)_simgui.indices.ptr);
|
|
_simgui.init_cookie = 0;
|
|
}
|
|
|
|
SOKOL_API_IMPL uint64_t simgui_imtextureid_with_sampler(sg_view tex_view, sg_sampler smp) {
|
|
uint32_t view_id = tex_view.id;
|
|
uint32_t smp_id = smp.id;
|
|
return (((uint64_t)smp_id)<<32) | view_id;
|
|
}
|
|
|
|
SOKOL_API_IMPL uint64_t simgui_imtextureid(sg_view tex_view) {
|
|
return simgui_imtextureid_with_sampler(tex_view, _simgui.def_smp);
|
|
}
|
|
|
|
SOKOL_API_IMPL sg_view simgui_texture_view_from_imtextureid(uint64_t imtex_id) {
|
|
sg_view view = { (uint32_t)imtex_id };
|
|
return view;
|
|
}
|
|
|
|
SOKOL_API_IMPL sg_sampler simgui_sampler_from_imtextureid(uint64_t imtex_id) {
|
|
sg_sampler smp = { (uint32_t)(imtex_id >> 32) };
|
|
return smp;
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_new_frame(const simgui_frame_desc_t* desc) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
SOKOL_ASSERT(desc);
|
|
SOKOL_ASSERT(desc->width > 0);
|
|
SOKOL_ASSERT(desc->height > 0);
|
|
_simgui.cur_dpi_scale = _simgui_def(desc->dpi_scale, 1.0f);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
io->DisplaySize.x = ((float)desc->width) / _simgui.cur_dpi_scale;
|
|
io->DisplaySize.y = ((float)desc->height) / _simgui.cur_dpi_scale;
|
|
io->DisplayFramebufferScale.x = _simgui.cur_dpi_scale;
|
|
io->DisplayFramebufferScale.y = _simgui.cur_dpi_scale;
|
|
io->DeltaTime = (float)desc->delta_time;
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
if (io->WantTextInput && !sapp_keyboard_shown()) {
|
|
sapp_show_keyboard(true);
|
|
}
|
|
if (!io->WantTextInput && sapp_keyboard_shown()) {
|
|
sapp_show_keyboard(false);
|
|
}
|
|
if (!_simgui.desc.disable_set_mouse_cursor) {
|
|
ImGuiMouseCursor imgui_cursor = _simgui_imgui_get_mouse_cursor();
|
|
sapp_mouse_cursor cursor = sapp_get_mouse_cursor();
|
|
switch (imgui_cursor) {
|
|
case ImGuiMouseCursor_Arrow: cursor = SAPP_MOUSECURSOR_ARROW; break;
|
|
case ImGuiMouseCursor_TextInput: cursor = SAPP_MOUSECURSOR_IBEAM; break;
|
|
case ImGuiMouseCursor_ResizeAll: cursor = SAPP_MOUSECURSOR_RESIZE_ALL; break;
|
|
case ImGuiMouseCursor_ResizeNS: cursor = SAPP_MOUSECURSOR_RESIZE_NS; break;
|
|
case ImGuiMouseCursor_ResizeEW: cursor = SAPP_MOUSECURSOR_RESIZE_EW; break;
|
|
case ImGuiMouseCursor_ResizeNESW: cursor = SAPP_MOUSECURSOR_RESIZE_NESW; break;
|
|
case ImGuiMouseCursor_ResizeNWSE: cursor = SAPP_MOUSECURSOR_RESIZE_NWSE; break;
|
|
case ImGuiMouseCursor_Hand: cursor = SAPP_MOUSECURSOR_POINTING_HAND; break;
|
|
case ImGuiMouseCursor_NotAllowed: cursor = SAPP_MOUSECURSOR_NOT_ALLOWED; break;
|
|
default: break;
|
|
}
|
|
sapp_set_mouse_cursor(cursor);
|
|
}
|
|
#endif
|
|
_simgui_imgui_newframe();
|
|
}
|
|
|
|
static sg_pipeline _simgui_bind_texture_sampler(sg_bindings* bindings, ImTextureID imtex_id) {
|
|
const sg_view tex_view = simgui_texture_view_from_imtextureid(imtex_id);
|
|
SOKOL_ASSERT(tex_view.id != SG_INVALID_ID);
|
|
const sg_image img = sg_query_view_image(tex_view);
|
|
SOKOL_ASSERT(img.id != SG_INVALID_ID);
|
|
bindings->views[0] = tex_view;
|
|
bindings->samplers[0] = simgui_sampler_from_imtextureid(imtex_id);
|
|
SOKOL_ASSERT(bindings->samplers[0].id != SG_INVALID_ID);
|
|
if (sg_query_pixelformat(sg_query_image_pixelformat(img)).filter) {
|
|
return _simgui.def_pip;
|
|
} else {
|
|
return _simgui.pip_unfilterable;
|
|
}
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_render(void) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_imgui_render();
|
|
ImDrawData* draw_data = _simgui_imgui_get_draw_data();
|
|
if (0 == draw_data) {
|
|
return;
|
|
}
|
|
|
|
// catch up with texture updates (important: this needs to happen before
|
|
// checking the CmdListsCount, otherwise textures might get stuck in
|
|
// 'WantCreate' state)
|
|
if (draw_data->Textures) {
|
|
for (size_t i = 0; i < (size_t)draw_data->Textures->Size; i++) {
|
|
ImTextureData* tex = draw_data->Textures->Data[i];
|
|
if (tex->Status != ImTextureStatus_OK) {
|
|
_simgui_update_texture(tex);
|
|
}
|
|
}
|
|
}
|
|
|
|
// early-out if nothing needs to be rendered
|
|
if (draw_data->CmdListsCount == 0) {
|
|
return;
|
|
}
|
|
|
|
// copy vertices and indices into an intermediate buffer so that
|
|
// they can be updated with a single sg_update_buffer() call each
|
|
// (sg_append_buffer() has performance problems on some GL platforms),
|
|
// also keep track of valid number of command lists in case of a
|
|
// buffer overflow
|
|
size_t all_vtx_size = 0;
|
|
size_t all_idx_size = 0;
|
|
int cmd_list_count = 0;
|
|
for (int cl_index = 0; cl_index < draw_data->CmdListsCount; cl_index++, cmd_list_count++) {
|
|
ImDrawList* cl = _simgui_imdrawlist_at(draw_data, cl_index);
|
|
const size_t vtx_size = (size_t)cl->VtxBuffer.Size * sizeof(ImDrawVert);
|
|
const size_t idx_size = (size_t)cl->IdxBuffer.Size * sizeof(ImDrawIdx);
|
|
|
|
// check for buffer overflow
|
|
if (((all_vtx_size + vtx_size) > _simgui.vertices.size) ||
|
|
((all_idx_size + idx_size) > _simgui.indices.size))
|
|
{
|
|
_SIMGUI_ERROR(BUFFER_OVERFLOW);
|
|
break;
|
|
}
|
|
|
|
// copy vertices and indices into common buffers
|
|
if (vtx_size > 0) {
|
|
const ImDrawVert* src_vtx_ptr = cl->VtxBuffer.Data;
|
|
void* dst_vtx_ptr = (void*) (((uint8_t*)_simgui.vertices.ptr) + all_vtx_size);
|
|
memcpy(dst_vtx_ptr, src_vtx_ptr, vtx_size);
|
|
}
|
|
if (idx_size > 0) {
|
|
const ImDrawIdx* src_idx_ptr = cl->IdxBuffer.Data;
|
|
void* dst_idx_ptr = (void*) (((uint8_t*)_simgui.indices.ptr) + all_idx_size);
|
|
memcpy(dst_idx_ptr, src_idx_ptr, idx_size);
|
|
}
|
|
all_vtx_size += vtx_size;
|
|
all_idx_size += idx_size;
|
|
}
|
|
if (0 == cmd_list_count) {
|
|
return;
|
|
}
|
|
|
|
// update the sokol-gfx vertex- and index-buffer
|
|
sg_push_debug_group("sokol-imgui");
|
|
if (all_vtx_size > 0) {
|
|
sg_range vtx_data = _simgui.vertices;
|
|
vtx_data.size = all_vtx_size;
|
|
sg_update_buffer(_simgui.vbuf, &vtx_data);
|
|
}
|
|
if (all_idx_size > 0) {
|
|
sg_range idx_data = _simgui.indices;
|
|
idx_data.size = all_idx_size;
|
|
sg_update_buffer(_simgui.ibuf, &idx_data);
|
|
}
|
|
|
|
// render the ImGui command list
|
|
const int fb_width = (int) (io->DisplaySize.x * draw_data->FramebufferScale.x);
|
|
const int fb_height = (int) (io->DisplaySize.y * draw_data->FramebufferScale.y);
|
|
sg_apply_viewport(0, 0, fb_width, fb_height, true);
|
|
sg_apply_scissor_rect(0, 0, fb_width, fb_height, true);
|
|
|
|
sg_apply_pipeline(_simgui.def_pip);
|
|
_simgui_vs_params_t vs_params;
|
|
_simgui_clear((void*)&vs_params, sizeof(vs_params));
|
|
vs_params.disp_size.x = io->DisplaySize.x;
|
|
vs_params.disp_size.y = io->DisplaySize.y;
|
|
sg_apply_uniforms(0, SG_RANGE_REF(vs_params));
|
|
sg_bindings bind;
|
|
_simgui_clear((void*)&bind, sizeof(bind));
|
|
bind.vertex_buffers[0] = _simgui.vbuf;
|
|
bind.index_buffer = _simgui.ibuf;
|
|
ImTextureID tex_id = 0;
|
|
int vb_offset = 0;
|
|
int ib_offset = 0;
|
|
for (int cl_index = 0; cl_index < cmd_list_count; cl_index++) {
|
|
ImDrawList* cl = _simgui_imdrawlist_at(draw_data, cl_index);
|
|
|
|
bind.vertex_buffer_offsets[0] = vb_offset;
|
|
bind.index_buffer_offset = ib_offset;
|
|
if (tex_id != 0) {
|
|
sg_apply_bindings(&bind);
|
|
}
|
|
|
|
const int num_cmds = _simgui_imdrawlist_cmd_buffer_size(cl);
|
|
uint32_t vtx_offset = 0;
|
|
for (int cmd_index = 0; cmd_index < num_cmds; cmd_index++) {
|
|
ImDrawCmd* pcmd = &cl->CmdBuffer.Data[cmd_index];
|
|
if (pcmd->UserCallback != 0) {
|
|
// User callback, registered via ImDrawList::AddCallback()
|
|
// (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
|
|
if (pcmd->UserCallback != ImDrawCallback_ResetRenderState) {
|
|
pcmd->UserCallback(cl, pcmd);
|
|
// need to re-apply all state after calling a user callback
|
|
sg_reset_state_cache();
|
|
sg_apply_viewport(0, 0, fb_width, fb_height, true);
|
|
sg_apply_pipeline(_simgui.def_pip);
|
|
sg_apply_uniforms(0, SG_RANGE_REF(vs_params));
|
|
sg_apply_bindings(&bind);
|
|
}
|
|
} else {
|
|
ImTextureID cmd_tex_id = _simgui_imdrawcmd_gettexid(pcmd);
|
|
if ((tex_id != cmd_tex_id) || (vtx_offset != pcmd->VtxOffset)) {
|
|
tex_id = cmd_tex_id;
|
|
vtx_offset = pcmd->VtxOffset;
|
|
sg_pipeline pip = _simgui_bind_texture_sampler(&bind, tex_id);
|
|
sg_apply_pipeline(pip);
|
|
sg_apply_uniforms(0, SG_RANGE_REF(vs_params));
|
|
bind.vertex_buffer_offsets[0] = vb_offset + (int)(pcmd->VtxOffset * sizeof(ImDrawVert));
|
|
sg_apply_bindings(&bind);
|
|
}
|
|
const int scissor_x = (int) (pcmd->ClipRect.x * draw_data->FramebufferScale.x);
|
|
const int scissor_y = (int) (pcmd->ClipRect.y * draw_data->FramebufferScale.y);
|
|
const int scissor_w = (int) ((pcmd->ClipRect.z - pcmd->ClipRect.x) * draw_data->FramebufferScale.x);
|
|
const int scissor_h = (int) ((pcmd->ClipRect.w - pcmd->ClipRect.y) * draw_data->FramebufferScale.y);
|
|
sg_apply_scissor_rect(scissor_x, scissor_y, scissor_w, scissor_h, true);
|
|
sg_draw((int)pcmd->IdxOffset, (int)pcmd->ElemCount, 1);
|
|
}
|
|
}
|
|
vb_offset += _simgui_imdrawlist_vtx_buffer_size(cl) * (int)sizeof(ImDrawVert);
|
|
ib_offset += _simgui_imdrawlist_idx_buffer_size(cl) * (int)sizeof(ImDrawIdx);
|
|
}
|
|
sg_apply_viewport(0, 0, fb_width, fb_height, true);
|
|
sg_apply_scissor_rect(0, 0, fb_width, fb_height, true);
|
|
sg_pop_debug_group();
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_focus_event(bool focus) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_focus_event(io, focus);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_mouse_pos_event(float x, float y) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_mouse_source_event(io, ImGuiMouseSource_Mouse);
|
|
_simgui_io_add_mouse_pos_event(io, x, y);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_touch_pos_event(float x, float y) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_mouse_source_event(io, ImGuiMouseSource_TouchScreen);
|
|
_simgui_io_add_mouse_pos_event(io, x, y);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_mouse_button_event(int mouse_button, bool down) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_mouse_source_event(io, ImGuiMouseSource_Mouse);
|
|
_simgui_io_add_mouse_button_event(io, mouse_button, down);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_touch_button_event(int mouse_button, bool down) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_mouse_source_event(io, ImGuiMouseSource_TouchScreen);
|
|
_simgui_io_add_mouse_button_event(io, mouse_button, down);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_mouse_wheel_event(float wheel_x, float wheel_y) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_mouse_source_event(io, ImGuiMouseSource_Mouse);
|
|
_simgui_io_add_mouse_wheel_event(io, wheel_x, wheel_y);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_key_event(int imgui_key, bool down) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_key_event(io, (ImGuiKey)imgui_key, down);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_input_character(uint32_t c) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_input_character(io, c);
|
|
}
|
|
|
|
SOKOL_API_IMPL void simgui_add_input_characters_utf8(const char* c) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
_simgui_io_add_input_characters_utf8(io, c);
|
|
}
|
|
|
|
#if !defined(SOKOL_IMGUI_NO_SOKOL_APP)
|
|
_SOKOL_PRIVATE bool _simgui_is_ctrl(uint32_t modifiers) {
|
|
if (_simgui.is_osx) {
|
|
return 0 != (modifiers & SAPP_MODIFIER_SUPER);
|
|
} else {
|
|
return 0 != (modifiers & SAPP_MODIFIER_CTRL);
|
|
}
|
|
}
|
|
|
|
_SOKOL_PRIVATE ImGuiKey _simgui_map_keycode(sapp_keycode key) {
|
|
switch (key) {
|
|
case SAPP_KEYCODE_SPACE: return ImGuiKey_Space;
|
|
case SAPP_KEYCODE_APOSTROPHE: return ImGuiKey_Apostrophe;
|
|
case SAPP_KEYCODE_COMMA: return ImGuiKey_Comma;
|
|
case SAPP_KEYCODE_MINUS: return ImGuiKey_Minus;
|
|
case SAPP_KEYCODE_PERIOD: return ImGuiKey_Apostrophe;
|
|
case SAPP_KEYCODE_SLASH: return ImGuiKey_Slash;
|
|
case SAPP_KEYCODE_0: return ImGuiKey_0;
|
|
case SAPP_KEYCODE_1: return ImGuiKey_1;
|
|
case SAPP_KEYCODE_2: return ImGuiKey_2;
|
|
case SAPP_KEYCODE_3: return ImGuiKey_3;
|
|
case SAPP_KEYCODE_4: return ImGuiKey_4;
|
|
case SAPP_KEYCODE_5: return ImGuiKey_5;
|
|
case SAPP_KEYCODE_6: return ImGuiKey_6;
|
|
case SAPP_KEYCODE_7: return ImGuiKey_7;
|
|
case SAPP_KEYCODE_8: return ImGuiKey_8;
|
|
case SAPP_KEYCODE_9: return ImGuiKey_9;
|
|
case SAPP_KEYCODE_SEMICOLON: return ImGuiKey_Semicolon;
|
|
case SAPP_KEYCODE_EQUAL: return ImGuiKey_Equal;
|
|
case SAPP_KEYCODE_A: return ImGuiKey_A;
|
|
case SAPP_KEYCODE_B: return ImGuiKey_B;
|
|
case SAPP_KEYCODE_C: return ImGuiKey_C;
|
|
case SAPP_KEYCODE_D: return ImGuiKey_D;
|
|
case SAPP_KEYCODE_E: return ImGuiKey_E;
|
|
case SAPP_KEYCODE_F: return ImGuiKey_F;
|
|
case SAPP_KEYCODE_G: return ImGuiKey_G;
|
|
case SAPP_KEYCODE_H: return ImGuiKey_H;
|
|
case SAPP_KEYCODE_I: return ImGuiKey_I;
|
|
case SAPP_KEYCODE_J: return ImGuiKey_J;
|
|
case SAPP_KEYCODE_K: return ImGuiKey_K;
|
|
case SAPP_KEYCODE_L: return ImGuiKey_L;
|
|
case SAPP_KEYCODE_M: return ImGuiKey_M;
|
|
case SAPP_KEYCODE_N: return ImGuiKey_N;
|
|
case SAPP_KEYCODE_O: return ImGuiKey_O;
|
|
case SAPP_KEYCODE_P: return ImGuiKey_P;
|
|
case SAPP_KEYCODE_Q: return ImGuiKey_Q;
|
|
case SAPP_KEYCODE_R: return ImGuiKey_R;
|
|
case SAPP_KEYCODE_S: return ImGuiKey_S;
|
|
case SAPP_KEYCODE_T: return ImGuiKey_T;
|
|
case SAPP_KEYCODE_U: return ImGuiKey_U;
|
|
case SAPP_KEYCODE_V: return ImGuiKey_V;
|
|
case SAPP_KEYCODE_W: return ImGuiKey_W;
|
|
case SAPP_KEYCODE_X: return ImGuiKey_X;
|
|
case SAPP_KEYCODE_Y: return ImGuiKey_Y;
|
|
case SAPP_KEYCODE_Z: return ImGuiKey_Z;
|
|
case SAPP_KEYCODE_LEFT_BRACKET: return ImGuiKey_LeftBracket;
|
|
case SAPP_KEYCODE_BACKSLASH: return ImGuiKey_Backslash;
|
|
case SAPP_KEYCODE_RIGHT_BRACKET:return ImGuiKey_RightBracket;
|
|
case SAPP_KEYCODE_GRAVE_ACCENT: return ImGuiKey_GraveAccent;
|
|
case SAPP_KEYCODE_ESCAPE: return ImGuiKey_Escape;
|
|
case SAPP_KEYCODE_ENTER: return ImGuiKey_Enter;
|
|
case SAPP_KEYCODE_TAB: return ImGuiKey_Tab;
|
|
case SAPP_KEYCODE_BACKSPACE: return ImGuiKey_Backspace;
|
|
case SAPP_KEYCODE_INSERT: return ImGuiKey_Insert;
|
|
case SAPP_KEYCODE_DELETE: return ImGuiKey_Delete;
|
|
case SAPP_KEYCODE_RIGHT: return ImGuiKey_RightArrow;
|
|
case SAPP_KEYCODE_LEFT: return ImGuiKey_LeftArrow;
|
|
case SAPP_KEYCODE_DOWN: return ImGuiKey_DownArrow;
|
|
case SAPP_KEYCODE_UP: return ImGuiKey_UpArrow;
|
|
case SAPP_KEYCODE_PAGE_UP: return ImGuiKey_PageUp;
|
|
case SAPP_KEYCODE_PAGE_DOWN: return ImGuiKey_PageDown;
|
|
case SAPP_KEYCODE_HOME: return ImGuiKey_Home;
|
|
case SAPP_KEYCODE_END: return ImGuiKey_End;
|
|
case SAPP_KEYCODE_CAPS_LOCK: return ImGuiKey_CapsLock;
|
|
case SAPP_KEYCODE_SCROLL_LOCK: return ImGuiKey_ScrollLock;
|
|
case SAPP_KEYCODE_NUM_LOCK: return ImGuiKey_NumLock;
|
|
case SAPP_KEYCODE_PRINT_SCREEN: return ImGuiKey_PrintScreen;
|
|
case SAPP_KEYCODE_PAUSE: return ImGuiKey_Pause;
|
|
case SAPP_KEYCODE_F1: return ImGuiKey_F1;
|
|
case SAPP_KEYCODE_F2: return ImGuiKey_F2;
|
|
case SAPP_KEYCODE_F3: return ImGuiKey_F3;
|
|
case SAPP_KEYCODE_F4: return ImGuiKey_F4;
|
|
case SAPP_KEYCODE_F5: return ImGuiKey_F5;
|
|
case SAPP_KEYCODE_F6: return ImGuiKey_F6;
|
|
case SAPP_KEYCODE_F7: return ImGuiKey_F7;
|
|
case SAPP_KEYCODE_F8: return ImGuiKey_F8;
|
|
case SAPP_KEYCODE_F9: return ImGuiKey_F9;
|
|
case SAPP_KEYCODE_F10: return ImGuiKey_F10;
|
|
case SAPP_KEYCODE_F11: return ImGuiKey_F11;
|
|
case SAPP_KEYCODE_F12: return ImGuiKey_F12;
|
|
case SAPP_KEYCODE_KP_0: return ImGuiKey_Keypad0;
|
|
case SAPP_KEYCODE_KP_1: return ImGuiKey_Keypad1;
|
|
case SAPP_KEYCODE_KP_2: return ImGuiKey_Keypad2;
|
|
case SAPP_KEYCODE_KP_3: return ImGuiKey_Keypad3;
|
|
case SAPP_KEYCODE_KP_4: return ImGuiKey_Keypad4;
|
|
case SAPP_KEYCODE_KP_5: return ImGuiKey_Keypad5;
|
|
case SAPP_KEYCODE_KP_6: return ImGuiKey_Keypad6;
|
|
case SAPP_KEYCODE_KP_7: return ImGuiKey_Keypad7;
|
|
case SAPP_KEYCODE_KP_8: return ImGuiKey_Keypad8;
|
|
case SAPP_KEYCODE_KP_9: return ImGuiKey_Keypad9;
|
|
case SAPP_KEYCODE_KP_DECIMAL: return ImGuiKey_KeypadDecimal;
|
|
case SAPP_KEYCODE_KP_DIVIDE: return ImGuiKey_KeypadDivide;
|
|
case SAPP_KEYCODE_KP_MULTIPLY: return ImGuiKey_KeypadMultiply;
|
|
case SAPP_KEYCODE_KP_SUBTRACT: return ImGuiKey_KeypadSubtract;
|
|
case SAPP_KEYCODE_KP_ADD: return ImGuiKey_KeypadAdd;
|
|
case SAPP_KEYCODE_KP_ENTER: return ImGuiKey_KeypadEnter;
|
|
case SAPP_KEYCODE_KP_EQUAL: return ImGuiKey_KeypadEqual;
|
|
case SAPP_KEYCODE_LEFT_SHIFT: return ImGuiKey_LeftShift;
|
|
case SAPP_KEYCODE_LEFT_CONTROL: return ImGuiKey_LeftCtrl;
|
|
case SAPP_KEYCODE_LEFT_ALT: return ImGuiKey_LeftAlt;
|
|
case SAPP_KEYCODE_LEFT_SUPER: return ImGuiKey_LeftSuper;
|
|
case SAPP_KEYCODE_RIGHT_SHIFT: return ImGuiKey_RightShift;
|
|
case SAPP_KEYCODE_RIGHT_CONTROL:return ImGuiKey_RightCtrl;
|
|
case SAPP_KEYCODE_RIGHT_ALT: return ImGuiKey_RightAlt;
|
|
case SAPP_KEYCODE_RIGHT_SUPER: return ImGuiKey_RightSuper;
|
|
case SAPP_KEYCODE_MENU: return ImGuiKey_Menu;
|
|
default: return ImGuiKey_None;
|
|
}
|
|
}
|
|
|
|
_SOKOL_PRIVATE void _simgui_add_sapp_key_event(ImGuiIO* io, sapp_keycode sapp_key, bool down) {
|
|
const ImGuiKey imgui_key = _simgui_map_keycode(sapp_key);
|
|
_simgui_io_add_key_event(io, imgui_key, down);
|
|
}
|
|
|
|
_SOKOL_PRIVATE void _simgui_update_modifiers(ImGuiIO* io, uint32_t mods) {
|
|
_simgui_io_add_key_event(io, ImGuiMod_Ctrl, (mods & SAPP_MODIFIER_CTRL) != 0);
|
|
_simgui_io_add_key_event(io, ImGuiMod_Shift, (mods & SAPP_MODIFIER_SHIFT) != 0);
|
|
_simgui_io_add_key_event(io, ImGuiMod_Alt, (mods & SAPP_MODIFIER_ALT) != 0);
|
|
_simgui_io_add_key_event(io, ImGuiMod_Super, (mods & SAPP_MODIFIER_SUPER) != 0);
|
|
}
|
|
|
|
// returns Ctrl or Super, depending on platform
|
|
_SOKOL_PRIVATE ImGuiKey _simgui_copypaste_modifier(void) {
|
|
return _simgui.is_osx ? ImGuiMod_Super : ImGuiMod_Ctrl;
|
|
}
|
|
|
|
SOKOL_API_IMPL int simgui_map_keycode(sapp_keycode keycode) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
return (int)_simgui_map_keycode(keycode);
|
|
}
|
|
|
|
SOKOL_API_IMPL bool simgui_handle_event(const sapp_event* ev) {
|
|
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
|
|
const float dpi_scale = _simgui.cur_dpi_scale;
|
|
ImGuiIO* io = _simgui_imgui_get_io();
|
|
switch (ev->type) {
|
|
case SAPP_EVENTTYPE_FOCUSED:
|
|
simgui_add_focus_event(true);
|
|
break;
|
|
case SAPP_EVENTTYPE_UNFOCUSED:
|
|
simgui_add_focus_event(false);
|
|
break;
|
|
case SAPP_EVENTTYPE_MOUSE_DOWN:
|
|
simgui_add_mouse_pos_event(ev->mouse_x / dpi_scale, ev->mouse_y / dpi_scale);
|
|
simgui_add_mouse_button_event((int)ev->mouse_button, true);
|
|
_simgui_update_modifiers(io, ev->modifiers);
|
|
break;
|
|
case SAPP_EVENTTYPE_MOUSE_UP:
|
|
simgui_add_mouse_pos_event(ev->mouse_x / dpi_scale, ev->mouse_y / dpi_scale);
|
|
simgui_add_mouse_button_event((int)ev->mouse_button, false);
|
|
_simgui_update_modifiers(io, ev->modifiers);
|
|
break;
|
|
case SAPP_EVENTTYPE_MOUSE_MOVE:
|
|
simgui_add_mouse_pos_event(ev->mouse_x / dpi_scale, ev->mouse_y / dpi_scale);
|
|
break;
|
|
case SAPP_EVENTTYPE_MOUSE_ENTER:
|
|
case SAPP_EVENTTYPE_MOUSE_LEAVE:
|
|
// FIXME: since the sokol_app.h emscripten backend doesn't support
|
|
// mouse capture, mouse buttons must be released when the mouse leaves the
|
|
// browser window, so that they don't "stick" when released outside the window.
|
|
// A cleaner solution would be a new sokol_app.h function to query
|
|
// "platform behaviour flags".
|
|
#if defined(__EMSCRIPTEN__)
|
|
for (int i = 0; i < SAPP_MAX_MOUSEBUTTONS; i++) {
|
|
simgui_add_mouse_button_event(i, false);
|
|
}
|
|
#endif
|
|
break;
|
|
case SAPP_EVENTTYPE_MOUSE_SCROLL:
|
|
simgui_add_mouse_wheel_event(ev->scroll_x, ev->scroll_y);
|
|
break;
|
|
case SAPP_EVENTTYPE_TOUCHES_BEGAN:
|
|
simgui_add_touch_pos_event(ev->touches[0].pos_x / dpi_scale, ev->touches[0].pos_y / dpi_scale);
|
|
simgui_add_touch_button_event(0, true);
|
|
break;
|
|
case SAPP_EVENTTYPE_TOUCHES_MOVED:
|
|
simgui_add_touch_pos_event(ev->touches[0].pos_x / dpi_scale, ev->touches[0].pos_y / dpi_scale);
|
|
break;
|
|
case SAPP_EVENTTYPE_TOUCHES_ENDED:
|
|
simgui_add_touch_pos_event(ev->touches[0].pos_x / dpi_scale, ev->touches[0].pos_y / dpi_scale);
|
|
simgui_add_touch_button_event(0, false);
|
|
break;
|
|
case SAPP_EVENTTYPE_TOUCHES_CANCELLED:
|
|
simgui_add_touch_button_event(0, false);
|
|
break;
|
|
case SAPP_EVENTTYPE_KEY_DOWN:
|
|
_simgui_update_modifiers(io, ev->modifiers);
|
|
// intercept Ctrl-V, this is handled via EVENTTYPE_CLIPBOARD_PASTED
|
|
if (!_simgui.desc.disable_paste_override) {
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_V)) {
|
|
break;
|
|
}
|
|
}
|
|
// on web platform, don't forward Ctrl-X, Ctrl-V to the browser
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_X)) {
|
|
sapp_consume_event();
|
|
}
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_C)) {
|
|
sapp_consume_event();
|
|
}
|
|
// it's ok to add ImGuiKey_None key events
|
|
_simgui_add_sapp_key_event(io, ev->key_code, true);
|
|
break;
|
|
case SAPP_EVENTTYPE_KEY_UP:
|
|
_simgui_update_modifiers(io, ev->modifiers);
|
|
// intercept Ctrl-V, this is handled via EVENTTYPE_CLIPBOARD_PASTED
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_V)) {
|
|
break;
|
|
}
|
|
// on web platform, don't forward Ctrl-X, Ctrl-V to the browser
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_X)) {
|
|
sapp_consume_event();
|
|
}
|
|
if (_simgui_is_ctrl(ev->modifiers) && (ev->key_code == SAPP_KEYCODE_C)) {
|
|
sapp_consume_event();
|
|
}
|
|
// it's ok to add ImGuiKey_None key events
|
|
_simgui_add_sapp_key_event(io, ev->key_code, false);
|
|
break;
|
|
case SAPP_EVENTTYPE_CHAR:
|
|
/* on some platforms, special keys may be reported as
|
|
characters, which may confuse some ImGui widgets,
|
|
drop those, also don't forward characters if some
|
|
modifiers have been pressed
|
|
*/
|
|
_simgui_update_modifiers(io, ev->modifiers);
|
|
if ((ev->char_code >= 32) &&
|
|
(ev->char_code != 127) &&
|
|
(0 == (ev->modifiers & (SAPP_MODIFIER_ALT|SAPP_MODIFIER_CTRL|SAPP_MODIFIER_SUPER))))
|
|
{
|
|
simgui_add_input_character(ev->char_code);
|
|
}
|
|
break;
|
|
case SAPP_EVENTTYPE_CLIPBOARD_PASTED:
|
|
// simulate a Ctrl-V key down/up
|
|
if (!_simgui.desc.disable_paste_override) {
|
|
_simgui_io_add_key_event(io, _simgui_copypaste_modifier(), true);
|
|
_simgui_io_add_key_event(io, ImGuiKey_V, true);
|
|
_simgui_io_add_key_event(io, ImGuiKey_V, false);
|
|
_simgui_io_add_key_event(io, _simgui_copypaste_modifier(), false);
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return io->WantCaptureKeyboard || io->WantCaptureMouse;
|
|
}
|
|
#endif // SOKOL_IMGUI_NO_SOKOL_APP
|
|
|
|
#endif // SOKOL_IMPL
|