mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: keep gl_ActiveTexture & gl_BlendColor (fix MS compilation)
It seems openGL ABI isn't exactly the same between Windows and my PC.
This commit is contained in:
parent
42a4c7d368
commit
f99882c61c
|
@ -22,6 +22,9 @@
|
|||
#include "GLLoader.h"
|
||||
#include "GSdx.h"
|
||||
|
||||
PFNGLACTIVETEXTUREPROC gl_ActiveTexture = NULL;
|
||||
PFNGLBLENDCOLORPROC gl_BlendColor = NULL;
|
||||
|
||||
PFNGLATTACHSHADERPROC glAttachShader = NULL;
|
||||
PFNGLBINDBUFFERPROC glBindBuffer = NULL;
|
||||
PFNGLBINDBUFFERBASEPROC glBindBufferBase = NULL;
|
||||
|
@ -150,7 +153,7 @@ PFNGLBLENDCOLORPROC glBlendColor = NUL
|
|||
namespace Emulate_DSA {
|
||||
// Texture entry point
|
||||
void APIENTRY BindTextureUnit(GLuint unit, GLuint texture) {
|
||||
glActiveTexture(GL_TEXTURE0 + unit);
|
||||
gl_ActiveTexture(GL_TEXTURE0 + unit);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
}
|
||||
|
||||
|
|
|
@ -183,6 +183,12 @@ typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
|
|||
typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
#endif /* GL_VERSION_4_5 */
|
||||
|
||||
// Note: glActiveTexture & glBlendColor aren't included in the win GL ABI.
|
||||
// (maybe gl.h is outdated, or my setup is wrong)
|
||||
// Anyway, let's just keep the mangled function pointer for those 2 functions.
|
||||
extern PFNGLACTIVETEXTUREPROC gl_ActiveTexture;
|
||||
extern PFNGLBLENDCOLORPROC gl_BlendColor;
|
||||
|
||||
extern PFNGLATTACHSHADERPROC glAttachShader;
|
||||
extern PFNGLBINDBUFFERPROC glBindBuffer;
|
||||
extern PFNGLBINDBUFFERBASEPROC glBindBufferBase;
|
||||
|
|
|
@ -1356,7 +1356,7 @@ void GSDeviceOGL::OMSetBlendState(uint8 blend_index, uint8 blend_factor, bool is
|
|||
if (is_blend_constant && GLState::bf != blend_factor) {
|
||||
GLState::bf = blend_factor;
|
||||
float bf = (float)blend_factor / 128.0f;
|
||||
glBlendColor(bf, bf, bf, bf);
|
||||
gl_BlendColor(bf, bf, bf, bf);
|
||||
}
|
||||
|
||||
const OGLBlend& b = m_blendMapOGL[blend_index];
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
void GSWndGL::PopulateGlFunction()
|
||||
{
|
||||
*(void**)&(gl_ActiveTexture) = GetProcAddress("glActiveTexture");
|
||||
*(void**)&(gl_BlendColor) = GetProcAddress("glBlendColor");
|
||||
|
||||
*(void**)&(glBlendEquationSeparate) = GetProcAddress("glBlendEquationSeparate");
|
||||
*(void**)&(glBlendFuncSeparate) = GetProcAddress("glBlendFuncSeparate");
|
||||
*(void**)&(glAttachShader) = GetProcAddress("glAttachShader");
|
||||
|
|
Loading…
Reference in New Issue