summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Staplin <gstaplin@apple.com>2009-01-26 03:02:38 -0700
committerGeorge Staplin <gstaplin@apple.com>2009-01-26 03:02:38 -0700
commit143224405ba74929c702a95de52b56df140b0d1b (patch)
tree8dbf86f284368f118cca7d6f0a7490d7db826578
parentb57cb05c69acbedb00a97234099ea104309aa2cb (diff)
XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.
-rw-r--r--hw/xquartz/GL/indirect.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 9ddc0e7f1..01cf0c6a2 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -37,6 +37,13 @@
37 37
38#include "dri.h" 38#include "dri.h"
39 39
40#include <AvailabilityMacros.h>
41
42/*
43 * These define seem questionable to me, but I'm not sure why they were here
44 * in the first place.
45 */
46#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
40#define GL_EXT_histogram 1 47#define GL_EXT_histogram 1
41#define GL_EXT_polygon_offset 1 48#define GL_EXT_polygon_offset 1
42#define GL_SGIS_pixel_texture 1 49#define GL_SGIS_pixel_texture 1
@@ -53,6 +60,7 @@
53#define GL_APPLE_fence 1 60#define GL_APPLE_fence 1
54#define GL_IBM_multimode_draw_arrays 1 61#define GL_IBM_multimode_draw_arrays 1
55#define GL_EXT_fragment_shader 1 62#define GL_EXT_fragment_shader 1
63#endif
56 64
57#include <OpenGL/OpenGL.h> 65#include <OpenGL/OpenGL.h>
58#include <OpenGL/CGLContext.h> 66#include <OpenGL/CGLContext.h>
@@ -904,12 +912,16 @@ static void setup_dispatch_table(void) {
904 SET_ColorTable(disp, glColorTable); 912 SET_ColorTable(disp, glColorTable);
905 SET_ColorTableParameterfv(disp, glColorTableParameterfv); 913 SET_ColorTableParameterfv(disp, glColorTableParameterfv);
906 SET_ColorTableParameteriv(disp, glColorTableParameteriv); 914 SET_ColorTableParameteriv(disp, glColorTableParameteriv);
915
916
917#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
907 SET_CombinerInputNV(disp, glCombinerInputNV); 918 SET_CombinerInputNV(disp, glCombinerInputNV);
908 SET_CombinerOutputNV(disp, glCombinerOutputNV); 919 SET_CombinerOutputNV(disp, glCombinerOutputNV);
909 SET_CombinerParameterfNV(disp, glCombinerParameterfNV); 920 SET_CombinerParameterfNV(disp, glCombinerParameterfNV);
910 SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV); 921 SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV);
911 SET_CombinerParameteriNV(disp, glCombinerParameteriNV); 922 SET_CombinerParameteriNV(disp, glCombinerParameteriNV);
912 SET_CombinerParameterivNV(disp, glCombinerParameterivNV); 923 SET_CombinerParameterivNV(disp, glCombinerParameterivNV);
924#endif
913 SET_CompileShaderARB(disp, glCompileShaderARB); 925 SET_CompileShaderARB(disp, glCompileShaderARB);
914 SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB); 926 SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB);
915 SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB); 927 SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB);
@@ -987,7 +999,10 @@ static void setup_dispatch_table(void) {
987 SET_EvalPoint2(disp, glEvalPoint2); 999 SET_EvalPoint2(disp, glEvalPoint2);
988//SET_ExecuteProgramNV(disp, glExecuteProgramNV); 1000//SET_ExecuteProgramNV(disp, glExecuteProgramNV);
989 SET_FeedbackBuffer(disp, glFeedbackBuffer); 1001 SET_FeedbackBuffer(disp, glFeedbackBuffer);
1002
1003#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
990 SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV); 1004 SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV);
1005#endif
991 SET_Finish(disp, glFinish); 1006 SET_Finish(disp, glFinish);
992 SET_FinishFenceNV(disp, glFinishFenceAPPLE); // <-- APPLE -> NV 1007 SET_FinishFenceNV(disp, glFinishFenceAPPLE); // <-- APPLE -> NV
993 SET_Flush(disp, glFlush); 1008 SET_Flush(disp, glFlush);
@@ -1029,10 +1044,12 @@ static void setup_dispatch_table(void) {
1029 SET_GetColorTable(disp, glGetColorTable); 1044 SET_GetColorTable(disp, glGetColorTable);
1030 SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv); 1045 SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv);
1031 SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv); 1046 SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv);
1047#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
1032 SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV); 1048 SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV);
1033 SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV); 1049 SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV);
1034 SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV); 1050 SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV);
1035 SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV); 1051 SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV);
1052#endif
1036 SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB); 1053 SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB);
1037 SET_GetConvolutionFilter(disp, glGetConvolutionFilter); 1054 SET_GetConvolutionFilter(disp, glGetConvolutionFilter);
1038 SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv); 1055 SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv);
@@ -1040,8 +1057,10 @@ static void setup_dispatch_table(void) {
1040 SET_GetDoublev(disp, glGetDoublev); 1057 SET_GetDoublev(disp, glGetDoublev);
1041 SET_GetError(disp, glGetError); 1058 SET_GetError(disp, glGetError);
1042//SET_GetFenceivNV(disp, glGetFenceivNV); 1059//SET_GetFenceivNV(disp, glGetFenceivNV);
1060#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
1043 SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV); 1061 SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV);
1044 SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV); 1062 SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV);
1063#endif
1045 SET_GetFloatv(disp, glGetFloatv); 1064 SET_GetFloatv(disp, glGetFloatv);
1046 SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT); 1065 SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT);
1047 SET_GetHandleARB(disp, glGetHandleARB); 1066 SET_GetHandleARB(disp, glGetHandleARB);