mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
GLUtil: Encapsulate functions in a namespace
This commit is contained in:
@ -11,12 +11,14 @@
|
||||
|
||||
std::unique_ptr<cInterfaceBase> GLInterface;
|
||||
|
||||
namespace GLUtil
|
||||
{
|
||||
void InitInterface()
|
||||
{
|
||||
GLInterface = HostGL_CreateGLInterface();
|
||||
}
|
||||
|
||||
GLuint OpenGL_CompileProgram(const std::string& vertexShader, const std::string& fragmentShader)
|
||||
GLuint CompileProgram(const std::string& vertexShader, const std::string& fragmentShader)
|
||||
{
|
||||
// generate objects
|
||||
GLuint vertexShaderID = glCreateShader(GL_VERTEX_SHADER);
|
||||
@ -100,3 +102,4 @@ GLuint OpenGL_CompileProgram(const std::string& vertexShader, const std::string&
|
||||
|
||||
return programID;
|
||||
}
|
||||
}
|
||||
|
@ -8,12 +8,8 @@
|
||||
|
||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#endif
|
||||
namespace GLUtil
|
||||
{
|
||||
void InitInterface();
|
||||
|
||||
// Helpers
|
||||
GLuint OpenGL_CompileProgram(const std::string& vertexShader, const std::string& fragmentShader);
|
||||
GLuint CompileProgram(const std::string& vertexShader, const std::string& fragmentShader);
|
||||
}
|
||||
|
Reference in New Issue
Block a user