You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add buffer orphan / stream options
Allows users to override default API usage, in order to get best performance on different platforms. Also changes the default legacy flags to use STREAM rather than DYNAMIC.
This commit is contained in:
@@ -1137,11 +1137,17 @@ void RasterizerCanvasBaseGLES3::draw_window_margins(int *black_margin, RID *blac
|
||||
|
||||
void RasterizerCanvasBaseGLES3::initialize() {
|
||||
|
||||
bool flag_stream = false;
|
||||
if (flag_stream) {
|
||||
_buffer_upload_usage_flag = GL_STREAM_DRAW;
|
||||
} else {
|
||||
_buffer_upload_usage_flag = GL_DYNAMIC_DRAW;
|
||||
int flag_stream_mode = GLOBAL_GET("rendering/2d/opengl/legacy_stream");
|
||||
switch (flag_stream_mode) {
|
||||
default: {
|
||||
_buffer_upload_usage_flag = GL_STREAM_DRAW;
|
||||
} break;
|
||||
case 1: {
|
||||
_buffer_upload_usage_flag = GL_DYNAMIC_DRAW;
|
||||
} break;
|
||||
case 2: {
|
||||
_buffer_upload_usage_flag = GL_STREAM_DRAW;
|
||||
} break;
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user