tzdwindows 7 6dcd006f0e feat(renderer): implement texture binding with texture unit support
- Added generate_new_uuid function for unique identifier generation
- Included stduuid/uuid.h and declared generate_new_uuid in pch.h
- Added bindTexture overload to accept Texture object and texture unit
- Implemented texture unit validation and OpenGL texture activation
- Added Texture class declaration in RenderSystem header
- Updated project files to include new model and utility headers/sources
- Configured C++20 standard in Vivid2D project settings
- Fixed namespace references in Vivid2D.cpp for Buffer classes
2025-11-15 16:22:14 +08:00
2025-11-14 16:22:42 +08:00

Vivid2DRenderer 项目构建指南

本指南详细介绍了如何设置开发环境并构建 Vivid2DRenderer 项目。

作者信息

  • 作者: tzdwindows 7
  • QQ 3076584115

一、先决条件

在开始之前,请确保你已经安装了以下软件:

  1. Visual Studio (VS): 推荐使用最新版本,并确保安装了 C++ 桌面开发工作负载。
  2. vcpkg: 微软的 C/C++ 库管理器。

二、配置 vcpkg

vcpkg 用于下载和安装项目所需的第三方库。

  1. 下载并引导 vcpkg:

    • 克隆 vcpkg 仓库或下载压缩包。
    • 运行引导脚本Windows 上通常是 .\bootstrap-vcpkg.bat)。
  2. 安装项目依赖库: 打开命令行或 PowerShell进入 vcpkg 目录,然后运行以下命令来安装项目所需的库:

    .\vcpkg install glfw3 glew stb glad spdlog glm
    
    • 此命令将下载并安装 glfw3 (窗口和上下文管理)、glew/glad (OpenGL 扩展加载)、stb (图像处理/加载等)、spdlog (日志记录) 和 glm (数学库)。

三、使用 Visual Studio 构建项目

一旦依赖库安装完毕,你可以直接在 Visual Studio 中打开并构建项目。

  1. 打开项目:

    • 在 Visual Studio 中,打开 Vivid2DRenderer 项目的解决方案文件 (.sln) 或 CMake 项目文件夹。
  2. 配置 vcpkg 集成:

    • 如果项目使用的是 CMake并且你已经按照 vcpkg 的指引正确设置了环境变量或用户范围集成Visual Studio 通常会自动找到依赖库。
    • 如果需要手动集成,请确保 Visual Studio 知道 vcpkg 的安装路径,通常是通过运行 .\vcpkg integrate install 实现的。
  3. 构建:

    • 在 Visual Studio 中,选择你需要的配置(例如 DebugRelease)。
    • 在菜单栏中,选择 构建 (Build) -> 构建解决方案 (Build Solution)

Description
Vivid2DRenderer的c++库
Readme 3.2 MiB
Languages
C++ 99.5%
C 0.4%
Batchfile 0.1%