unknown GLU entry gluOrtho2D using opengl in Haskell
This is a definite bug. There is a problem with the linker (and I'm not sure if this is specific to 11.10 or to GHC 7.0+). Here's how it was explained to me: the linker essentially decides that, since you're not linking statically to libglut, it will just optimize by not linking your executable to it at all. You can get around this by applying the following patch to GLURaw 1.1.0.0:
diff -ur GLURaw-1.1.0.0.orig/cbits/HsGLURaw.c GLURaw-1.1.0.0/cbits/HsGLURaw.c
--- GLURaw-1.1.0.0.orig/cbits/HsGLURaw.c 2011-05-12 09:02:30.000000000 +1200
+++ GLURaw-1.1.0.0/cbits/HsGLURaw.c 2011-05-11 23:08:10.000000000 +1200
@@ -68,6 +68,9 @@
#include <stdlib.h>
#include <dlfcn.h>
+#include <stdio.h>
+#include <GL/glu.h>
+
void*
hs_GLU_getProcAddress(const char *name)
@@ -80,6 +83,7 @@
/* Get a handle for our executable. */
handle = dlopen(NULL, RTLD_LAZY);
}
+ printf("%p\n", gluBeginCurve);
return handle ? dlsym(handle, name) : NULL;
}
Only in GLURaw-1.1.0.0: dist
Run cabal install
on GLURaw after applying this patch, and it should get rid of this problem.
How to use GLUT/OpenGL to render to a file?
You almost certainly don't want GLUT, regardless. Your requirements don't fit what it's intended to do (and even when your requirements do fit its intended purpose, you usually don't want it anyway).
You can use OpenGL. To generate output in a file, you basically set up OpenGL to render to a texture, and then read the resulting texture into main memory and save it to a file. At least on some systems (e.g., Windows), I'm pretty sure you'll still have to create a window and associate the rendering context with the window, though it will probably be fine if the window is always hidden.
Related Topics
What Length Can a Network Interface Name Have
Filename Last Modification Date Shell in Script
Difference Between --Cap-Add=Net_Admin and Add Capabilities in .Yml
Switching Users Using Winscp Between Different Accounts
Shell Command to Update Pom File from a Variable
Docker Oci Runtime Create Failed: Container_Linux.Go:349: Starting Container Process Caused
Best Way to Make Linux Web Services
How to Write to Tty from a Kernel Module
How to Append to an Indirect Parameter Expansion of an Array in Bash
How to Get Clearcase Stream Name by a Given View Path
Linux How to Add a File to a Specific Folder Within a Zip File
Why Does This Movq Instruction Work on Linux and Not Osx
How to Print a Number in Arm Assembly
Catching a Direct Redirect to /Dev/Tty
Error Marking Master: Timed Out Waiting for the Condition [Kubernetes]
What's the Purpose of the Ud2 Opcode in the Linux Kernel
How to Determine If Pipe Can Be Written
Nacl Helper Process Running Without a Sandbox Error Using Chrome Through Selenium in Linux