renderer_opengl: Use OGLProgram instead of OGLShader.
This commit is contained in:
parent
4f2b2d0bc5
commit
da1114ca59
|
@ -573,7 +573,7 @@ void main() {
|
||||||
|
|
||||||
current_shader = &test_shader;
|
current_shader = &test_shader;
|
||||||
if (has_ARB_separate_shader_objects) {
|
if (has_ARB_separate_shader_objects) {
|
||||||
test_shader.shader.Create(vertex_shader, nullptr, fragment_shader, {}, true);
|
test_shader.shader.CreateFromSource(vertex_shader, nullptr, fragment_shader, true);
|
||||||
glActiveShaderProgram(pipeline.handle, test_shader.shader.handle);
|
glActiveShaderProgram(pipeline.handle, test_shader.shader.handle);
|
||||||
} else {
|
} else {
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
/// OpenGL shader generated for a given Maxwell register state
|
/// OpenGL shader generated for a given Maxwell register state
|
||||||
struct MaxwellShader {
|
struct MaxwellShader {
|
||||||
/// OpenGL shader resource
|
/// OpenGL shader resource
|
||||||
OGLShader shader;
|
OGLProgram shader;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VertexShader {
|
struct VertexShader {
|
||||||
|
|
|
@ -818,7 +818,7 @@ void main() {
|
||||||
color = texelFetch(tbo, tbo_offset).rabg;
|
color = texelFetch(tbo, tbo_offset).rabg;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
d24s8_abgr_shader.Create(vs_source, nullptr, fs_source);
|
d24s8_abgr_shader.CreateFromSource(vs_source, nullptr, fs_source);
|
||||||
|
|
||||||
OpenGLState state = OpenGLState::GetCurState();
|
OpenGLState state = OpenGLState::GetCurState();
|
||||||
GLuint old_program = state.draw.shader_program;
|
GLuint old_program = state.draw.shader_program;
|
||||||
|
|
|
@ -334,7 +334,7 @@ private:
|
||||||
OGLVertexArray attributeless_vao;
|
OGLVertexArray attributeless_vao;
|
||||||
OGLBuffer d24s8_abgr_buffer;
|
OGLBuffer d24s8_abgr_buffer;
|
||||||
GLsizeiptr d24s8_abgr_buffer_size;
|
GLsizeiptr d24s8_abgr_buffer_size;
|
||||||
OGLShader d24s8_abgr_shader;
|
OGLProgram d24s8_abgr_shader;
|
||||||
GLint d24s8_abgr_tbo_size_u_id;
|
GLint d24s8_abgr_tbo_size_u_id;
|
||||||
GLint d24s8_abgr_viewport_u_id;
|
GLint d24s8_abgr_viewport_u_id;
|
||||||
};
|
};
|
||||||
|
|
|
@ -210,7 +210,7 @@ void RendererOpenGL::InitOpenGLObjects() {
|
||||||
0.0f);
|
0.0f);
|
||||||
|
|
||||||
// Link shaders and get variable locations
|
// Link shaders and get variable locations
|
||||||
shader.Create(vertex_shader, nullptr, fragment_shader);
|
shader.CreateFromSource(vertex_shader, nullptr, fragment_shader);
|
||||||
state.draw.shader_program = shader.handle;
|
state.draw.shader_program = shader.handle;
|
||||||
state.Apply();
|
state.Apply();
|
||||||
uniform_modelview_matrix = glGetUniformLocation(shader.handle, "modelview_matrix");
|
uniform_modelview_matrix = glGetUniformLocation(shader.handle, "modelview_matrix");
|
||||||
|
|
|
@ -72,7 +72,7 @@ private:
|
||||||
// OpenGL object IDs
|
// OpenGL object IDs
|
||||||
OGLVertexArray vertex_array;
|
OGLVertexArray vertex_array;
|
||||||
OGLBuffer vertex_buffer;
|
OGLBuffer vertex_buffer;
|
||||||
OGLShader shader;
|
OGLProgram shader;
|
||||||
|
|
||||||
/// Display information for Switch screen
|
/// Display information for Switch screen
|
||||||
ScreenInfo screen_info;
|
ScreenInfo screen_info;
|
||||||
|
|
Reference in New Issue