Remove SDL_HAVE_RENDER_GEOMETRY define

This commit is contained in:
Sylvain 2021-09-20 17:17:34 +02:00 committed by Ryan C. Gordon
parent 77026f673b
commit c27e1249e1
4 changed files with 1 additions and 15 deletions

View File

@ -116,12 +116,6 @@
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN #define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
#endif #endif
/* SDL Renderer
- SDL_RenderGeometry() */
#ifndef SDL_HAVE_RENDER_GEOMETRY
#define SDL_HAVE_RENDER_GEOMETRY !SDL_LEAN_AND_MEAN
#endif
#include "SDL_assert.h" #include "SDL_assert.h"
#include "SDL_log.h" #include "SDL_log.h"

View File

@ -129,12 +129,10 @@ struct SDL_Renderer
int (*QueueCopyEx) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture, int (*QueueCopyEx) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
const SDL_Rect * srcquad, const SDL_FRect * dstrect, const SDL_Rect * srcquad, const SDL_FRect * dstrect,
const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip); const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip);
#if SDL_HAVE_RENDER_GEOMETRY
int (*QueueGeometry) (SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, int (*QueueGeometry) (SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride,
int num_vertices, const void *indices, int num_indices, int size_indices, int num_vertices, const void *indices, int num_indices, int size_indices,
float scale_x, float scale_y); float scale_x, float scale_y);
#endif
int (*RunCommandQueue) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize); int (*RunCommandQueue) (SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize);
int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture, int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,

View File

@ -562,7 +562,6 @@ SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Surface *surface, SDL_Texture * tex
} }
#if SDL_HAVE_RENDER_GEOMETRY
typedef struct GeometryFillData typedef struct GeometryFillData
{ {
SDL_Point dst; SDL_Point dst;
@ -659,7 +658,6 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
} }
return 0; return 0;
} }
#endif
static void static void
PrepTextureForCopy(const SDL_RenderCommand *cmd) PrepTextureForCopy(const SDL_RenderCommand *cmd)
@ -836,7 +834,6 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
} }
case SDL_RENDERCMD_GEOMETRY: { case SDL_RENDERCMD_GEOMETRY: {
#if SDL_HAVE_RENDER_GEOMETRY
int i; int i;
SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first); SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first);
const int count = (int) cmd->data.draw.count; const int count = (int) cmd->data.draw.count;
@ -865,7 +862,6 @@ SW_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertic
SDL_SW_FillTriangle(surface, &(ptr[0].dst), &(ptr[1].dst), &(ptr[2].dst), blend, ptr[0].color, ptr[1].color, ptr[2].color); SDL_SW_FillTriangle(surface, &(ptr[0].dst), &(ptr[1].dst), &(ptr[2].dst), blend, ptr[0].color, ptr[1].color, ptr[2].color);
} }
} }
#endif
break; break;
} }
@ -978,9 +974,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface)
renderer->QueueFillRects = SW_QueueFillRects; renderer->QueueFillRects = SW_QueueFillRects;
renderer->QueueCopy = SW_QueueCopy; renderer->QueueCopy = SW_QueueCopy;
renderer->QueueCopyEx = SW_QueueCopyEx; renderer->QueueCopyEx = SW_QueueCopyEx;
#if SDL_HAVE_RENDER_GEOMETRY
renderer->QueueGeometry = SW_QueueGeometry; renderer->QueueGeometry = SW_QueueGeometry;
#endif
renderer->RunCommandQueue = SW_RunCommandQueue; renderer->RunCommandQueue = SW_RunCommandQueue;
renderer->RenderReadPixels = SW_RenderReadPixels; renderer->RenderReadPixels = SW_RenderReadPixels;
renderer->RenderPresent = SW_RenderPresent; renderer->RenderPresent = SW_RenderPresent;

View File

@ -20,7 +20,7 @@
*/ */
#include "../../SDL_internal.h" #include "../../SDL_internal.h"
#if SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED && SDL_HAVE_RENDER_GEOMETRY #if SDL_VIDEO_RENDER_SW && !SDL_RENDER_DISABLED
#include "SDL_surface.h" #include "SDL_surface.h"
#include "SDL_triangle.h" #include "SDL_triangle.h"