diff --git a/examples/testgputext.c b/examples/testgputext.c index d567d744..0dc71011 100644 --- a/examples/testgputext.c +++ b/examples/testgputext.c @@ -242,6 +242,8 @@ int main(int argc, char *argv[]) .dst_color_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA } }}, + .has_depth_stencil_target = false, + .depth_stencil_format = SDL_GPU_TEXTUREFORMAT_INVALID /* Neex to set this to avoid missing initializer for field error */ }, .vertex_input_state = (SDL_GPUVertexInputState){ .num_vertex_buffers = 1, diff --git a/src/SDL_gpu_textengine.c b/src/SDL_gpu_textengine.c index 134f4aa0..a5e4e64e 100644 --- a/src/SDL_gpu_textengine.c +++ b/src/SDL_gpu_textengine.c @@ -642,10 +642,10 @@ static AtlasDrawSequence *CreateDrawSequence(TTF_DrawOperation *ops, int num_ops break; } - float minx = dst->x; - float maxx = dst->x + dst->w; - float miny = dst->y; - float maxy = dst->y + dst->h; + float minx = (float)dst->x; + float maxx = (float)(dst->x + dst->w); + float miny = (float)dst->y; + float maxy = (float)(dst->y + dst->h); // In the GPU API postive y-axis is upwards so the signs of the y-coords is reversed *xy++ = minx;