summaryrefslogtreecommitdiff
path: root/devel/devIL/patches/patch-aa
blob: 59b782ab411292ed03a2b6a3a5ecb96cdd87a595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-aa,v 1.4 2018/10/26 10:18:50 jperkin Exp $

--- src-ILUT/src/ilut_opengl.c.orig	2009-03-08 07:10:11.000000000 +0000
+++ src-ILUT/src/ilut_opengl.c
@@ -58,7 +58,7 @@ void *aglGetProcAddress( const GLubyte *
 //	#pragma comment(lib, "freeglut.lib")
 #endif
 
-#ifdef linux
+#if defined(linux) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun)
 	// fix for glXGetProcAddressARB
 	#define GLX_GLXEXT_PROTOTYPES
 	#include <GL/glx.h>
@@ -84,7 +84,7 @@ void *aglGetProcAddress( const GLubyte *
 
 static ILboolean HasCubemapHardware = IL_FALSE;
 static ILboolean HasNonPowerOfTwoHardware = IL_FALSE;
-#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__)
+#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun)
 	ILGLTEXIMAGE3DARBPROC			ilGLTexImage3D = NULL;
 	ILGLTEXSUBIMAGE3DARBPROC		ilGLTexSubImage3D = NULL;
 	ILGLCOMPRESSEDTEXIMAGE2DARBPROC	ilGLCompressed2D = NULL;
@@ -127,7 +127,7 @@ ILboolean ilutGLInit()
 			IsExtensionSupported("GL_EXT_texture3D")) {
 				ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)wglGetProcAddress("glCompressedTexImage3DARB");
 		}
-	#elif linux
+	#elif defined(linux) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD) || defined(__OpenBSD__) || defined(__sun)
 		if (IsExtensionSupported("GL_ARB_texture_compression") &&
 			IsExtensionSupported("GL_EXT_texture_compression_s3tc")) {
 				ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC)
@@ -246,7 +246,7 @@ ILuint GLGetDXTCNum(ILenum DXTCFormat)
 ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLuint Target, ILimage *Image)
 {
 	ILimage	*ImageCopy, *OldImage;
-#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__)
+#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun)
 	ILenum	DXTCFormat;
 	ILuint	Size;
 	ILubyte	*Buffer;
@@ -259,7 +259,7 @@ ILboolean ILAPIENTRY ilutGLTexImage_(GLu
 
 	OldImage = ilGetCurImage();
 
-#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__)
+#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun)
 	if (ilutGetBoolean(ILUT_GL_USE_S3TC) && ilGLCompressed2D != NULL) {
 		if (Image->DxtcData != NULL && Image->DxtcSize != 0) {
 			DXTCFormat = GLGetDXTCNum(Image->DxtcFormat);