mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 05:40:15 -06:00
get the OpenGL renderer going.
sorta. (also make the blackmagic_II branch obsolete in the process)
This commit is contained in:
@ -21,6 +21,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// TODO: different includes for each platform
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
@ -45,23 +47,11 @@
|
||||
|
||||
|
||||
// if you need more OpenGL functions, add them to the macronator here
|
||||
// TODO: handle conditionally loading certain functions for different GL versions
|
||||
|
||||
#ifndef __WIN32__
|
||||
|
||||
#define DO_PROCLIST_1_3(func)
|
||||
|
||||
#else
|
||||
|
||||
#define DO_PROCLIST_1_3(func) \
|
||||
func(GLACTIVETEXTURE, glActiveTexture); \
|
||||
func(GLBLENDCOLOR, glBlendColor); \
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define DO_PROCLIST(func) \
|
||||
DO_PROCLIST_1_3(func) \
|
||||
func(GLACTIVETEXTURE, glActiveTexture); \
|
||||
func(GLBLENDCOLOR, glBlendColor); \
|
||||
\
|
||||
func(GLGENFRAMEBUFFERS, glGenFramebuffers); \
|
||||
func(GLDELETEFRAMEBUFFERS, glDeleteFramebuffers); \
|
||||
@ -122,14 +112,18 @@
|
||||
func(GLGETSTRINGI, glGetStringi); \
|
||||
|
||||
|
||||
namespace OpenGL
|
||||
{
|
||||
|
||||
DO_PROCLIST(DECLPROC_EXT);
|
||||
|
||||
bool Init();
|
||||
|
||||
bool OpenGL_Init();
|
||||
bool BuildShaderProgram(const char* vs, const char* fs, GLuint* ids, const char* name);
|
||||
bool LinkShaderProgram(GLuint* ids);
|
||||
void DeleteShaderProgram(GLuint* ids);
|
||||
void UseShaderProgram(GLuint* ids);
|
||||
|
||||
bool OpenGL_BuildShaderProgram(const char* vs, const char* fs, GLuint* ids, const char* name);
|
||||
bool OpenGL_LinkShaderProgram(GLuint* ids);
|
||||
void OpenGL_DeleteShaderProgram(GLuint* ids);
|
||||
void OpenGL_UseShaderProgram(GLuint* ids);
|
||||
}
|
||||
|
||||
#endif // OPENGLSUPPORT_H
|
||||
|
Reference in New Issue
Block a user