mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Update the menu driver to work with the latest version
This commit is contained in:
parent
8b1604325f
commit
38305f8fb7
19498
deps/zahnrad/nuklear.h
vendored
19498
deps/zahnrad/nuklear.h
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
static const char *zahnrad_shader =
|
||||
static const char *nuklear_shader =
|
||||
"struct input\n"
|
||||
"{\n"
|
||||
" float time;\n"
|
@ -1,4 +1,4 @@
|
||||
static const char *zahnrad_fragment_shader =
|
||||
static const char *nuklear_fragment_shader =
|
||||
"#version 300 es\n"
|
||||
"precision mediump float;\n"
|
||||
"uniform sampler2D Texture;\n"
|
@ -1,4 +1,4 @@
|
||||
static const char *zahnrad_vertex_shader =
|
||||
static const char *nuklear_vertex_shader =
|
||||
"#version 300 es\n"
|
||||
"uniform mat4 ProjMtx;\n"
|
||||
"in vec2 Position;\n"
|
@ -30,8 +30,8 @@
|
||||
#include "../menu_display.h"
|
||||
#include "../../gfx/video_shader_driver.h"
|
||||
|
||||
#include "../../gfx/drivers/gl_shaders/pipeline_zahnrad.glsl.vert.h"
|
||||
#include "../../gfx/drivers/gl_shaders/pipeline_zahnrad.glsl.frag.h"
|
||||
#include "../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h"
|
||||
#include "../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h"
|
||||
|
||||
struct nk_font *font;
|
||||
struct nk_font_atlas atlas;
|
||||
@ -77,8 +77,8 @@ NK_API void nk_common_device_init(struct nk_device *dev)
|
||||
dev->prog = glCreateProgram();
|
||||
dev->vert_shdr = glCreateShader(GL_VERTEX_SHADER);
|
||||
dev->frag_shdr = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
glShaderSource(dev->vert_shdr, 1, &zahnrad_vertex_shader, 0);
|
||||
glShaderSource(dev->frag_shdr, 1, &zahnrad_fragment_shader, 0);
|
||||
glShaderSource(dev->vert_shdr, 1, &nuklear_vertex_shader, 0);
|
||||
glShaderSource(dev->frag_shdr, 1, &nuklear_fragment_shader, 0);
|
||||
glCompileShader(dev->vert_shdr);
|
||||
glCompileShader(dev->frag_shdr);
|
||||
glGetShaderiv(dev->vert_shdr, GL_COMPILE_STATUS, &status);
|
||||
|
@ -22,7 +22,8 @@
|
||||
#define NK_INCLUDE_FONT_BAKING
|
||||
#define NK_INCLUDE_DEFAULT_FONT
|
||||
|
||||
#include "../../deps/zahnrad/nuklear.h"
|
||||
#include <string.h>
|
||||
#include "../../deps/nuklear/nuklear.h"
|
||||
#include "../../deps/stb/stb_image.h"
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
|
@ -57,7 +57,7 @@ struct window {
|
||||
|
||||
typedef struct nk_menu_handle
|
||||
{
|
||||
/* zahnrad mandatory */
|
||||
/* nuklear mandatory */
|
||||
void *memory;
|
||||
struct nk_context ctx;
|
||||
struct nk_memory_status status;
|
||||
@ -83,7 +83,7 @@ typedef struct nk_menu_handle
|
||||
menu_texture_item list[NK_TEXTURE_LAST];
|
||||
} textures;
|
||||
|
||||
gfx_font_raster_block_t list_block;
|
||||
video_font_raster_block_t list_block;
|
||||
} nk_menu_handle_t;
|
||||
|
||||
void nk_menu_wnd_shader_parameters(nk_menu_handle_t *zr);
|
||||
|
@ -147,7 +147,7 @@ static void nk_menu_context_reset_textures(nk_menu_handle_t *nk,
|
||||
video_driver_texture_load(&ti,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, &nk->textures.list[i]);
|
||||
|
||||
image_texture_load(&ti);
|
||||
image_texture_load(&ti, path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ static void *nk_menu_init(void **userdata)
|
||||
*userdata = nk;
|
||||
|
||||
fill_pathname_join(nk->assets_directory, settings->directory.assets,
|
||||
"zahnrad", sizeof(nk->assets_directory));
|
||||
"nuklear", sizeof(nk->assets_directory));
|
||||
nk_menu_init_device(nk);
|
||||
|
||||
return menu;
|
||||
@ -352,7 +352,7 @@ static void nk_menu_context_reset(void *data)
|
||||
return;
|
||||
|
||||
fill_pathname_join(iconpath, settings->directory.assets,
|
||||
"zahnrad", sizeof(iconpath));
|
||||
"nuklear", sizeof(iconpath));
|
||||
fill_pathname_slash(iconpath, sizeof(iconpath));
|
||||
|
||||
nk_menu_layout(nk);
|
||||
|
Loading…
Reference in New Issue
Block a user