renderer_opengl: Use OGLProgram instead of OGLShader.

This commit is contained in:
bunnei 2018-04-06 23:56:42 -04:00
parent 4f2b2d0bc5
commit da1114ca59
6 changed files with 6 additions and 6 deletions

View file

@ -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();

View file

@ -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 {

View file

@ -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;

View file

@ -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;
}; };

View file

@ -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");

View file

@ -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;