Couldn't set OpenGL mode:

hi, recently i get "Couldn't set OpenGL mode:" with no further text, so i don't even know what it was trying to do. things do actually draw, so i'm not sure why the error comes out or what problems it is causing / might cause. i'm on mac os x 10.…

Viewing 1 to 18 (18 Total)
Couldn't set OpenGL mode:

raould

raould
Total Posts: 224
Joined: December 03, 2011

hi,

recently i get "Couldn't set OpenGL mode:" with no further text, so i don't even know what it was trying to do.

things do actually draw, so i'm not sure why the error comes out or what problems it is causing / might cause.

i'm on mac os x 10.7.3 and i get this for mac desktop cpp target.

Tags:
Posted on July 11, 2012 at 3:18 PM

Huge

Huge
Total Posts: 548
Joined: October 07, 2011

Re: Couldn't set OpenGL mode:

Hi,
I wonder if you have some funky width/height specified for a fullscreen window in your nmml file?

Hugh

Posted on July 12, 2012 at 1:01 AM

crayfellow

crayfellow
Total Posts: 204
Joined: November 28, 2011

Re: Couldn't set OpenGL mode:

Yes, that will happen when you have a window tag in your NMML with width and height set to 0 (fullscreen).

You can specify a size for the cpp desktop target by adding a window tag after the one with 0/0 by adding if="cpp". This way you could potentially have one for 'if="flash"', one for 'unless="flash"' that sets a 0/0 fullscreen baseline for mobile, and another if necessary for 'if="cpp"'.

Posted on July 12, 2012 at 11:41 AM

raould

raould
Total Posts: 224
Joined: December 03, 2011

Re: Couldn't set OpenGL mode:

so is this a bug then? isn't 0 x 0 supposed to be ok?

Posted on July 12, 2012 at 2:51 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Couldn't set OpenGL mode:

Apple appears to have deprecated some methods in OS X 10.7 that SDL used for fullscreen. It is possible that this is part of why the error displays in the terminal.

The application still renders properly. I would ignore this message for now. For the next version of NME, I will be looking at whether we can use SDL 2.0, or if we should consider another approach. To fully support Windows 8, we will need to change our windowing. There are also some features in SDL 2.0 that would be really great to have.

If it is not a lot of work, I think it would be nice to merge our efforts for supporting Windows 8 Metro with SDL, so it can support it officially, rather than maintaining our own windowing. Either way, this is something I would like to table until after NME 3.4 is released.

As a user, I don't see any problems in how the Mac target is behaving right now, apart from not supporting <window fullscreen="true" />, which is impossible without moving to a new version of SDL.

Posted on July 12, 2012 at 3:34 PM

raould

raould
Total Posts: 224
Joined: December 03, 2011

Re: Couldn't set OpenGL mode:

ok, thanks for the details.

Posted on July 12, 2012 at 3:37 PM

raould

raould
Total Posts: 224
Joined: December 03, 2011

Re: Couldn't set OpenGL mode:

hi i have been trying to get full screen, not just big-windowed, and i can't get it to work. what is the recipe, per chance?

* mac os x 10.7.3, hxcpp 2.10, haxe 2.10 final, nme 3.4.0
* using w=0 h=0 i get a window that ends up actually being slightly bigger than the display. i can tell because i have 1 extra external monitor and i see the created window overlapping onto the other display.
* adding 'fullscreen' crashes.
* removing w=0 and h=0 and keeping 'fullscreen' crashes in the same way:
a) screen fades to black.
b) screen fades to white.
c) crash.
mzzl[29527] <Warning>: CGDisplayBaseAddress is obsolete and returning NULL for display 0x7bd8d73f
mzzl[29527] <Warning>: CGDisplayBaseAddress is obsolete and returning NULL for display 0x7bd8d73f

Posted on August 03, 2012 at 11:30 PM

Spacehunter

Spacehunter
Total Posts: 3
Joined: November 02, 2012

Re: Couldn't set OpenGL mode:

It appears that the issue still seems to be around. At least on Windows XP.

OpenGL kicks in fine in window mode, but not full screen.

Is anyone not seeing this?

Posted on November 13, 2012 at 9:43 AM

xyn

xyn
Total Posts: 3
Joined: November 17, 2012

Re: Couldn't set OpenGL mode:

Getting it on osx 10.6 mac build
graphics are being drawn so not sure what to make out of it - is there a fallback rendering method or openGL works and it's just saying that?

my window attributes

<window width="0" height="0" />
<window fullscreen="true" />

Posted on November 19, 2012 at 2:07 PM

cletrix

cletrix
Total Posts: 2
Joined: November 07, 2012

Re: Couldn't set OpenGL mode:

I've had the same problem. Someone managed to solve?

thank you

Posted on December 07, 2012 at 3:06 PM

whitetigle

whitetigle
Total Posts: 25
Joined: October 11, 2011

Re: Couldn't set OpenGL mode:

Any news? I get the same error and a huge performance drop when trying either fullscreen or with width =0 and height=0.

Posted on December 28, 2012 at 6:03 AM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Couldn't set OpenGL mode:

Is there any difference between the behavior of <window width="0" height="0" /> or <window fullscreen="true" /> at compile time, versus setting the stage.displayState = StageDisplayState.FULLSCREEN; property at runtime?

Posted on December 28, 2012 at 10:38 AM

whitetigle

whitetigle
Total Posts: 25
Joined: October 11, 2011

Re: Couldn't set OpenGL mode:

Indeed!
stage.displayState = native.display.StageDisplayState.FULL_SCREEN; works.

But does it mean the parameters in the nmml file are no longer useful ?

Posted on December 30, 2012 at 11:13 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Couldn't set OpenGL mode:

Interesting, so changing to fullscreen during runtime allows OpenGL to continue rendering, but setting fullscreen in NMML causes it to fail on setting the OpenGL mode, and fallback to software instead?

Posted on December 31, 2012 at 10:54 AM

whitetigle

whitetigle
Total Posts: 25
Joined: October 11, 2011

Re: Couldn't set OpenGL mode:

Yes it seems so. I am going to use nme 3.5.3 on linux to see if I can replicate the behaviour.

Posted on January 03, 2013 at 1:11 AM

whitetigle

whitetigle
Total Posts: 25
Joined: October 11, 2011

Re: Couldn't set OpenGL mode:

ok so far this is what I got with nme 3.5.3 on linux

Here the three tests I ran to check how to enable opengl rendering in fullscreen

test 1 : success

NMML :
width = 0
height = 0
hardware=true
fullscreen=true

test 2 : fails, software renderer used

NMML :
width = 0
height = 0
hardware=true

code :
stage.displayState = native.display.StageDisplayState.FULL_SCREEN;

test 3 : success

NMML :
width = 10
height = 10
hardware=true

code :
stage.displayState = native.display.StageDisplayState.FULL_SCREEN;

So setting a false width and height works and then calling fullscreen from the code works.

Posted on January 03, 2013 at 2:06 AM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Couldn't set OpenGL mode:

Thanks!

I've put this on the roadmap for NME 3.6. Any further help (or child issues we need to add to be sure things are resolved) are welcome!

http://haxenme.atlassian.net/secure/RapidBoard.jspa?rapidView=1&...

Posted on January 03, 2013 at 1:20 PM

raould

raould
Total Posts: 224
Joined: December 03, 2011

Re: Couldn't set OpenGL mode:

so i'm using

<window if="desktop" width="0" height="0" hardware="true" fullsceen="true" fps="30" resizable="false" background="0x000000" ></window>

on mac os x 10.7.5, nme 3.4.4+, hxcpp 2.10.2, haxe 2.10

and both neko and cpp on mac full screen make a window that is taller than the actual screen, so the bottom of my app is chopped off, extended beyond the bottom, not clickable. sad

(i thought it could be due to having a 2nd monitor plugged in, but i removed that monitor cable, and it still happens on the laptop screen itself.)

Posted on January 30, 2013 at 1:25 PM