16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 15:59:18 +02:00

reformat: use auto on certain types

This commit is contained in:
jerrrrycho
2026-07-04 04:04:17 +02:00
parent a4c126b4ea
commit f61068ff89
53 changed files with 200 additions and 201 deletions

View File

@@ -408,7 +408,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
int glsl_version = 130;
sscanf(g_GlslVersionString, "#version %d", &glsl_version);
const GLchar* vertex_shader_glsl_120 =
auto vertex_shader_glsl_120 =
"uniform mat4 ProjMtx;\n"
"attribute vec2 Position;\n"
"attribute vec2 UV;\n"
@@ -422,7 +422,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
"}\n";
const GLchar* vertex_shader_glsl_130 =
auto vertex_shader_glsl_130 =
"uniform mat4 ProjMtx;\n"
"in vec2 Position;\n"
"in vec2 UV;\n"
@@ -436,7 +436,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
"}\n";
const GLchar* vertex_shader_glsl_300_es =
auto vertex_shader_glsl_300_es =
"precision mediump float;\n"
"layout (location = 0) in vec2 Position;\n"
"layout (location = 1) in vec2 UV;\n"
@@ -451,7 +451,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
"}\n";
const GLchar* vertex_shader_glsl_410_core =
auto vertex_shader_glsl_410_core =
"layout (location = 0) in vec2 Position;\n"
"layout (location = 1) in vec2 UV;\n"
"layout (location = 2) in vec4 Color;\n"
@@ -465,7 +465,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
"}\n";
const GLchar* fragment_shader_glsl_120 =
auto fragment_shader_glsl_120 =
"#ifdef GL_ES\n"
" precision mediump float;\n"
"#endif\n"
@@ -477,7 +477,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);\n"
"}\n";
const GLchar* fragment_shader_glsl_130 =
auto fragment_shader_glsl_130 =
"uniform sampler2D Texture;\n"
"in vec2 Frag_UV;\n"
"in vec4 Frag_Color;\n"
@@ -487,7 +487,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" Out_Color = FBOUT(Frag_Color * texture(Texture, Frag_UV.st));\n"
"}\n";
const GLchar* fragment_shader_glsl_300_es =
auto fragment_shader_glsl_300_es =
"precision mediump float;\n"
"uniform sampler2D Texture;\n"
"in vec2 Frag_UV;\n"
@@ -498,7 +498,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
" Out_Color = FBOUT(Frag_Color * texture(Texture, Frag_UV.st));\n"
"}\n";
const GLchar* fragment_shader_glsl_410_core =
auto fragment_shader_glsl_410_core =
"in vec2 Frag_UV;\n"
"in vec4 Frag_Color;\n"
"uniform sampler2D Texture;\n"
@@ -539,8 +539,8 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
glCompileShader(g_VertHandle);
CheckShader(g_VertHandle, "vertex shader");
const GLchar* fbout_copy = "vec4 FBOUT(vec4 x) { return x; }\n";
const GLchar* fbout_gamma = "vec4 FBOUT(vec4 x) { return vec4(pow(x.rgb, vec3(1.0 / 2.2)), x.a); }\n";
auto fbout_copy = "vec4 FBOUT(vec4 x) { return x; }\n";
auto fbout_gamma = "vec4 FBOUT(vec4 x) { return vec4(pow(x.rgb, vec3(1.0 / 2.2)), x.a); }\n";
const GLchar* fragment_shader_with_version[3] = { g_GlslVersionString, Global.gfx_shadergamma ? fbout_gamma : fbout_copy, fragment_shader };
g_FragHandle = glCreateShader(GL_FRAGMENT_SHADER);