Results 1 to 2 of 2

Thread: ClanLib on DevC++/mingw, among other problems

  1. #1
    Join Date
    Nov 2008

    Default ClanLib on DevC++/mingw, among other problems


    Me and a friend are planning to start programming a sprite-based RPG in C++, though we haven't yet decided on the library base yet. He wants direct OpenGL (for effects and such I guess) and some form of audio library, but I've started some preliminary demo-y work in ClanLib 0.8, like the library and want to convince him to use it, because of the easy sound API and other things (No point reinventing the wheel...)

    However, when I sent him my work, he was unable to compile it (and I was unable to set up a Linux->Windows cross-compiling envronment) because he uses DevC++/mingw and the only binaries available for ClanLib are for Visual C++. There doesn't appear to be any straightforward help for this except an ancient ClanLib 0.7 tutorial that used to be linked from the front page (and is now only available through wayback).

    Can anybody give advice as how to set up ClanLib in mingw on Windows (and Linux, if possible) with minimal fuss?

    Also, as an aside: While trying to write the demo code, I found that the only way I could create a surface of a certain size to use a canvas with was to load an image file of that size. Is there any way to create something similar to a SDL surface, with given dimensions, that can then be drawn on and then drawn onto the screen graphical context?

    Thanks in advance, Matt

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002



    Couple things to note, one is, the SDL support of Clanlib 0.8X is dead now I think. We should probably remove it to avoid confusion..

    Secondly, Clanlib is based on Open GL so your programmer doesn't have to choose either/or, he can use both together if he wishes.

    About initializing surfaces of custom sizes - sure you can do that.

    First, initialize a CL_PixelBuffer the size/format you want, then you can init a CL_Surface and pass that in. (This is where it is uploaded to the video card and converted into a real video surface behind the scenes)

    Or be cool and do them together:

    CL_Surface *pSurface = new CL_Surface(CL_PixelBuffer(x, y,x*4,  CL_PixelFormat::abgr8888));
    Sorry, no idea on the mingw question. I use MSVC on Win, XCode on the mac, and automake stuff on linux.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Replies: 7
    Last Post: 08-26-2008, 09:57 PM
  2. Complie problems - ClanLib-0.9.0\Sources\MikMod
    By in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 02-25-2008, 08:02 AM
  3. problems with clanlib template from kdevelop
    By harry666t in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 02-19-2008, 11:31 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts