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  

  • Similar Content

    • By markshaw001
      Hi i am new to this forum  i wanted to ask for help from all of you i want to generate real time terrain using a 32 bit heightmap i am good at c++ and have started learning Opengl as i am very interested in making landscapes in opengl i have looked around the internet for help about this topic but i am not getting the hang of the concepts and what they are doing can some here suggests me some good resources for making terrain engine please for example like tutorials,books etc so that i can understand the whole concept of terrain generation.
       
    • By KarimIO
      Hey guys. I'm trying to get my application to work on my Nvidia GTX 970 desktop. It currently works on my Intel HD 3000 laptop, but on the desktop, every bind textures specifically from framebuffers, I get half a second of lag. This is done 4 times as I have three RGBA textures and one depth 32F buffer. I tried to use debugging software for the first time - RenderDoc only shows SwapBuffers() and no OGL calls, while Nvidia Nsight crashes upon execution, so neither are helpful. Without binding it runs regularly. This does not happen with non-framebuffer binds.
      GLFramebuffer::GLFramebuffer(FramebufferCreateInfo createInfo) { glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); textures = new GLuint[createInfo.numColorTargets]; glGenTextures(createInfo.numColorTargets, textures); GLenum *DrawBuffers = new GLenum[createInfo.numColorTargets]; for (uint32_t i = 0; i < createInfo.numColorTargets; i++) { glBindTexture(GL_TEXTURE_2D, textures[i]); GLint internalFormat; GLenum format; TranslateFormats(createInfo.colorFormats[i], format, internalFormat); // returns GL_RGBA and GL_RGBA glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, createInfo.width, createInfo.height, 0, format, GL_FLOAT, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); DrawBuffers[i] = GL_COLOR_ATTACHMENT0 + i; glBindTexture(GL_TEXTURE_2D, 0); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, textures[i], 0); } if (createInfo.depthFormat != FORMAT_DEPTH_NONE) { GLenum depthFormat; switch (createInfo.depthFormat) { case FORMAT_DEPTH_16: depthFormat = GL_DEPTH_COMPONENT16; break; case FORMAT_DEPTH_24: depthFormat = GL_DEPTH_COMPONENT24; break; case FORMAT_DEPTH_32: depthFormat = GL_DEPTH_COMPONENT32; break; case FORMAT_DEPTH_24_STENCIL_8: depthFormat = GL_DEPTH24_STENCIL8; break; case FORMAT_DEPTH_32_STENCIL_8: depthFormat = GL_DEPTH32F_STENCIL8; break; } glGenTextures(1, &depthrenderbuffer); glBindTexture(GL_TEXTURE_2D, depthrenderbuffer); glTexImage2D(GL_TEXTURE_2D, 0, depthFormat, createInfo.width, createInfo.height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glBindTexture(GL_TEXTURE_2D, 0); glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, depthrenderbuffer, 0); } if (createInfo.numColorTargets > 0) glDrawBuffers(createInfo.numColorTargets, DrawBuffers); else glDrawBuffer(GL_NONE); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) std::cout << "Framebuffer Incomplete\n"; glBindFramebuffer(GL_FRAMEBUFFER, 0); width = createInfo.width; height = createInfo.height; } // ... // FBO Creation FramebufferCreateInfo gbufferCI; gbufferCI.colorFormats = gbufferCFs.data(); gbufferCI.depthFormat = FORMAT_DEPTH_32; gbufferCI.numColorTargets = gbufferCFs.size(); gbufferCI.width = engine.settings.resolutionX; gbufferCI.height = engine.settings.resolutionY; gbufferCI.renderPass = nullptr; gbuffer = graphicsWrapper->CreateFramebuffer(gbufferCI); // Bind glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); // Draw here... // Bind to textures glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, textures[0]); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, textures[1]); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, textures[2]); glActiveTexture(GL_TEXTURE3); glBindTexture(GL_TEXTURE_2D, depthrenderbuffer); Here is an extract of my code. I can't think of anything else to include. I've really been butting my head into a wall trying to think of a reason but I can think of none and all my research yields nothing. Thanks in advance!
    • By Adrianensis
      Hi everyone, I've shared my 2D Game Engine source code. It's the result of 4 years working on it (and I still continue improving features ) and I want to share with the community. You can see some videos on youtube and some demo gifs on my twitter account.
      This Engine has been developed as End-of-Degree Project and it is coded in Javascript, WebGL and GLSL. The engine is written from scratch.
      This is not a professional engine but it's for learning purposes, so anyone can review the code an learn basis about graphics, physics or game engine architecture. Source code on this GitHub repository.
      I'm available for a good conversation about Game Engine / Graphics Programming
    • By C0dR
      I would like to introduce the first version of my physically based camera rendering library, written in C++, called PhysiCam.
      Physicam is an open source OpenGL C++ library, which provides physically based camera rendering and parameters. It is based on OpenGL and designed to be used as either static library or dynamic library and can be integrated in existing applications.
       
      The following features are implemented:
      Physically based sensor and focal length calculation Autoexposure Manual exposure Lense distortion Bloom (influenced by ISO, Shutter Speed, Sensor type etc.) Bokeh (influenced by Aperture, Sensor type and focal length) Tonemapping  
      You can find the repository at https://github.com/0x2A/physicam
       
      I would be happy about feedback, suggestions or contributions.

    • By altay
      Hi folks,
      Imagine we have 8 different light sources in our scene and want dynamic shadow map for each of them. The question is how do we generate shadow maps? Do we render the scene for each to get the depth data? If so, how about performance? Do we deal with the performance issues just by applying general methods (e.g. frustum culling)?
      Thanks,
       
  • Popular Now