Re: eXene and openGL
brian <briand-/[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
Well - diggiing a little more deeply I found 3 or 4 callbacks, in timer and in the audio stuff, but not too bad, and not in the event handling. However one problem that I am having with nlffi, which is really a C problem, is that things like SDL will include _a_ _lot_ of other files, most noticeably stdio.h. ml-ffigen is not robust enough to deal with the C include insanity and will often bail out. My strategy so far, and it's painful, is to run gcc -E and then pick and choose to create a cut-down file to work with. Not only is it painful, but platform-specific (or can be). So if I do this for the Mac, somebody might have to recreate the files for x86. How are you dealing with this ? Brian On Jan 4, 2007, at 8:56 AM, John Reppy wrote: > Right. SDL requires writing the event loop in the application, so > it doesn't use callbacks. > As part of my sml3d project, I've been writing a new mlton/sdl > library, but it is a pain, > since mlton's FFI doesn't handle C structs. SML/NJ should work > fine with this API. > > - John > > On Jan 3, 2007, at 11:53 PM, brian wrote: > >> You know - SDL doesn't seem to require callbacks. I was almost >> sure that it did. >> This makes SDL a really nice way to go. Fast direct graphics >> interface, without callbacks. >> >> I looked at the MLton interface to SDL (again - I already did some >> time ago) but it doesn't seem to be doing much. >> >> hmmmm.... >> >> Shouldn't take much work to see what nlffi thinks of the SDL >> header files :-) >> >> Brian >> >> >> On Jan 3, 2007, at 7:06 AM, John Reppy wrote: >> >>> EXene is now being supported and developed by Ally Stoughton and his >>> students, >>> so they may be able to help you get the examples working. >>> >>> I'm not particularly optimistic about supporting OpenGL in EXene. >>> While it would >>> be possible to implement the GLX wire protocol [Historical note: >>> when >>> I was actively >>> working on eXene in the 90's, the protocol was not documented, but >>> SGI eventually >>> released it] in eXene, there are significant performance >>> disadvantages to using >>> that protocol. For real-time rendering, you want a DRI-style >>> implementation, but >>> I don't know how to support such an approach in eXene. >>> >>> For a while, I've thought that the low-level parts of eXene ought to >>> be rewritten >>> to sit on top of a C shim (XCB is an obvious choice). Doing so >>> should make it easier >>> to connect to more modern X extensions, such as the render extension >>> and GLX. >>> >>> An alternative approach is to build a GUI library on top of GLUT (or >>> SDL). I've been >>> working on this project using mlton, since SML/NJ doesn't have >>> callback support, but >>> I'm hoping that we'll get the necessary hooks in SML/NJ soon. >>> >>> - John >>> >>> On Jan 3, 2007, at 6:40 AM, brian wrote: >>> >>>> So as I slog through X code to make openGL useful it occurs to me >>>> that using eXene with openGL tied in would be a really nice way to >>>> go. eXene3D :-) >>>> >>>> There are a couple of problems: >>>> >>>> 1 I still can't get eXene examples to work. >>>> >>>> 2 Is there a gotcha in terms of the X interface which eXene uses >>>> and >>>> openGL ? eXene uses the socket level interface and I'm not sure >>>> what >>>> that implies for use with openGL. Wthout thinking too hard, I >>>> don't >>>> think it implies anything. I simply invoke glX calls using the >>>> display, window, etc.. I get from the eXene interface. >>>> >>>> Solving 1 is just a matter of time and persistence on my part. >>>> >>>> Understanding 2 is much more important. Since I'll probably >>>> have to >>>> do considerable work for 1, I don't want to get to the end of the >>>> path and find out that there will be some problem connecting eXene/ >>>> openGL. >>>> >>>> At first I thought that the use of threading might be a problem, >>>> but >>>> since they are "user level" threads, doesn't seem like that >>>> should be >>>> an issue. >>>> >>>> Any opinions ? >>>> >>>> >>>> Brian >>>> >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> --- >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>> share your >>>> opinions on IT & business topics through brief surveys - and >>>> earn cash >>>> http://www.techsay.com/default.php? >>>> page=join.php&p=sourceforge&CID=DEVDEV >>>> _______________________________________________ >>>> Smlnj-list mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/smlnj-list >>> >>> >>> -------------------------------------------------------------------- >>> ----- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share your >>> opinions on IT & business topics through brief surveys - and earn >>> cash >>> http://www.techsay.com/default.php? >>> page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Smlnj-list mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/smlnj-list >> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV