refactor(primitives_gallery): usar AppConfig.about + init_gl_loader (issue 0043)
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "core/page_header.h"
|
||||
#include "core/toast.h"
|
||||
#include "core/app_menubar.h"
|
||||
#include "gfx/gl_loader.h"
|
||||
|
||||
#include "demos.h"
|
||||
#include "demo.h"
|
||||
@@ -124,15 +123,8 @@ static void draw_sidebar() {
|
||||
}
|
||||
|
||||
static void render() {
|
||||
static bool init_done = false;
|
||||
if (!init_done) {
|
||||
fn_tokens::apply_dark_theme();
|
||||
// En Linux es no-op; en Windows resuelve los punteros GL via wglGetProcAddress.
|
||||
// Imprescindible antes de invocar primitivos que usen OpenGL 2.0+ (graph_viewport,
|
||||
// shader_canvas, etc).
|
||||
fn::gfx::gl_loader_init();
|
||||
init_done = true;
|
||||
}
|
||||
// Theme y gl_loader gestionados por fn::run_app (theme=FnDark por defecto,
|
||||
// init_gl_loader=true en AppConfig).
|
||||
|
||||
// MainMenuBar (solo Settings — la gallery no tiene paneles toggleables ni layouts)
|
||||
fn_ui::app_menubar(nullptr, 0, nullptr);
|
||||
@@ -171,8 +163,14 @@ static void render() {
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
return fn::run_app(
|
||||
{.title = "fn_registry · Primitives Gallery",
|
||||
.width = 1400, .height = 900, .viewports = true},
|
||||
{.title = "fn_registry · Primitives Gallery",
|
||||
.width = 1400,
|
||||
.height = 900,
|
||||
.viewports = true,
|
||||
.about = {.name = "Primitives Gallery",
|
||||
.version = "0.1.0",
|
||||
.description = "Visual catalog of fn_registry C++ UI primitives"},
|
||||
.init_gl_loader = true},
|
||||
render
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user