2018-04-07 11:12:38 +02:00
|
|
|
// Copyright 2018 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <glad/glad.h>
|
2018-08-23 23:30:27 +02:00
|
|
|
|
2020-05-18 03:32:49 +02:00
|
|
|
namespace OpenGL {
|
|
|
|
|
2018-04-07 11:12:38 +02:00
|
|
|
class ProgramManager {
|
|
|
|
public:
|
2021-05-23 09:28:34 +02:00
|
|
|
void BindProgram(GLuint program) {
|
|
|
|
if (bound_program == program) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
bound_program = program;
|
|
|
|
glUseProgram(program);
|
|
|
|
}
|
2020-05-18 03:32:49 +02:00
|
|
|
|
2021-05-23 09:28:34 +02:00
|
|
|
void RestoreGuestCompute() {}
|
2018-04-15 21:14:57 +02:00
|
|
|
|
2018-11-29 07:24:21 +01:00
|
|
|
private:
|
2021-05-23 09:28:34 +02:00
|
|
|
GLuint bound_program = 0;
|
2018-04-07 11:12:38 +02:00
|
|
|
};
|
|
|
|
|
2020-05-18 03:32:49 +02:00
|
|
|
} // namespace OpenGL
|