summaryrefslogtreecommitdiff
path: root/src/editor/texturepicker.cpp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-03-10 05:18:33 +0100
committeraura <nw@moneybot.cc>2026-03-10 05:18:33 +0100
commit30151d75dddd651faa1b27148a052ced7d0f190a (patch)
tree30b9374d59ecdd83296f7a2b7aa008340b95daf5 /src/editor/texturepicker.cpp
parent31b77ed2e0c037e5718b9ecd06d3941600cc8815 (diff)
2d batch rendering
Diffstat (limited to 'src/editor/texturepicker.cpp')
-rw-r--r--src/editor/texturepicker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/editor/texturepicker.cpp b/src/editor/texturepicker.cpp
index a24e955..621f0c2 100644
--- a/src/editor/texturepicker.cpp
+++ b/src/editor/texturepicker.cpp
@@ -90,7 +90,7 @@ void gui_editor_texturepicker_draw_files( GUI_EDITOR_TEXTUREPICKER* wnd ) {
gui_draw_frect( tx - 1, ty - 1, size + 2, size + 2, clr );
gui_draw_frect( tx, ty, size, size, clr );
gl_2d_textured_frect(
- _gui.gl2d_font,
+ _gui.batch,
{ (F32)tx, (F32)ty },
{ (F32)size, (F32)size },
tex,
@@ -144,7 +144,7 @@ void gui_editor_texturepicker_draw_fn( void* ptr ) {
void gui_editor_textureview_delete_textures( GUI_EDITOR_TEXTUREPICKER* wnd ) {
wnd->textures.each( fn( GL_TEX2D** ptr ) {
GL_TEX2D* tex = *ptr;
- gl_texture_destroy( _gui.gl2d->gl, tex );
+ gl_texture_destroy( _gui.batch->gl, tex );
} );
wnd->textures.clear();
@@ -155,7 +155,7 @@ void gui_editor_texturepicker_load_texture( void* ptr ) {
FILE_ENTRY* f = &wnd->files[wnd->curload];
const char* name = assets_abspath( f->name );
- GL_TEX2D* tex = gl_texture_from_file( _gui.gl2d->gl, name );
+ GL_TEX2D* tex = gl_texture_from_file( _gui.batch->gl, name );
if( !tex ) {
dlog( "gui_editor_textureview_create_textures() : error creating texture %s", name );
return;
@@ -170,7 +170,7 @@ void gui_editor_texturepicker_load_texture( void* ptr ) {
void gui_editor_textureview_create_textures( GUI_EDITOR_TEXTUREPICKER* wnd ) {
wnd->curload = 0;
- GL_TEX2D* emptytex = gl_texture_create( _gui.gl2d->gl, "" );
+ GL_TEX2D* emptytex = gl_texture_create( _gui.batch->gl, "" );
strcpy( emptytex->name, "none" );
emptytex->width = emptytex->height = 1;
@@ -189,7 +189,7 @@ void gui_editor_textureview_accept( GUI_EDITOR_TEXTUREPICKER* wnd ) {
if( !isnone && tex == wnd->curselect )
return;
- gl_texture_destroy( _gui.gl2d->gl, tex );
+ gl_texture_destroy( _gui.batch->gl, tex );
} );
if( !isnone ) {
@@ -198,7 +198,7 @@ void gui_editor_textureview_accept( GUI_EDITOR_TEXTUREPICKER* wnd ) {
GL_TEX2D* tex = map_find_texture( editor->map, name );
*wnd->target = tex;
- gl_texture_destroy( _gui.gl2d->gl, wnd->curselect );
+ gl_texture_destroy( _gui.batch->gl, wnd->curselect );
} else {
*wnd->target = wnd->curselect;
}