sdl3-sample-简明教程,指导如何在包括移动和 Web 在内的各种平台上构建和使用 SDL3

sdl3-sample-简明教程,指导如何在包括移动和 Web 在内的各种平台上构建和使用 SDL3

sdl3-sample源代码地址为:https://github.com/Ravbug/sdl3-sample

sdl3-sample

sdl3-example是SDL3的简明教程,指导如何在包括移动和 Web 在内的各种平台上构建和使用 SDL3。还包含 SDL_mixer、SDL_Image 和 SDL_ttf!
在线网站运行示例为:https://www.ravbug.com/sdl3-sample/

https://www.ravbug.com/sdl3-sample/官网在线运行结果:

在这里插入图片描述

SDL3 App From Source Minimal Example

This is a minimal example for building and using SDL3, SDL_Mixer, SDL_Image, and SDL_ttf_ from source
using C++ and CMake. It also demonstrates setting up things like macOS/iOS
bundles.
See src/main.cpp for the code.

Building And Running

Are you a complete beginner? If so, read this!
Otherwise, install CMake and your favorite compiler, and follow the commands below:

# You need to clone with submodules, otherwise SDL will not download. git clone https://github.com/Ravbug/sdl3-sample --depth=1 --recurse-submodules cd sdl3-sample cmake -S . -B build 

You can also use an init script inside config/. Then open the IDE project inside build/
(If you had CMake generate one) and run!

Supported Platforms

I have tested the following:

PlatformArchitectureGenerator
macOSx86_64, arm64Xcode
iOSx86_64, arm64Xcode
tvOSx86_64, arm64Xcode
visionOS*arm64Xcode
Windowsx86_64, arm64Visual Studio
Linuxx86_64, arm64Ninja, Make
Web*wasmNinja, Make
Android*x86, x64, arm, arm64Ninja via Android Studio

*See further instructions in config/

Note: UWP support was removed from SDL3 during its development. For historical reasons, you can get a working UWP sample via this commit: df270da

Updating SDL

Just update the submodule:

cd SDL git pull cd .. cd SDL_ttf git pull 

You don’t need to use a submodule, you can also copy the source in directly. This
repository uses a submodule to keep its size to a minimum.

Reporting issues

Is something not working? Create an Issue or send a Pull Request on this repository!

当在自己的MacOS、Windows、Ubuntu等Linux系统中安装了CMake安装包后,可以按照官网说的如下命令执行:

# You need to clone with submodules, otherwise SDL will not download.git clone https://github.com/Ravbug/sdl3-sample --depth=1 --recurse-submodules cd sdl3-sample cmake -S . -B build cmake --build build make

在MacOS中运行结果

在MacOS中运行结果

在Windows11中运行结果

在Windows11中运行结果

参考资料

Read more

Python不错,但前端不行,照样可以做漂亮的WEB界面

文章目录 * 后端程序员做前端 * NiceGUI极简入门程序 * 逐行解释 * 第1行:导入库 * 第2行:创建文本标签 * **第3行:创建输入框** * **第4行:创建按钮并设置点击事件** * **第5行:启动Web应用** * 程序运行流程: * 三个组件的总结: * 程序运行界面 后端程序员做前端 If you are good at Python but have only a basic understanding of JavaScript and HTML, and you need to create a web GUI application for projects involving AI, data analysis, or

Web-Check+cpolar:全方位检查网站还能随时随地访问,太方便了!

Web-Check+cpolar:全方位检查网站还能随时随地访问,太方便了!

文章目录 * 前言 * 1.关于Web-Check * 2.功能特点 * 3.安装Docker * 4.创建并启动Web-Check容器 * 5.本地访问测试 * 6.公网远程访问本地Web-Check * 7.内网穿透工具安装 * 8.创建远程连接公网地址 * 9.使用固定公网地址远程访问 前言 Web-Check 能分析网站的 IP 信息、SSL 证书、DNS 记录、性能和安全配置等,适合网站开发者、运维和安全人员使用,优点是信息全面,能一键获取网站多维度数据。 使用时发现它对新手很友好,操作简单,不过检测结果需要一定专业知识解读,建议结合实际需求重点关注关键指标,如开放端口和 SSL 配置。 但它默认只能在局域网内使用,要是想和异地团队共享检测结果,或者在外网随时查看网站状态,就很不方便,得依赖复杂的网络配置。 而搭配 cpolar 后,能生成公网访问地址,

Qwen-Multiple-Angles - 角色/产品多视角速成 一张图搞定96种相机角度 ComfyUI+WebUI双模式 一键整合包下载

Qwen-Multiple-Angles - 角色/产品多视角速成 一张图搞定96种相机角度 ComfyUI+WebUI双模式 一键整合包下载

Qwen-Multiple-Angles 是一款多角度生成的插件(LoRA),让你在编辑图片时,可以像摄影师一样精确控制“拍摄角度”,比如前视、侧视、俯视、仰视,还能选择远近距离。它是专门为 Qwen-Image-Edit-2511 模型扩展的 LoRA(轻量训练模块),解决了原模型在多角度控制上的不足。 它的核心能力就是:你给它一张图,它能帮你从各种不同角度重新生成这张图里的东西,而且保持主体基本不变形、不串味。 下载地址:点此下载 今天分享的 Qwen-Multiple-Angles 一键包基于 Qwen-Image-Edit-2511-Multiple-Angles 这个LoRA模型,集成单次生成和批量生成。单次生成支持可视化3D控制球拖动生成,批量生成支持更自由的多角度连贯批量控制生成。支持多种模型一键切换,支持更适合新手的WebUI模式和专业选手的ComfyUI两种模式。 主要特点 可以控制96种相机位置 水平转圈:8个方向(正面、45°斜角、90°正侧面、135°、背后……一直转到360°) 垂直高度:4种高度(特别强的是“低角度仰拍-30°

《C#上位机开发从门外到门内》3-5:基于FastAPI的Web上位机系统

《C#上位机开发从门外到门内》3-5:基于FastAPI的Web上位机系统

文章目录 * 一、项目概述 * 二、系统架构设计 * 三、前后端开发 * 四、数据可视化 * 五、远程控制 * 六、系统安全性与稳定性 * 七、性能优化与测试 * 八、实际应用案例 * 九、结论 随着互联网技术的快速发展,Web上位机系统在工业自动化、智能家居、环境监测等领域的应用日益广泛。基于FastAPI或Flask的Web上位机系统,凭借其高效、灵活和易于扩展的特点,成为当前研究和应用的热点。本文将详细探讨基于FastAPI和Flask的Web上位机系统的设计与实现,涵盖系统架构、前后端开发、数据可视化、远程控制、安全性、性能优化以及实际应用案例等方面,旨在为相关领域的研究人员和工程技术人员提供参考和借鉴。 一、项目概述 Web上位机系统是一种通过网络实现对远程设备或环境进行实时监控和控制的系统。其核心目标是通过高效的数据传输和处理,确保监控的实时性和准确性,从而实现对远程设备的有效管理和控制。基于FastAPI或Flask的Web上位机系统利用Python的Web框架,通过互联网或局域网实现数据的传输和通信,具有广泛的应用前景。 Fa