Annotation of ports/graphics/devil/patches/patch-src-ILUT_src_ilut_opengl_c, Revision 1.1
1.1 ! yason 1: $OpenBSD$
! 2: --- src-ILUT/src/ilut_opengl.c.orig Mon Sep 14 15:22:33 2009
! 3: +++ src-ILUT/src/ilut_opengl.c Mon Sep 14 15:25:13 2009
! 4: @@ -58,7 +58,7 @@ void *aglGetProcAddress( const GLubyte *name ) {
! 5: // #pragma comment(lib, "freeglut.lib")
! 6: #endif
! 7:
! 8: -#ifdef linux
! 9: +#if defined(linux) || defined (__OpenBSD__)
! 10: // fix for glXGetProcAddressARB
! 11: #define GLX_GLXEXT_PROTOTYPES
! 12: #include <GL/glx.h>
! 13: @@ -84,7 +84,7 @@ void *aglGetProcAddress( const GLubyte *name ) {
! 14:
! 15: static ILboolean HasCubemapHardware = IL_FALSE;
! 16: static ILboolean HasNonPowerOfTwoHardware = IL_FALSE;
! 17: -#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__)
! 18: +#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__) || defined (__OpenBSD__)
! 19: ILGLTEXIMAGE3DARBPROC ilGLTexImage3D = NULL;
! 20: ILGLTEXSUBIMAGE3DARBPROC ilGLTexSubImage3D = NULL;
! 21: ILGLCOMPRESSEDTEXIMAGE2DARBPROC ilGLCompressed2D = NULL;
! 22: @@ -127,7 +127,7 @@ ILboolean ilutGLInit()
! 23: IsExtensionSupported("GL_EXT_texture3D")) {
! 24: ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)wglGetProcAddress("glCompressedTexImage3DARB");
! 25: }
! 26: - #elif linux
! 27: + #elif defined(linux) || defined (__OpenBSD__)
! 28: if (IsExtensionSupported("GL_ARB_texture_compression") &&
! 29: IsExtensionSupported("GL_EXT_texture_compression_s3tc")) {
! 30: ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC)
! 31: @@ -246,7 +246,7 @@ ILuint GLGetDXTCNum(ILenum DXTCFormat)
! 32: ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLuint Target, ILimage *Image)
! 33: {
! 34: ILimage *ImageCopy, *OldImage;
! 35: -#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__)
! 36: +#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined (__OpenBSD__)
! 37: ILenum DXTCFormat;
! 38: ILuint Size;
! 39: ILubyte *Buffer;
! 40: @@ -259,7 +259,7 @@ ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLu
! 41:
! 42: OldImage = ilGetCurImage();
! 43:
! 44: -#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__)
! 45: +#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined (__OpenBSD__)
! 46: if (ilutGetBoolean(ILUT_GL_USE_S3TC) && ilGLCompressed2D != NULL) {
! 47: if (Image->DxtcData != NULL && Image->DxtcSize != 0) {
! 48: DXTCFormat = GLGetDXTCNum(Image->DxtcFormat);
CVSweb