Files
librefront/src/client/gfx_context.h
T
2025-09-09 10:05:07 +02:00

42 lines
1.2 KiB
C

/*
LibreFront --- an OpenFront clone
Copyright (C) 2025 Adrien Jaguenet
Copyright (C) 2025 Emil Kosz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <SDL3/SDL.h>
#include <glib-2.0/glib.h>
#include <common/world.h>
#include <common/util.h>
typedef struct GfxContext
{
SDL_Window *window;
SDL_Renderer *renderer;
} GfxContext;
GfxContext *GfxContext_new ();
void GfxContext_prerender (GfxContext * self);
void GfxContext_postrender (GfxContext * self);
void GfxContext_free (GfxContext * self);
void GfxContext_renderWorld (GfxContext * self, World * world);