freebsd-ports/graphics/ffff/files/patch-extensions.cpp
Emanuel Haupt 6cdf88141e Add ffff, a fast mandelbrot fractal generator with features such as:
* OpenGL
   * realtime zoom
   * SSE/AltiVec QuadPixel
   * SSE2/3DNow! DualPixel calc
   * FPU per pixel calc
   * GPU asm (Fragment/Vertex) calc
   * multiprocessor support
   * benchmarking
   * optimized assembler code!

This port uses the standard mandelbrot fractal at near-Xaos speed. Yet every
pixel is computed. There is also an interesting parameter ray algoritymn using
your 3D card. A 3D card is strongly recommended for screen speed and additional
coprocessing power.

WWW: http://sourceforge.net/projects/ffff/

PR:		103441
Submitted by:	rossiya@gmail.com
2006-10-04 10:54:05 +00:00

56 lines
3.8 KiB
C++

--- ./extensions.cpp.orig Wed Oct 4 11:21:15 2006
+++ ./extensions.cpp Wed Oct 4 11:21:58 2006
@@ -1,5 +1,18 @@
#include <stdlib.h>
#include <string.h>
+#include <GL/gl.h>
+#include <GL/glext.h>
+#include <GL/glx.h>
+#include <GL/glxext.h>
+#include <GL/glut.h>
+
+//typedef void (*__GLXextFuncPtr)(void);
+//extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
+extern __GLXextFuncPtr glXGetProcAddressARB (GLubyte *);
+//extern void ((*(glXGetProcAddressARB))(const GLubyte *procName))( void );
+//extern void (*glXGetProcAddressARB( GLubyte *))( void );
+
+__GLXextFuncPtr glXGetProcAddressARB(unsigned char*){}
#ifdef __APPLE__
#include <mach-o/dyld.h>
@@ -96,18 +109,26 @@
{
#if defined(__APPLE__) || defined(__linux__)
// GL_ARB_multitexture
- pfglActiveTextureARB = (glActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glActiveTextureARB");
- pfglClientActiveTextureARB = (glClientActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glClientActiveTextureARB");
+// pfglActiveTextureARB = (glActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glActiveTextureARB");
+ pfglActiveTextureARB = (glActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glActiveTextureARB");
+// pfglClientActiveTextureARB = (glClientActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glClientActiveTextureARB");
+ pfglClientActiveTextureARB = (glClientActiveTextureARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glClientActiveTextureARB");
if (!pfglActiveTextureARB) return false;
if (!pfglClientActiveTextureARB) return false;
// GL_ARB_fragment_program
- pfglGenProgramsARB = (glGenProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glGenProgramsARB");
- pfglDeleteProgramsARB = (glDeleteProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glDeleteProgramsARB");
- pfglBindProgramARB = (glBindProgramARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glBindProgramARB");
- pfglProgramStringARB = (glProgramStringARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glProgramStringARB");
- pfglProgramEnvParameter4fARB = (glProgramEnvParameter4fARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glProgramEnvParameter4fARB");
- pfglGetProgramivARB = (glGetProgramivARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glGetProgramivARB");
+// pfglGenProgramsARB = (glGenProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glGenProgramsARB");
+ pfglGenProgramsARB = (glGenProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glGenProgramsARB");
+// pfglDeleteProgramsARB = (glDeleteProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glDeleteProgramsARB");
+ pfglDeleteProgramsARB = (glDeleteProgramsARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glDeleteProgramsARB");
+// pfglBindProgramARB = (glBindProgramARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glBindProgramARB");
+ pfglBindProgramARB = (glBindProgramARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glBindProgramARB");
+// pfglProgramStringARB = (glProgramStringARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glProgramStringARB");
+ pfglProgramStringARB = (glProgramStringARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glProgramStringARB");
+// pfglProgramEnvParameter4fARB = (glProgramEnvParameter4fARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glProgramEnvParameter4fARB");
+ pfglProgramEnvParameter4fARB = (glProgramEnvParameter4fARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glProgramEnvParameter4fARB");
+// pfglGetProgramivARB = (glGetProgramivARBProcPtr) GLGETPROCADDRESS((GLCHAR const*)"glGetProgramivARB");
+ pfglGetProgramivARB = (glGetProgramivARBProcPtr) GLGETPROCADDRESS((GLCHAR *)"glGetProgramivARB");
if (!pfglGenProgramsARB) return false;
if (!pfglDeleteProgramsARB) return false;
if (!pfglBindProgramARB) return false;