Posts

Showing posts with the label ogre

How to fix the Unbound module Graphics in an ocaml project

Image
From ~/pr/gitl/ocaml-gol In a constant effort to learn new programming languages, I'm currently trying to use ocaml , a free and open-source general-purpose, multi-paradigm programming language maintained at the Inria . It's basically an extension of Caml with object-oriented features. I'm mostly interested by its functionnal and pattern matching features but the module part of the language can be a bit difficult to understand for someone with little to none ML (Meta Language) background.   The error When trying to use the graphics module to create a graphical window and go just a little further than the simplest helloworld program, here is the result : If the project uses dune : (executable (name ocaml_project) (libraries lwt.unix graphics) ) with this code : let () = Printf.printf "Hello, world!\n";; Lwt_io.printf "Hello, world!\n";; Graphics.open_graph " 800x600";; The first times I built this project running the du...

How to make a modal dialog using Ogre/CEGUI

Image
RainbruRPG is an open-source MMORPG project I'm working on since someday in early 2010's. I already posted multiple posts on this project (for example here and here ). While its development is actually in pause for a while now, it is a great project to learn using new 3D/UI oriented libraries. CEGUI (short for Crazy Eddie's GUI System ) is one of these libraries. It is a free MIT-licensed windowing and widgets library that run on top of Ogre3D but it can also run on other backends. The RainbruRPG's not yet implemented modal dialog The modal need While CEGUI is a great library to create windows and complex screen, I need a standard dialog for NYI (Not Yet Implemented) features. For this, I'll try to create a modal dialog, i.e. a dialog with a blocking exec() function and a return value. It can have multiple buttons, each possibly with a different value but the blocking execution is needed : ModalDialog md; if (md.exec()) { // handle positive eve...