update SDL3 from 3.2.20 to 3.4.2

This commit is contained in:
Sven Balzer
2026-04-01 18:25:03 +02:00
parent 1daf4d79f1
commit 05b19704f8
1626 changed files with 124218 additions and 191491 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -19,7 +19,7 @@
#include <stdlib.h>
#if defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_ANDROID) || defined(SDL_PLATFORM_EMSCRIPTEN) || defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_LINUX)
#if defined(SDL_PLATFORM_IOS) || defined(SDL_PLATFORM_ANDROID) || defined(SDL_PLATFORM_EMSCRIPTEN) || defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_HURD)
#define HAVE_OPENGLES2
#endif
@@ -179,7 +179,7 @@ perspective_matrix(float fovy, float aspect, float znear, float zfar, float *r)
int i;
float f;
f = 1.0f / SDL_tanf(fovy * 0.5f);
f = 1.0f / SDL_tanf((fovy / 180.0f) * SDL_PI_F * 0.5f);
for (i = 0; i < 16; i++) {
r[i] = 0.0;
@@ -880,13 +880,13 @@ int main(int argc, char *argv[])
GL_CHECK(ctx.glGenBuffers(1, &data->position_buffer));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, data->position_buffer));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertices), g_vertices, GL_STATIC_DRAW));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, 0));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, NULL));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, 0));
GL_CHECK(ctx.glGenBuffers(1, &data->color_buffer));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, data->color_buffer));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(g_colors), g_colors, GL_STATIC_DRAW));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, 0));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, NULL));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, 0));
GL_CHECK(ctx.glEnable(GL_CULL_FACE));