From c5352b84cc879b63ccf9ca1991b49aab5591ef91 Mon Sep 17 00:00:00 2001
From: Manolo Gouy <Manolo>
Date: Tue, 13 Apr 2010 16:10:08 +0000
Subject: [PATCH] gl_draw.cxx (Mac-specific): for __ppc__ only, back to old
 gl_draw algo without texture.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
 src/gl_draw.cxx | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 8593f40f6..99f7214fa 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -101,7 +101,7 @@ void  gl_font(int fontid, int size) {
     wglUseFontBitmaps(fl_gc, base, count, fl_fontsize->listbase+base);
     SelectObject(fl_gc, oldFid);
 # elif defined(__APPLE_QUARTZ__)
-    /* FIXME: no OpenGL Font Selection in Cocoa!
+#if __ppc__
 //AGL is not supported for use in 64-bit applications:
 //http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/Carbon64BitGuide/OtherAPIChanges/OtherAPIChanges.html
     short font, face, size;
@@ -114,7 +114,7 @@ void  gl_font(int fontid, int size) {
     fl_fontsize->listbase = glGenLists(256);
 	aglUseFont(aglGetCurrentContext(), font, face,
                size, 0, 256, fl_fontsize->listbase);
-     */
+# endif
 # else 
 #   error unsupported platform
 # endif
@@ -123,7 +123,7 @@ void  gl_font(int fontid, int size) {
 
   }
   gl_fontsize = fl_fontsize;
-#ifndef __APPLE_QUARTZ__
+#if !(defined( __APPLE_QUARTZ__) && !__ppc__)
   glListBase(fl_fontsize->listbase);
 #endif
 }
@@ -196,7 +196,7 @@ void gl_remove_displaylist_fonts()
 #endif
 }
 
-#ifdef __APPLE__
+#if defined( __APPLE__) && !__ppc__
 static void gl_draw_cocoa(const char* str, int n);
 #endif
 
@@ -207,7 +207,14 @@ static void gl_draw_cocoa(const char* str, int n);
   */
 void gl_draw(const char* str, int n) {
 #ifdef __APPLE__  
-  gl_draw_cocoa(str, n);  
+  
+#if !__ppc__
+  gl_draw_cocoa(str, n);
+#else
+// Should be converting the text here, as for other platforms???
+  glCallLists(n, GL_UNSIGNED_BYTE, str);
+#endif
+  
 #else
   static xchar *buf = NULL;
   static int l = 0;
@@ -357,7 +364,7 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
   glDrawPixels(w,h,d<4?GL_RGB:GL_RGBA,GL_UNSIGNED_BYTE,(const ulong*)b);
 }
 
-#if defined( __APPLE__) || defined(FL_DOXYGEN)
+#if (defined( __APPLE__) && !__ppc__) || defined(FL_DOXYGEN)
 
 #include <FL/glu.h>
 
-- 
GitLab