Skip to content

Commit

Permalink
Define SDL_RenderGeometryRaw instead of SDL_RenderGeometry
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Jul 6, 2024
1 parent 92f98b7 commit 7b3ac18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/external/imgui/imgui_impl_sdlrenderer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ extern int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMod
#endif

#if !SDL_VERSION_ATLEAST(2,0,17)
struct SDL_Vertex;
extern int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices);
extern int SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture,
const float *xy, int xy_stride, const SDL_Color *color, int color_stride,
const float *uv, int uv_stride, int num_vertices,
const void *indices, int num_indices, int size_indices);
#endif

#include "hook.h"
Expand Down
6 changes: 4 additions & 2 deletions src/library/sdl/sdldynapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ OVERRIDE int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleM
#endif

#if !SDL_VERSION_ATLEAST(2,0,17)
struct SDL_Vertex;
OVERRIDE int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices);
OVERRIDE int SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture,
const float *xy, int xy_stride, const SDL_Color *color, int color_stride,
const float *uv, int uv_stride, int num_vertices,
const void *indices, int num_indices, int size_indices);
#endif

#include "logging.h"
Expand Down

0 comments on commit 7b3ac18

Please sign in to comment.