Sign in to follow this  
Oogst

OpenGL OpenGL 1.1.0 for some users

Recommended Posts

Oogst    481
For our games Awesomenauts and Swords & Soldiers (made with OpenGL and SDL 1.2.13) there is a small group of PC users who cannot run the game because they have OpenGL 1.1.0 and their videocard is reported as "GDI Generic". In all cases I have seen so far, this was on Windows Vista/7/8 and this was fixed by installing drivers by hand from the Nvidia/AMD/Intel website.

However, quite a few users find it difficult to install drivers, and I would prefer that our games would run immediately for everyone. Also, some laptop manufacturers disallow downloading drivers from the sites of Nvidia/AMD/Intel directly. So I am wondering why this happens exactly, and whether something can be done about it.

Until this week I thought the cause was that Windows Vista/7/8 automatically installs new drivers, but installs incomplete drivers and leaves out OpenGL. That would mean an evil scheme by Microsoft to destroy OpenGL on Windows, by not installing it properly, thus giving problems to all OpenGL games.

However, today I installed GLview and on my computer this tool only reports GDI Generic and does not recognise my ATI card, while our own game Awesomenauts recognises it just fine. This makes me wonder: for those users who get GDI Generic in Awesomenauts, is OpenGL maybe secretly properly installed but not selected by SDL for some reason?

So is there some evil Microsoft plot, or am I just initialising SDL/OpenGL incorrectly?

This is how I initialise OpenGL+SDL:
[code]SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
SDL_VERSION(&windowInfo.version);
SDL_GetWMInfo(&windowInfo);
screen = SDL_SetVideoMode(xRes, yRes, 32, SDL_OPENGL | SDL_FULLSCREEN);[/code]

Also, is it correct that unlike DirectX, it is not possible for a game to install OpenGL, so OpenGL can only be installed with the drivers?

Sidequestion: are any of the big games still OpenGL these days, or is Rage the only AAA OpenGL left? Edited by Oogst

Share this post


Link to post
Share on other sites
I'm not very much acquainted with SDL, but from what you describe, it is possible that you select a bad pixel format, either by providing some ill arguments to SDL or (less likely) a bug in SDL. That would explain why one program works different from another on the same machine.

It is very possible to select a pixel format which will generate non-accelerated OpenGL 1.1 contexts. PFD_SUPPORT_GDI is mutually exclusive with "accelerated OpenGL" and "anything higher than 1.1".

As for the "evil Microsoft plot to end OpenGL", this was surely something that was on the table when Vista was conceived, but the massive uproar that followed quickly put an end to that. Microsoft, like Intel, has gone Rudi Dutschke's way since then.

All in all, if someone doesn't have an IHV driver installed, it's questionable whether you really want them as customers. I'm not talking of the latest bleeding-edge drivers, but, you know, anything at all.
They must either be quite poor (not able to afford a $10 card!?) or quite stupid. In either case, you probably don't want them as customers. The poor won't pay you, and the stupid will cost you more in support than the revenue they bring in. Edited by samoth

Share this post


Link to post
Share on other sites
mhagain    13430
No evil plot. MS don't include OpenGL support with the default drivers which come with Windows, and many OEMs don't either. Most people who are even halfway serious about running games will junk those drivers (they're frequently incredibly out of date and buggy with D3D too) and install proper drivers from the GPU vendor instead. But this has been the way of things for a long long time now.

The D3D driver model is completely different to OpenGL, and it's actually not possible for a game to install either. D3D is split between a runtime (provided by MS and common to all hardware) and a vendor-specific driver, and what games [i]can[/i] install is just the runtime. If the vendor-specific driver needs updating the game cannot install that - the player must. With OpenGL on the other hand, everything is in the vendor-specific driver; so far as the vendor-specific component is concerned, both APIs are equivalent - it's just that the vendor-specific component happens to be absolutely everything with OpenGL.

Regarding major titles, Rage is the only recent one, and that had some colossal problems on release. Those have mostly shaken out by now, but there remains a danger that certain vendor's OpenGL support may be limited to "get what id Software does working", and not be otherwise robust. It's not totally lost however - there's a new Doom 3 release coming out soon which will also need solid GL support, as well as the ever-present Minecraft.

For options going forward, one might be to provide a D3D backend for cases where OpenGL support is not detected. You can use D3D with SDL and it will give you good coverage of those handful of cases. You could even position your GL renderer as the "premium version" to encourage upgrades, and have the D3D renderer as a fairly cut-down/minimalized version (you would need to notify the user of this). The other option is to do as samoth suggested and just not consider those people as part of your target audience.

Share this post


Link to post
Share on other sites
SimonForsman    7642
[quote name='Oogst' timestamp='1344258688' post='4966650']
Also, is it correct that unlike DirectX, it is not possible for a game to install OpenGL, so OpenGL can only be installed with the drivers?

Sidequestion: are any of the big games still OpenGL these days, or is Rage the only AAA OpenGL left?
[/quote]

That goes for part of DX aswell, DirectX is basically 2 parts, the DirectX runtime and the driver, (Microsoft provides the runtime, the IHV provides the driver, allthough Microsoft does provide drivers for most hardware through Windows Update aswell). (IIRC Microsoft does some quality assurance on D3D drivers aswell to ensure basic compatibility)

For OpenGL the IHV provides both the driver and the runtime allthough Microsoft does provide a basic OpenGL 1.1 software driver and runtime to get basic support no matter what.

One likely candidate for the Win7/8 problems could be that the machines are using multiple GPUs, alot of newer laptops have both an integrated Intel GPU and a nvidia GPU, it is not impossible that the integrated GPU lacks OpenGL drivers while the nvidia one has them and that by default your application tries to use the Intel GPU. (installing drivers manually from the IHV rather than from the system builder might override this behaviour) Edited by SimonForsman

Share this post


Link to post
Share on other sites
Oogst    481
I get the idea that doing OpenGL well is just not possible these days. Which sucks, because the game is already live and I definitely don't want to switch to something else when it works for 99% of players already. A DirectX fallback wouldn't be too difficult, though, since I already have a complete DirectX 9 renderer for Xbox360. It just lacks the link with SDL and the window.

However, adding DirectX very much rubs me the wrong way. The problem with OpenGL is that it is not used enough, so switching away from it makes the situation worse for OpenGL... [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img]

[quote name='samoth' timestamp='1344259851' post='4966657']It is very possible to select a pixel format which will generate non-accelerated OpenGL 1.1 contexts. PFD_SUPPORT_GDI is mutually exclusive with "accelerated OpenGL" and "anything higher than 1.1".[/quote]
My initialisation code is just what is in my opening post. So I don't consciously set any weird pixel formats. What would be wrong there that would cause this situation? Also, since it works on 99% of videocards as is, is there a way with SDL to do my current code, see whether it gave proper OpenGL, and if not, try again with different pixel settings?

[quote]All in all, if someone doesn't have an IHV driver installed, it's questionable whether you really want them as customers. I'm not talking of the latest bleeding-edge drivers, but, you know, anything at all.
They must either be quite poor (not able to afford a $10 card!?) or quite stupid. In either case, you probably don't want them as customers. The poor won't pay you, and the stupid will cost you more in support than the revenue they bring in.
[/quote]
I have seen this happen even on good Nvidia cards, so just ignoring them as "not our target audience" is definitely not an option...

[quote name='SimonForsman' timestamp='1344263919' post='4966668']One likely candidate for the Win7/8 problems could be that the machines are using multiple GPUs, alot of newer laptops have both an integrated Intel GPU and a nvidia GPU, it is not impossible that the integrated GPU lacks OpenGL drivers while the nvidia one has them and that by default your application tries to use the Intel GPU. (installing drivers manually from the IHV rather than from the system builder might override this behaviour)[/quote]
I am indeed seeing that computers with multiple videocards sometimes select the wrong one. This is only a few cases, though: most just have one videocard that needs its drivers updated. I am also seeing that the game doesn't work together with Nvidia Surround (their multi-monitor-SLI-thingie). Edited by Oogst

Share this post


Link to post
Share on other sites
mhagain    13430
Try it without framebuffer alpha, maybe? I.e., remove this line:[code]SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);[/code]
It's possible that the users having problems have GPUs that can't support a hardware accelerated pixel format that has framebuffer alpha, or else SDL is screwing up it's pixel format selection with this included.

If that resolves it, and if you really need framebuffer alpha, you could consider creating an FBO, doing your main render to that, then blitting it to the backbuffer before present. There will be some perf cost for sure, but if that's the price of getting it working.....

Share this post


Link to post
Share on other sites
[quote name='Oogst' timestamp='1344274924' post='4966728'][quote name='samoth' timestamp='1344259851' post='4966657']no IHV driver installed[/quote]
I have seen this happen even on good Nvidia cards, so just ignoring them as "not our target audience" is definitely not an option...[/quote]Support costs money.

My father is 70 years old, and until a year ago or so, he was still [url="http://cache.gawkerassets.com/assets/images/gizmodo/2009/09/500px-scottytalkstomac.jpg"]talking to the mouse sometimes[/url]. Nevertheless, even he knows that it's necessary to put the CDROM that came with his new graphics card into the computer to make it work, and even he could figure that there is this driver thing that the little electrons in the grey box need to work properly. He also knows that Google will download it for you, or something the like, if you type "nvidia" into the search box. No kidding, but he has working, up-to-date drivers.

My opinion stands: If someone is unable to even do [i]that much[/i], you do not want this person as a customer, even if they can pay you. It's a support nightmare, and it will cost you more than it's worth.

Share this post


Link to post
Share on other sites
Flimflam    665
[quote name='Oogst' timestamp='1344274924' post='4966728']
However, adding DirectX very much rubs me the wrong way. The problem with OpenGL is that it is not used enough, so switching away from it makes the situation worse for OpenGL...
[/quote]

If you already have a code path to support this, you should probably support it. I doubt any of the users who are currently unable to play due to this bug care about the status quo of OpenGL; they just want to play the game they paid for. You'll burn a lot of consumer good will if you simply tell these people the problem is ultimately unfixable over politics (preferring to keep it 100% OpenGL on PC.)

Share this post


Link to post
Share on other sites
Oogst    481
[quote name='Flimflam' timestamp='1344810318' post='4968865']If you already have a code path to support this, you should probably support it. I doubt any of the users who are currently unable to play due to this bug care about the status quo of OpenGL; they just want to play the game they paid for. You'll burn a lot of consumer good will if you simply tell these people the problem is ultimately unfixable over politics (preferring to keep it 100% OpenGL on PC.)
[/quote]

It's not that bad, actually: in the end I can get it to run on everyone's computer with OpenGL. There are a couple of bugs that I need to fix right now, but in the end I think DirectX would only be a convenience thing and it works without.

You are right, though, that such a principal point should not affect customers. On the other hand, that does mean that big companies like Microsoft get away with everything, every time... Edited by Oogst

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Partner Spotlight

  • Similar Content

    • By pseudomarvin
      I assumed that if a shader is computationally expensive then the execution is just slower. But running the following GLSL FS instead just crashes
      void main() { float x = 0; float y = 0; int sum = 0; for (float x = 0; x < 10; x += 0.00005) { for (float y = 0; y < 10; y += 0.00005) { sum++; } } fragColor = vec4(1, 1, 1 , 1.0); } with unhandled exception in nvoglv32.dll. Are there any hard limits on the number of steps/time that a shader can take before it is shut down? I was thinking about implementing some time intensive computation in shaders where it would take on the order of seconds to compute a frame, is that possible? Thanks.
    • By Arulbabu Donbosco
      There are studios selling applications which is just copying any 3Dgraphic content and regenerating into another new window. especially for CAVE Virtual reality experience. so that the user opens REvite or CAD or any other 3D applications and opens a model. then when the user selects the rendered window the VR application copies the 3D model information from the OpenGL window. 
      I got the clue that the VR application replaces the windows opengl32.dll file. how this is possible ... how can we copy the 3d content from the current OpenGL window.
      anyone, please help me .. how to go further... to create an application like VR CAVE. 
       
      Thanks
    • By cebugdev
      hi all,

      i am trying to build an OpenGL 2D GUI system, (yeah yeah, i know i should not be re inventing the wheel, but this is for educational and some other purpose only),
      i have built GUI system before using 2D systems such as that of HTML/JS canvas, but in 2D system, i can directly match a mouse coordinates to the actual graphic coordinates with additional computation for screen size/ratio/scale ofcourse.
      now i want to port it to OpenGL, i know that to render a 2D object in OpenGL we specify coordiantes in Clip space or use the orthographic projection, now heres what i need help about.
      1. what is the right way of rendering the GUI? is it thru drawing in clip space or switching to ortho projection?
      2. from screen coordinates (top left is 0,0 nd bottom right is width height), how can i map the mouse coordinates to OpenGL 2D so that mouse events such as button click works? In consideration ofcourse to the current screen/size dimension.
      3. when let say if the screen size/dimension is different, how to handle this? in my previous javascript 2D engine using canvas, i just have my working coordinates and then just perform the bitblk or copying my working canvas to screen canvas and scale the mouse coordinates from there, in OpenGL how to work on a multiple screen sizes (more like an OpenGL ES question).
      lastly, if you guys know any books, resources, links or tutorials that handle or discuss this, i found one with marekknows opengl game engine website but its not free,
      Just let me know. Did not have any luck finding resource in google for writing our own OpenGL GUI framework.
      IF there are no any available online, just let me know, what things do i need to look into for OpenGL and i will study them one by one to make it work.
      thank you, and looking forward to positive replies.
    • By fllwr0491
      I have a few beginner questions about tesselation that I really have no clue.
      The opengl wiki doesn't seem to talk anything about the details.
       
      What is the relationship between TCS layout out and TES layout in?
      How does the tesselator know how control points are organized?
          e.g. If TES input requests triangles, but TCS can output N vertices.
             What happens in this case?
      In this article,
      http://www.informit.com/articles/article.aspx?p=2120983
      the isoline example TCS out=4, but TES in=isoline.
      And gl_TessCoord is only a single one.
      So which ones are the control points?
      How are tesselator building primitives?
    • By Orella
      I've been developing a 2D Engine using SFML + ImGui.
      Here you can see an image
      The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects and then is converted to ImGui::Image to render it in the editor.
      Now I need to create a 3D Engine during this year in my Bachelor Degree but using SDL2 + ImGui and I want to recreate what I did with the 2D Engine. 
      I've managed to render the editor like I did in the 2D Engine using this example that comes with ImGui. 
      3D Editor preview
      But I don't know how to create an equivalent of sf::RenderTexture in SDL2, so I can draw the 3D scene there and convert it to ImGui::Image to show it in the editor.
      If you can provide code will be better. And if you want me to provide any specific code tell me.
      Thanks!
  • Popular Now