Merge branch 'master' into Glew_Version_For_Real

This commit is contained in:
Christoph Oelckers 2014-05-11 09:17:46 +02:00
commit 92b9814460
2 changed files with 1 additions and 38 deletions

View file

@ -46,29 +46,12 @@
#include "gl/system/gl_interface.h" #include "gl/system/gl_interface.h"
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"
#if defined (__unix__) || defined (__APPLE__)
#define PROC void*
#define LPCSTR const char*
#include <SDL.h>
#define wglGetProcAddress(x) (*SDL_GL_GetProcAddress)(x)
#endif
static void APIENTRY glBlendEquationDummy (GLenum mode);
static TArray<FString> m_Extensions; static TArray<FString> m_Extensions;
RenderContext gl; RenderContext gl;
int occlusion_type=0; int occlusion_type=0;
PROC myGetProcAddress(LPCSTR proc)
{
PROC p = wglGetProcAddress(proc);
if (p == NULL) I_Error("Fatal: GL function '%s' not found.", proc);
return p;
}
//========================================================================== //==========================================================================
// //
@ -222,26 +205,6 @@ void gl_PrintStartupLog()
// //
//========================================================================== //==========================================================================
static void APIENTRY glBlendEquationDummy (GLenum mode)
{
// If this is not supported all non-existent modes are
// made to draw nothing.
if (mode == GL_FUNC_ADD)
{
glColorMask(true, true, true, true);
}
else
{
glColorMask(false, false, false, false);
}
}
//==========================================================================
//
//
//
//==========================================================================
void gl_SetTextureMode(int type) void gl_SetTextureMode(int type)
{ {
static float white[] = {1.f,1.f,1.f,1.f}; static float white[] = {1.f,1.f,1.f,1.f};

View file

@ -72,7 +72,7 @@
#if defined(__APPLE__) #if defined(__APPLE__)
#include <OpenGL/OpenGL.h> #include <OpenGL/OpenGL.h>
#elif defined(__unix__) #elif defined(__unix__)
#include <GL/glxew.h> //#include <GL/glxew.h>
#else // !__APPLE__ && !__unix__ #else // !__APPLE__ && !__unix__
#define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code! #define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code!
#include <GL/wglew.h> #include <GL/wglew.h>