Results 1 to 3 of 3

Thread: How to know if it's GL supported

  1. #1
    Serf
    Join Date
    Sep 2007
    Posts
    2

    Default How to know if it's GL supported

    Hello I'm a newbie using the lib, I started looking at it becouse I wanted a open source object oriented lib, so its very good to find this.

    I want to know if there's some how to know if openGL is supported? couse i think that it 'ill be nice to start it if possible, or start sdl.

    Sorry for my english I'm from argentina.
    Thanks! bye

  2. #2
    Master Sorcerer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    ClanLib doesn't have a way to query whether OpenGL is supported or not. (Technically OpenGL is always available, I'm assuming you want to know if there's proper hardware acceleration)

    The easiest way to figure it out would probably be to boot the GL target, then query the platform specific OpenGL interfaces (WGL, GLX or AGL) for acceleration. If no acceleration is available, destroy the GL target and boot the SDL one instead.

    Unfortunately most cards today do support OpenGL acceleration - they just don't support it equally well. So the better way is to check which OpenGL renderer is being used (via glGetString), then switch to SDL for the ones you know is not up to the task.

  3. #3
    Serf
    Join Date
    Sep 2007
    Posts
    2

    Default

    First, thank's.
    My doubt come up becouse i'm developing in two completely different pcs.
    A celeron 300 and a PIV, and I'm abstracting some routines in a game abstract class.
    So I wanted to what you've said, initialize SDL in cases of an old machine, becouse my X server crashed when I try to use openGL. Of course that could be something of my computer.
    Again thank you, and I'll try what you said.
    And again sorry, if something is not clear in my posts is becouse i'm from Argentina and i write them with a dictionary
    Bye

Bookmarks

Bookmarks

Posting Permissions

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