mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 07:05:40 +12:00
Merge pull request #609 from wheremyfoodat/wheremyfoodat-patch-2
Shadergen: Pre-allocate space for shadergen string
This commit is contained in:
commit
5eb628eb5f
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 FragmentGenerator::getDefaultVertexShader() {
|
||||||
std::string ret = "";
|
std::string ret = "";
|
||||||
|
// Reserve some space (128KB) in the output string to avoid too many allocations later
|
||||||
|
ret.reserve(128 * 1024);
|
||||||
|
|
||||||
switch (api) {
|
switch (api) {
|
||||||
case API::GL: ret += "#version 410 core"; break;
|
case API::GL: ret += "#version 410 core"; break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue