Started to play with hopengl.&nbsp; It&#39;s pretty cool :-) Very easy to use, quite cool :-)<br><br>Started to look at perf.&nbsp; What interests me most is to see how fast we can make vertex3f calls.&nbsp; Basically, we&#39;re testing the speed of the haskell/c boundary, where security(?) and marshalling are going to occur.
<br><br>Yes, we can send the vertices to a vertexarray and not have to handle vertex3f calls, but that&#39;s not what I want to measure ;-)&nbsp; <br><br>So, have a really rough and ready application that draws 45000 triangles a frame, then measures the framerate.&nbsp; Thats about 150,000 calls to vertex3f per frame.
<br><br>The application runs in Java, C#, and now Haskell.<br><br>Running in ghci, this runs at about 1.5 fps, really ballpark, havent checked I&#39;m really drawing the number of triangles I think I&#39;m drawing, or settings such as backface-culling or shademodel.&nbsp; That&#39;s not too bad.
<br><br>I&#39;d like to compile to an executable to increase the framerate, but it&#39;s giving me the following output:<br><br>J:\dev\haskell&gt;ghc -fglasgow-exts -O2 -o OglPerf.exe OglPerf.hs<br>OglPerf.o(.text+0x1f4):ghc3668_0.hc: undefined reference to `glutPostRedisplay@0
<br>&#39;<br>OglPerf.o(.text+0x255):ghc3668_0.hc: undefined reference to `glVertex3f@12&#39;<br>OglPerf.o(.text+0x1148):ghc3668_0.hc: undefined reference to `glViewport@16&#39;<br>OglPerf.o(.text+0x1157):ghc3668_0.hc: undefined reference to `glMatrixMode@4&#39;
<br>OglPerf.o(.text+0x115f):ghc3668_0.hc: undefined reference to `glLoadIdentity@0&#39;<br>OglPerf.o(.text+0x11cc):ghc3668_0.hc: undefined reference to `glFrustum@48&#39;<br>OglPerf.o(.text+0x11db):ghc3668_0.hc: undefined reference to `glMatrixMode@4&#39;
<br>OglPerf.o(.text+0x11e3):ghc3668_0.hc: undefined reference to `glLoadIdentity@0&#39;<br>OglPerf.o(.text+0x11fd):ghc3668_0.hc: undefined reference to `glTranslatef@12&#39;<br>OglPerf.o(.text+0x1672):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr
<br>aphicsziRenderingziOpenGLziGLziVertexSpec_Vertex3_con_info&#39;<br>OglPerf.o(.text+0x1764):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziVertexSpec_Vertex3_con_info&#39;<br>
OglPerf.o(.text+0x1856):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziVertexSpec_Vertex3_con_info&#39;<br>OglPerf.o(.text+0x1948):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr
<br>aphicsziRenderingziOpenGLziGLziVertexSpec_Vertex3_con_info&#39;<br>OglPerf.o(.text+0x1b56):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziPrimitiveMode_Quads_closure&#39;<br>
OglPerf.o(.text+0x1de9):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziFramebuffer_marshalClearBuffer_closure&#39;<br>OglPerf.o(.text+0x1e00):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr
<br>aphicsziRenderingziOpenGLziGLziFramebuffer_sum_closure&#39;<br>OglPerf.o(.text+0x1e42):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziFramebuffer_sum_closure&#39;<br>[...]<br>
aphicsziRenderingziOpenGLziGLziStringQueries_Vendor_closure&#39;<br>OglPerf.o(.text+0x340f):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziStringQueries_Renderer_closure&#39;<br>
OglPerf.o(.text+0x3634):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziBasicTypes_Enabled_closure&#39;<br>OglPerf.o(.text+0x3668):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr
<br>aphicsziRenderingziOpenGLziGLziCoordTrans_normalizze_closure&#39;<br>OglPerf.o(.text+0x36c1):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziBasicTypes_Enabled_closure&#39;<br>
OglPerf.o(.text+0x3716):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr<br>aphicsziRenderingziOpenGLziGLziBasicTypes_Enabled_closure&#39;<br>OglPerf.o(.text+0x374a):ghc3668_0.hc: undefined reference to `OpenGLzm2zi2zi1_Gr
<br>aphicsziRenderingziOpenGLziGLziColors_lighting_closure&#39;<br>[...]<br>collect2: ld returned 1 exit status<br><br>What am I missing?<br><br>