mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-05-09 16:42:21 +00:00
Change 'size_indice' to 'size_indices'
This commit is contained in:
parent
bc2173baf9
commit
a8f89a01aa
|
@ -1484,7 +1484,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
|
||||||
* \param num_vertices Number of vertices.
|
* \param num_vertices Number of vertices.
|
||||||
* \param indices (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order.
|
* \param indices (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order.
|
||||||
* \param num_indices Number of indices.
|
* \param num_indices Number of indices.
|
||||||
* \param size_indice Indice size: 1 (byte), 2 (short), 4 (int)
|
* \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
|
||||||
*
|
*
|
||||||
* \return 0 on success, or -1 if the operation is not supported
|
* \return 0 on success, or -1 if the operation is not supported
|
||||||
*/
|
*/
|
||||||
|
@ -1494,7 +1494,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
const int *color, int color_stride,
|
const int *color, int color_stride,
|
||||||
const float *uv, int uv_stride,
|
const float *uv, int uv_stride,
|
||||||
int num_vertices,
|
int num_vertices,
|
||||||
const void *indices, int num_indices, int size_indice);
|
const void *indices, int num_indices, int size_indices);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read pixels from the current rendering target to an array of pixels.
|
* Read pixels from the current rendering target to an array of pixels.
|
||||||
|
|
|
@ -579,7 +579,7 @@ QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||||
const int *color, int color_stride,
|
const int *color, int color_stride,
|
||||||
const float *uv, int uv_stride,
|
const float *uv, int uv_stride,
|
||||||
int num_vertices,
|
int num_vertices,
|
||||||
const void *indices, int num_indices, int size_indice,
|
const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
SDL_RenderCommand *cmd;
|
SDL_RenderCommand *cmd;
|
||||||
|
@ -592,7 +592,7 @@ QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||||
if (cmd != NULL) {
|
if (cmd != NULL) {
|
||||||
retval = renderer->QueueGeometry(renderer, cmd, texture,
|
retval = renderer->QueueGeometry(renderer, cmd, texture,
|
||||||
xy, xy_stride, color, color_stride, uv, uv_stride,
|
xy, xy_stride, color, color_stride, uv, uv_stride,
|
||||||
num_vertices, indices, num_indices, size_indice,
|
num_vertices, indices, num_indices, size_indices,
|
||||||
scale_x, scale_y);
|
scale_x, scale_y);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
cmd->command = SDL_RENDERCMD_NO_OP;
|
cmd->command = SDL_RENDERCMD_NO_OP;
|
||||||
|
@ -3356,9 +3356,9 @@ SDL_RenderGeometry(SDL_Renderer *renderer,
|
||||||
int color_stride = sizeof (SDL_Vertex);
|
int color_stride = sizeof (SDL_Vertex);
|
||||||
const float *uv = (const float *)((const Uint8 *)vertices + SDL_OFFSETOF(SDL_Vertex, tex_coord));
|
const float *uv = (const float *)((const Uint8 *)vertices + SDL_OFFSETOF(SDL_Vertex, tex_coord));
|
||||||
int uv_stride = sizeof (SDL_Vertex);
|
int uv_stride = sizeof (SDL_Vertex);
|
||||||
int size_indice = 4;
|
int size_indices = 4;
|
||||||
|
|
||||||
return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indice);
|
return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SDL_HAVE_RENDER_GEOMETRY
|
#if SDL_HAVE_RENDER_GEOMETRY
|
||||||
|
@ -3432,7 +3432,7 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
const int *color, int color_stride,
|
const int *color, int color_stride,
|
||||||
const float *uv, int uv_stride,
|
const float *uv, int uv_stride,
|
||||||
int num_vertices,
|
int num_vertices,
|
||||||
const void *indices, int num_indices, int size_indice)
|
const void *indices, int num_indices, int size_indices)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
@ -3463,15 +3463,15 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
int C = -1; /* Third vertex of current triangle */
|
int C = -1; /* Third vertex of current triangle */
|
||||||
int C2 = -1; /* Last, vertex of previous triangle */
|
int C2 = -1; /* Last, vertex of previous triangle */
|
||||||
|
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
k0 = ((const Uint32 *)indices)[i];
|
k0 = ((const Uint32 *)indices)[i];
|
||||||
k1 = ((const Uint32 *)indices)[i + 1];
|
k1 = ((const Uint32 *)indices)[i + 1];
|
||||||
k2 = ((const Uint32 *)indices)[i + 2];
|
k2 = ((const Uint32 *)indices)[i + 2];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
k0 = ((const Uint16 *)indices)[i];
|
k0 = ((const Uint16 *)indices)[i];
|
||||||
k1 = ((const Uint16 *)indices)[i + 1];
|
k1 = ((const Uint16 *)indices)[i + 1];
|
||||||
k2 = ((const Uint16 *)indices)[i + 2];
|
k2 = ((const Uint16 *)indices)[i + 2];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
k0 = ((const Uint8 *)indices)[i];
|
k0 = ((const Uint8 *)indices)[i];
|
||||||
k1 = ((const Uint8 *)indices)[i + 1];
|
k1 = ((const Uint8 *)indices)[i + 1];
|
||||||
k2 = ((const Uint8 *)indices)[i + 2];
|
k2 = ((const Uint8 *)indices)[i + 2];
|
||||||
|
@ -3708,7 +3708,7 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
const int *color, int color_stride,
|
const int *color, int color_stride,
|
||||||
const float *uv, int uv_stride,
|
const float *uv, int uv_stride,
|
||||||
int num_vertices,
|
int num_vertices,
|
||||||
const void *indices, int num_indices, int size_indice)
|
const void *indices, int num_indices, int size_indices)
|
||||||
{
|
{
|
||||||
#if SDL_HAVE_RENDER_GEOMETRY
|
#if SDL_HAVE_RENDER_GEOMETRY
|
||||||
int i;
|
int i;
|
||||||
|
@ -3746,11 +3746,11 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indices) {
|
if (indices) {
|
||||||
if (size_indice != 1 && size_indice != 2 && size_indice != 4) {
|
if (size_indices != 1 && size_indice != 2 && size_indice != 4) {
|
||||||
return SDL_InvalidParamError("size_indice");
|
return SDL_InvalidParamError("size_indices");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
size_indice = 0;
|
size_indices = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't draw while we're hidden */
|
/* Don't draw while we're hidden */
|
||||||
|
@ -3780,9 +3780,9 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
if (indices) {
|
if (indices) {
|
||||||
for (i = 0; i < num_indices; ++i) {
|
for (i = 0; i < num_indices; ++i) {
|
||||||
int j;
|
int j;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
|
@ -3801,13 +3801,13 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer,
|
||||||
if (renderer->info.flags & SDL_RENDERER_SOFTWARE) {
|
if (renderer->info.flags & SDL_RENDERER_SOFTWARE) {
|
||||||
return SDL_SW_RenderGeometryRaw(renderer, texture,
|
return SDL_SW_RenderGeometryRaw(renderer, texture,
|
||||||
xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices,
|
xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices,
|
||||||
indices, num_indices, size_indice);
|
indices, num_indices, size_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = QueueCmdGeometry(renderer, texture,
|
retval = QueueCmdGeometry(renderer, texture,
|
||||||
xy, xy_stride, color, color_stride, uv, uv_stride,
|
xy, xy_stride, color, color_stride, uv, uv_stride,
|
||||||
num_vertices,
|
num_vertices,
|
||||||
indices, num_indices, size_indice,
|
indices, num_indices, size_indices,
|
||||||
renderer->scale.x, renderer->scale.y);
|
renderer->scale.x, renderer->scale.y);
|
||||||
|
|
||||||
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
|
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
|
||||||
|
|
|
@ -132,7 +132,7 @@ struct SDL_Renderer
|
||||||
#if SDL_HAVE_RENDER_GEOMETRY
|
#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_indice,
|
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
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ D3D_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t
|
||||||
static int
|
static int
|
||||||
D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
D3D_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -1041,11 +1041,11 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -1869,7 +1869,7 @@ D3D11_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture *
|
||||||
static int
|
static int
|
||||||
D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
D3D11_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -1886,11 +1886,11 @@ D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -1322,7 +1322,7 @@ METAL_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture *
|
||||||
static int
|
static int
|
||||||
METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
METAL_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
int count = indices ? num_indices : num_vertices;
|
int count = indices ? num_indices : num_vertices;
|
||||||
|
@ -1336,11 +1336,11 @@ METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
int j;
|
int j;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -1055,7 +1055,7 @@ GL_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * te
|
||||||
static int
|
static int
|
||||||
GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
GL_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
GL_TextureData *texturedata = NULL;
|
GL_TextureData *texturedata = NULL;
|
||||||
|
@ -1079,11 +1079,11 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -759,7 +759,7 @@ GLES_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture *
|
||||||
static int
|
static int
|
||||||
GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
GLES_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
GLES_TextureData *texturedata = NULL;
|
GLES_TextureData *texturedata = NULL;
|
||||||
|
@ -783,11 +783,11 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -941,7 +941,7 @@ GLES2_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture *
|
||||||
static int
|
static int
|
||||||
GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
GLES2_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -960,11 +960,11 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
int col_;
|
int col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
@ -579,7 +579,7 @@ typedef struct GeometryCopyData
|
||||||
static int
|
static int
|
||||||
SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
|
SW_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_indice,
|
int num_vertices, const void *indices, int num_indices, int size_indices,
|
||||||
float scale_x, float scale_y)
|
float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -601,11 +601,11 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
float *uv_;
|
float *uv_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
@ -634,11 +634,11 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te
|
||||||
int j;
|
int j;
|
||||||
float *xy_;
|
float *xy_;
|
||||||
SDL_Color col_;
|
SDL_Color col_;
|
||||||
if (size_indice == 4) {
|
if (size_indices == 4) {
|
||||||
j = ((const Uint32 *)indices)[i];
|
j = ((const Uint32 *)indices)[i];
|
||||||
} else if (size_indice == 2) {
|
} else if (size_indices == 2) {
|
||||||
j = ((const Uint16 *)indices)[i];
|
j = ((const Uint16 *)indices)[i];
|
||||||
} else if (size_indice == 1) {
|
} else if (size_indices == 1) {
|
||||||
j = ((const Uint8 *)indices)[i];
|
j = ((const Uint8 *)indices)[i];
|
||||||
} else {
|
} else {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
Loading…
Reference in a new issue