mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 06:05:40 +12:00
Shadergen: Pre-allocate space for shadergen string
This commit is contained in:
parent
96f684e51c
commit
82068031f3
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@ static constexpr const char* uniformDefinition = R"(
|
|||
|
||||
std::string FragmentGenerator::getDefaultVertexShader() {
|
||||
std::string ret = "";
|
||||
// Reserve some space (128KB) in the output string to avoid too many allocations later
|
||||
ret.reserve(128 * 1024);
|
||||
|
||||
switch (api) {
|
||||
case API::GL: ret += "#version 410 core"; break;
|
||||
|
|
Loading…
Add table
Reference in a new issue