mirror of https://github.com/snes9xgit/snes9x.git
win32: switch to OpenGL Loader Generator files
This commit is contained in:
parent
94f90fc94b
commit
af71ef55cd
|
@ -264,17 +264,9 @@ bool CGLCG::LoadFBOFunctions()
|
||||||
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
if(extensions && strstr(extensions, "framebuffer_object")) {
|
if(extensions && strstr(extensions, "framebuffer_object")) {
|
||||||
glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)wglGetProcAddress("glGenFramebuffers");
|
|
||||||
glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)wglGetProcAddress("glDeleteFramebuffers");
|
|
||||||
glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)wglGetProcAddress("glBindFramebuffer");
|
|
||||||
glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)wglGetProcAddress("glFramebufferTexture2D");
|
|
||||||
glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)wglGetProcAddress("glCheckFramebufferStatus");
|
|
||||||
glClientActiveTexture = (PFNGLACTIVETEXTUREPROC)wglGetProcAddress("glClientActiveTexture");
|
|
||||||
|
|
||||||
if(glGenFramebuffers && glDeleteFramebuffers && glBindFramebuffer && glFramebufferTexture2D && glClientActiveTexture) {
|
if(glGenFramebuffers && glDeleteFramebuffers && glBindFramebuffer && glFramebufferTexture2D && glClientActiveTexture) {
|
||||||
fboFunctionsLoaded = true;
|
fboFunctionsLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return fboFunctionsLoaded;
|
return fboFunctionsLoaded;
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,7 @@
|
||||||
#define CGGLCG_H
|
#define CGGLCG_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <gl/gl.h>
|
#include "gl_core_3_1.h"
|
||||||
#include "glext.h"
|
|
||||||
#include "cgFunctions.h"
|
#include "cgFunctions.h"
|
||||||
#include "CCGShader.h"
|
#include "CCGShader.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -276,13 +275,6 @@ private:
|
||||||
static const GLfloat lut_coords[8];
|
static const GLfloat lut_coords[8];
|
||||||
|
|
||||||
|
|
||||||
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
|
|
||||||
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
|
|
||||||
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
|
|
||||||
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
|
|
||||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
|
|
||||||
PFNGLACTIVETEXTUREPROC glClientActiveTexture;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGLCG(CGcontext cgContext);
|
CGLCG(CGcontext cgContext);
|
||||||
~CGLCG(void);
|
~CGLCG(void);
|
||||||
|
|
|
@ -281,6 +281,8 @@ bool COpenGL::Initialize(HWND hWnd)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ogl_LoadFunctions();
|
||||||
|
|
||||||
LoadPBOFunctions();
|
LoadPBOFunctions();
|
||||||
|
|
||||||
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
|
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
|
||||||
|
@ -641,12 +643,6 @@ bool COpenGL::LoadPBOFunctions()
|
||||||
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
if(extensions && strstr(extensions, "pixel_buffer_object")) {
|
if(extensions && strstr(extensions, "pixel_buffer_object")) {
|
||||||
glGenBuffers = (PFNGLGENBUFFERSPROC)wglGetProcAddress("glGenBuffers");
|
|
||||||
glBindBuffer = (PFNGLBINDBUFFERPROC)wglGetProcAddress("glBindBuffer");
|
|
||||||
glBufferData = (PFNGLBUFFERDATAPROC)wglGetProcAddress("glBufferData");
|
|
||||||
glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)wglGetProcAddress("glDeleteBuffers");
|
|
||||||
glMapBuffer = (PFNGLMAPBUFFERPROC)wglGetProcAddress("glMapBuffer");
|
|
||||||
glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)wglGetProcAddress("glUnmapBuffer");
|
|
||||||
|
|
||||||
if(glGenBuffers && glBindBuffer && glBufferData && glDeleteBuffers && glMapBuffer) {
|
if(glGenBuffers && glBindBuffer && glBufferData && glDeleteBuffers && glMapBuffer) {
|
||||||
pboFunctionsLoaded = true;
|
pboFunctionsLoaded = true;
|
||||||
|
@ -664,18 +660,6 @@ bool COpenGL::LoadShaderFunctions()
|
||||||
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
const char *extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
if(extensions && strstr(extensions, "fragment_program")) {
|
if(extensions && strstr(extensions, "fragment_program")) {
|
||||||
glCreateProgram = (PFNGLCREATEPROGRAMPROC) wglGetProcAddress ("glCreateProgram");
|
|
||||||
glCreateShader = (PFNGLCREATESHADERPROC) wglGetProcAddress ("glCreateShader");
|
|
||||||
glCompileShader = (PFNGLCOMPILESHADERPROC) wglGetProcAddress ("glCompileShader");
|
|
||||||
glDeleteShader = (PFNGLDELETESHADERPROC) wglGetProcAddress ("glDeleteShader");
|
|
||||||
glDeleteProgram = (PFNGLDELETEPROGRAMPROC) wglGetProcAddress ("glDeleteProgram");
|
|
||||||
glAttachShader = (PFNGLATTACHSHADERPROC) wglGetProcAddress ("glAttachShader");
|
|
||||||
glDetachShader = (PFNGLDETACHSHADERPROC) wglGetProcAddress ("glDetachShader");
|
|
||||||
glLinkProgram = (PFNGLLINKPROGRAMPROC) wglGetProcAddress ("glLinkProgram");
|
|
||||||
glUseProgram = (PFNGLUSEPROGRAMPROC) wglGetProcAddress ("glUseProgram");
|
|
||||||
glShaderSource = (PFNGLSHADERSOURCEPROC) wglGetProcAddress ("glShaderSource");
|
|
||||||
glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) wglGetProcAddress ("glGetUniformLocation");
|
|
||||||
glUniform2fv = (PFNGLUNIFORM2FVPROC) wglGetProcAddress ("glUniform2fv");
|
|
||||||
|
|
||||||
if(glCreateProgram &&
|
if(glCreateProgram &&
|
||||||
glCreateShader &&
|
glCreateShader &&
|
||||||
|
|
|
@ -195,11 +195,10 @@
|
||||||
#define COPENGL_H
|
#define COPENGL_H
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <gl\gl.h>
|
#include "gl_core_3_1.h"
|
||||||
#include "cgFunctions.h"
|
#include "cgFunctions.h"
|
||||||
#include "CGLCG.h"
|
#include "CGLCG.h"
|
||||||
|
|
||||||
#include "glext.h"
|
|
||||||
#include "wglext.h"
|
#include "wglext.h"
|
||||||
#include "IS9xDisplayOutput.h"
|
#include "IS9xDisplayOutput.h"
|
||||||
|
|
||||||
|
@ -240,29 +239,6 @@ private:
|
||||||
GLuint vertexShader;
|
GLuint vertexShader;
|
||||||
GLuint fragmentShader;
|
GLuint fragmentShader;
|
||||||
|
|
||||||
// PBO Functions
|
|
||||||
PFNGLGENBUFFERSPROC glGenBuffers;
|
|
||||||
PFNGLBINDBUFFERPROC glBindBuffer;
|
|
||||||
PFNGLBUFFERDATAPROC glBufferData;
|
|
||||||
PFNGLDELETEBUFFERSPROC glDeleteBuffers;
|
|
||||||
PFNGLMAPBUFFERPROC glMapBuffer;
|
|
||||||
PFNGLUNMAPBUFFERPROC glUnmapBuffer;
|
|
||||||
|
|
||||||
// Shader Functions
|
|
||||||
|
|
||||||
PFNGLCREATEPROGRAMPROC glCreateProgram;
|
|
||||||
PFNGLCREATESHADERPROC glCreateShader;
|
|
||||||
PFNGLCOMPILESHADERPROC glCompileShader;
|
|
||||||
PFNGLDELETESHADERPROC glDeleteShader;
|
|
||||||
PFNGLDELETEPROGRAMPROC glDeleteProgram;
|
|
||||||
PFNGLATTACHSHADERPROC glAttachShader;
|
|
||||||
PFNGLDETACHSHADERPROC glDetachShader;
|
|
||||||
PFNGLLINKPROGRAMPROC glLinkProgram;
|
|
||||||
PFNGLUSEPROGRAMPROC glUseProgram;
|
|
||||||
PFNGLSHADERSOURCEPROC glShaderSource;
|
|
||||||
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
|
|
||||||
PFNGLUNIFORM2FVPROC glUniform2fv;
|
|
||||||
|
|
||||||
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||||
|
|
||||||
bool SetShaders(const TCHAR *file);
|
bool SetShaders(const TCHAR *file);
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
#define CGMINI_H
|
#define CGMINI_H
|
||||||
|
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#include <gl/GL.h>
|
#include "gl_core_3_1.h"
|
||||||
|
|
||||||
#define CGENTRY __cdecl
|
#define CGENTRY __cdecl
|
||||||
#define CGD3D9ENTRY __cdecl
|
#define CGD3D9ENTRY __cdecl
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
10081
win32/glext.h
10081
win32/glext.h
File diff suppressed because it is too large
Load Diff
|
@ -428,6 +428,7 @@
|
||||||
<ClInclude Include="CXML.h" />
|
<ClInclude Include="CXML.h" />
|
||||||
<ClInclude Include="dxerr.h" />
|
<ClInclude Include="dxerr.h" />
|
||||||
<ClInclude Include="globals.h" />
|
<ClInclude Include="globals.h" />
|
||||||
|
<ClInclude Include="gl_core_3_1.h" />
|
||||||
<ClInclude Include="InputCustom.h" />
|
<ClInclude Include="InputCustom.h" />
|
||||||
<ClInclude Include="IS9xDisplayOutput.h" />
|
<ClInclude Include="IS9xDisplayOutput.h" />
|
||||||
<ClInclude Include="IS9xSoundOutput.h" />
|
<ClInclude Include="IS9xSoundOutput.h" />
|
||||||
|
@ -557,6 +558,7 @@
|
||||||
<ClCompile Include="CXML.cpp" />
|
<ClCompile Include="CXML.cpp" />
|
||||||
<ClCompile Include="DumpAtEnd.cpp" />
|
<ClCompile Include="DumpAtEnd.cpp" />
|
||||||
<ClCompile Include="dxerr.cpp" />
|
<ClCompile Include="dxerr.cpp" />
|
||||||
|
<ClCompile Include="gl_core_3_1.c" />
|
||||||
<ClCompile Include="InputCustom.cpp" />
|
<ClCompile Include="InputCustom.cpp" />
|
||||||
<ClCompile Include="render.cpp" />
|
<ClCompile Include="render.cpp" />
|
||||||
<ClCompile Include="snes_ntsc.c" />
|
<ClCompile Include="snes_ntsc.c" />
|
||||||
|
|
|
@ -255,6 +255,9 @@
|
||||||
<ClInclude Include="..\filter\xbrz_tools.h">
|
<ClInclude Include="..\filter\xbrz_tools.h">
|
||||||
<Filter>Filter</Filter>
|
<Filter>Filter</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="gl_core_3_1.h">
|
||||||
|
<Filter>GUI\VideoDriver</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\bsx.cpp">
|
<ClCompile Include="..\bsx.cpp">
|
||||||
|
@ -557,6 +560,9 @@
|
||||||
<ClCompile Include="DumpAtEnd.cpp">
|
<ClCompile Include="DumpAtEnd.cpp">
|
||||||
<Filter>GUI</Filter>
|
<Filter>GUI</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="gl_core_3_1.c">
|
||||||
|
<Filter>GUI\VideoDriver</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="rsrc\nodrop.cur">
|
<None Include="rsrc\nodrop.cur">
|
||||||
|
|
Loading…
Reference in New Issue