Search Unity

forcing opengl on windows

Discussion in 'Editor & General Support' started by phantom, Oct 29, 2007.

  1. phantom

    phantom

    Joined:
    Jul 19, 2007
    Posts:
    19
    Hello,

    Is it possible to force standalone player run in opengl mode on windows? if it is, how?
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes. Give it a command line argument "-force-opengl". Like this:
    Code (csharp):
    1. MyGame.exe -force-opengl
     
  3. besuser

    besuser

    Joined:
    Oct 9, 2007
    Posts:
    292
    Just out of curiosity, where can I find documentation on the different argument options?

    Thanks!
     
  4. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    That's the only recognized command line argument for Windows games... so the documentation is right here now :)
     
  5. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    What about "more comfortable" way to do it? For simple user (gamer) this flag is not so good variant. :?:
     
  6. LDiederich

    LDiederich

    Joined:
    Jan 5, 2009
    Posts:
    15
    Hi,

    in most cases you have a installer for your game or application. Create two shortcuts with this installer, one with directx and one with this opengl extension.

    I think thats not the problem.

    Lars
     
  7. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,359
    Hmm. It's can be a variant... Thank you for direction.
     
  8. Pedro

    Pedro

    Joined:
    Jan 21, 2008
    Posts:
    19
    Aras, any idea how to force OpenGL in Windows version of Unity WebPlayer? Is there some special parameter for the Unity object/embed HTML tag?
     
  9. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Right now that's not possible.

    Why would you want that?
     
  10. Pedro

    Pedro

    Joined:
    Jan 21, 2008
    Posts:
    19
    I've got rendering artifacts when using Diffuse shader which are only visible on Windows, and not on Mac. I believe this is happening because Unity uses different 3D APIs on different platforms, i.e. Direct3D on Win and OpenGL on Mac.

    They appear when I have polygons intersecting with each other or extremely close to each other. The close areas/pixels become very light colored, as if the brightness of those pixels has doubled.

    These artifacts don't appear when I use VertexLit shader, that's why I had to drop shadows and all the nice pixel lighting stuff 'cause I can't use anything but VertexLit anymore due to these artifacts.

    So my idea was to use OpenGL rendering in Windows version of WebPlayer, thus I could keep using Diffuse shader with sweet pixel lights/shadows/etc while getting rid of these artifacts.

    What a surprise to discover that you allow using OpenGL in standalone Windows apps only, but not in WebPlayer. Why such an inconsistency?

    I could post a couple of screenshots here, if you wanna take a look at these artifacts. Should I?
     
  11. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    It's a known issue. I'm getting burned by it too, really hope it gets fixed in 2.5
     
  12. Pedro

    Pedro

    Joined:
    Jan 21, 2008
    Posts:
    19
    Could you please give me any hint where it was discussed before? I'm really interested, thought I was first to discover this.

    Is there a bug report existing for this bug?

    Or is there any thread on this forum where Unity employees officially admitted it is a bug to be fixed in 2.5 or later?
     
  13. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes, this happens much more often on Direct3D that on OpenGL. IIRC, Intel GMA 950 cards have it in OpenGL as well.

    Increasing your camera's near plane as far as possible should help that. At least make the artifacts smaller.

    Because OpenGL drivers on Windows are horrible in general (and I mean horrible). I figure they produce 10x more random crashes in the drivers than D3D.

    Not needed. It's a known issue (and quite complex to fix). I don't think this will be fixed for 2.5, though. Later.
     
  14. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    561
    OpengGL support for the Windows webplayer would enable GMA950 users to see the wonderfull shadows of Unity.
     
  15. anicschacko

    anicschacko

    Joined:
    Mar 30, 2019
    Posts:
    1