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;
|
||||
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);
|
||||
} else {
|
||||
UNREACHABLE();
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
/// OpenGL shader generated for a given Maxwell register state
|
||||
struct MaxwellShader {
|
||||
/// OpenGL shader resource
|
||||
OGLShader shader;
|
||||
OGLProgram shader;
|
||||
};
|
||||
|
||||
struct VertexShader {
|
||||
|
|
|
@ -818,7 +818,7 @@ void main() {
|
|||
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();
|
||||
GLuint old_program = state.draw.shader_program;
|
||||
|
|
|
@ -334,7 +334,7 @@ private:
|
|||
OGLVertexArray attributeless_vao;
|
||||
OGLBuffer d24s8_abgr_buffer;
|
||||
GLsizeiptr d24s8_abgr_buffer_size;
|
||||
OGLShader d24s8_abgr_shader;
|
||||
OGLProgram d24s8_abgr_shader;
|
||||
GLint d24s8_abgr_tbo_size_u_id;
|
||||
GLint d24s8_abgr_viewport_u_id;
|
||||
};
|
||||
|
|
|
@ -210,7 +210,7 @@ void RendererOpenGL::InitOpenGLObjects() {
|
|||
0.0f);
|
||||
|
||||
// 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.Apply();
|
||||
uniform_modelview_matrix = glGetUniformLocation(shader.handle, "modelview_matrix");
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
// OpenGL object IDs
|
||||
OGLVertexArray vertex_array;
|
||||
OGLBuffer vertex_buffer;
|
||||
OGLShader shader;
|
||||
OGLProgram shader;
|
||||
|
||||
/// Display information for Switch screen
|
||||
ScreenInfo screen_info;
|
||||
|
|
Reference in New Issue