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
This commit is contained in:
tzdwindows 7
2025-11-15 16:22:14 +08:00
parent 0b88b1a7f4
commit 6dcd006f0e
8 changed files with 376 additions and 4 deletions

View File

@@ -150,8 +150,8 @@ int main() {
RenderSystem::clearColor(0.2f, 0.3f, 0.3f, 1.0f);
RenderSystem::clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Buffer::Tesselator& t = Buffer::Tesselator::getInstance();
Buffer::BufferBuilder& builder = t.getBuilder();
Vivid2D::Render::Buffer::Tesselator& t = Vivid2D::Render::Buffer::Tesselator::getInstance();
Vivid2D::Render::Buffer::BufferBuilder& builder = t.getBuilder();
// 矩形的位置和大小
const float rectX = 0; // 矩形左上角的 X 坐标