[runtime] GPU sprite renderer (#1075)

* sprite_3d first attempt

* fixs

* fix Q usage

* ??

* attempt 2

* Update sprite_3d.vert

* works-ish

* works properly!

* scissor fix

* simplify shader

* texture support except everything is broken for some reason

* stuff

* Update SpriteRenderer.cpp

* meltdown

* Revert "simplify shader"

This reverts commit 97bd9b77be.

* Revert "Revert "simplify shader""

This reverts commit 32fb46ce90.

* fix blend

* fix blend and prim

* fix depth write and texture rendering

* fix bugs

* remove noperspective

* fix and finalize sprite 3D vert shader

* optimize 3D program

* 2D sprites! almost first try

* fixes + merge shader code

* HUD sprite support and clean up code

* oopsie

* fix 3d sprites

* minor cleanup and increase sprite buffer to 8k sprites

* clang

* replace some uses of `glBufferSubData` with `glBufferData`
This commit is contained in:
ManDude
2022-01-15 17:31:38 +00:00
committed by GitHub
parent f76c87d7fe
commit 67bb1193a8
17 changed files with 1599 additions and 1054 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ void TexturePool::set_texture(u32 location, std::shared_ptr<TextureRecord> recor
if (m_textures.at(location).normal_texture) {
if (record->do_gc && m_textures.at(location).normal_texture != record) {
m_garbage_textures.push_back(std::move(m_textures[location].normal_texture));
fmt::print("replace add to garbage list {}\n", m_garbage_textures.back()->name);
// fmt::print("replace add to garbage list {}\n", m_garbage_textures.back()->name);
}
}
m_textures[location].normal_texture = std::move(record);