[Haskell-cafe] What's wrong with these foreign calls?

Andrey Yankin yankin013 at gmail.com
Thu Jul 12 16:43:47 CEST 2012


If you load this function in ghci, it behaves absolutely the same way.
How can I create OpenGL window in GLFW-b in ghci?

Prelude> initWindow
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package GLFW-b-0.1.0.2 ... linking ... done.
DefaultProfile
Version {versionBranch = [2,7,2], versionTags = []}
Version {versionBranch = [0,1944,1342031663], versionTags = []}
"Trying to open the window"
False


2012/7/12 Andrey Yankin <yankin013 at gmail.com>

> For me it seems like calls to GLFW are normal but when I use indirectly GL
> (through GLFW) I see a mess.
> How could not they be connected properly?
>
> Please, give me any hint...
> I use Ubuntu 12.04 and The Glorious Glasgow Haskell Compilation System,
> version 7.4.1
>
>
> 2012/7/11 Андрей Янкин <yankin013 at gmail.com>
>
>> Hi all!
>>
>> I want to use GLFW-b (
>> http://hackage.haskell.org/packages/archive/GLFW-b/0.1.0.2/doc/html/Graphics-UI-GLFW.html) and I wrote this:
>>   initWindow = do
>>     True <- GLFW.initialize
>>     print =<< GLFW.openGLProfile
>>     print =<< GLFW.getGlfwVersion
>>     print =<< *GLFW.getGlVersion*
>>     print "Trying to open the window"
>>     result <- GLFW.openWindow GLFW.defaultDisplayOptions
>>     print result
>>
>> And got this:
>>   DefaultProfile
>>   Version {versionBranch = [2,7,2], versionTags = []}
>>   Version {versionBranch = [*-1867951663,39789305,39789305*],
>> versionTags = []}
>>   "Trying to open the window"
>>   False
>>
>> Why do I always get random numbers as GLVersion?
>> How can I detect incompatibility preventing me from opening a window?
>>
>> Thanks in advance
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120712/4542cdcc/attachment.htm>


More information about the Haskell-Cafe mailing list