Results 1 to 7 of 7

Thread: Which OpenGL version to use

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Which OpenGL version to use

    I know this kind of question may come up often but for some reason I just can't seem to find the right answer. I am working on an independent project using OpenGL with the objective that the game does not require the most recent or expensive graphics cards to run on. Currently I am developing for OpenGL 2.1. The game is expected to be finished in less than a year. Due to the abstraction layer I have between the 3D engine and the underlying gl functionality, an upgrade to OpenGL 3.0 or above is possible. Would this greatly reduce the number of people who could potentially run the game ? I have no idea of how many people actually own OpenGL 3.0 or above capable hardware.

    Thanks
    mikage

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,676

    Re: Which OpenGL version to use

    Thanks to the extension mechanism, and particular core extensions, OpenGL is not bound by simple versioning. For example, framebuffer objects are core in GL 3.0, but ARB_framebuffer object is a widely supported extension (indeed, if you're using EXT_FBO, stop. No, seriously, stop; your implementation supports ARB_FBO).

    Now obviously, hardware-based extensions will not be supported on non-3.x capable hardware. But non-hardware extensions like VAOs, FBOs, and so on are supported on non-3.x capable hardware. Feel free to use them. The OpenGL extension viewer application comes with a handy database (reasonably up-to-date) of what drivers supports what extensions.

    As to the number of people owning 3.x hardware, 3.x hardware is anything capable of DX10 (Vista/Win7 not required). Valve's survey is a good start at estimating the install base for this.

    At the current numbers, you'd be cutting off about 25% of the market by requiring 3.0. Of course, you don't have to require 3.0; you can use parts of it optionally.

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Re: Which OpenGL version to use

    Thanks for your precise answer. I had to learn OpenGL on the fly for this project so I sometimes feel overwhelmed by the numerous sources of information on the subject that don't always clearly address these concerns. Up to now I haven't really looked at the extension mechanism.
    As a side note, it's amazing the number of beginner tutorials I've found that still use the old way of doing things like glBegin/glEnd, vertex arrays or fixed functions. When you're new to all this it you can waste a lot of time learning obsolete stuff.

    Thanks.
    mikage

  4. #4
    Member Contributor
    Join Date
    Feb 2009
    Posts
    73

    Re: Which OpenGL version to use

    Quote Originally Posted by mikage
    As a side note, it's amazing the number of beginner tutorials I've found that still use the old way of doing things like glBegin/glEnd, vertex arrays or fixed functions. When you're new to all this it you can waste a lot of time learning obsolete stuff.
    I think you will be hard pressed to find a book that doesn't use immediate mode (glBegin/End), much less something online. Just out of curiousity, what is the new "non-obsolete" method -- all display lists?

    [bit later] VBO's....grrr....and there really is NO halfway decent material around in C

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Which OpenGL version to use

    Beware of biases in the valve survey, as it only show stats for quite hardcore gamers, not everybody's laptop using a crappy Intel GMA "decelerator"...

    with the objective that the game does not require the most recent or expensive graphics cards to run on
    Best you can do is develop on an actual laptop having a Intel GMA 950 or something. You will have much less surprises afterwards when running the game on good nv/ati cards. Doing the opposite will make this objective much harder to fulfill.

  6. #6
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Re: Which OpenGL version to use

    Quote Originally Posted by ZbuffeR
    Best you can do is develop on an actual laptop having a Intel GMA 950 or something. You will have much less surprises afterwards when running the game on good nv/ati cards. Doing the opposite will make this objective much harder to fulfill.
    Totally agree on that. My current hardware is far from hardcore gamer equipment.

    Quote Originally Posted by akashiraffee
    VBO's....grrr....and there really is NO halfway decent material around in C
    I'm coding in java for this project and there's even less material for that. The opengl bindings for java aren't very well documented.

  7. #7
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,660

    Re: Which OpenGL version to use

    Quote Originally Posted by akashiraffee
    Just out of curiousity, what is the new "non-obsolete" method -- all display lists?
    Well, they're all still around, so which one you choose is largely up to you and your constraints. Here's the list:
    1. Display Lists
    2. Vertex Buffer Objects (i.e. server vertex arrays; aka VBOs)
    3. Client Vertex Arrays
    4. Immediate Mode

    I've ordered these in approximate order of performance (fastest-to-slowest), at least on NVidia drivers -- though you can find cases where this order changes. For instance, for smaller batches at least, VBOs lose to client arrays.

    When you start learning, I'd suggest you feel free to use immediate mode, because it's simple. Just keep in mind while you're doing it that you're populating client vertex arrays behind-the-scenes. For each glVertex/glColor/glNormal, think vertex[ slot++ ] = mydata; (or color, or normal, etc.)

    When you nail that and want more perf, pop up to client vertex arrays (which is very similar), then VBOs (server vertex arrays) -- they're both largely the same thing. Only difference is who owns the memory for your vertex attribute arrays, your CPU or the GPU/driver. If you need even more perf, try display lists (and/or get more exotic with your VBOs). Just be aware that it takes some time for the driver to compile display lists for you, so you might want to compile these at startup.

    If "forward looking" is your main goal, go with VBOs. Display lists are deprecated in the latest GL, as is immediate mode. Though vendors such as NVidia has said they're not going away. However, shoot for what's going to be supported on the GPUs you're targeting.

Similar Threads

  1. GLSL version doesn't match OpenGL version
    By Susano2018 in forum OpenGL: Drivers
    Replies: 0
    Last Post: 11-13-2018, 06:35 PM
  2. Converting from OpenGL version 2.1 to version 3.0 and above
    By peterkl in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-02-2015, 01:35 PM
  3. OpenGL version
    By _arts_ in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 11-02-2010, 05:08 AM
  4. Replies: 2
    Last Post: 12-03-2005, 01:23 PM
  5. OpenGL new version
    By NewROmancer in forum OpenGL: Advanced Coding
    Replies: 24
    Last Post: 09-18-2000, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean