Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Can't See Display, HD 6470M, Switchable Graphics

Credits go to Matthew Leverton and Trent Gamblin for helping out!
This thread is locked; no one can reply to it. rss feed Print
Can't See Display, HD 6470M, Switchable Graphics
DrewDog
Member #13,149
August 2011

Hello all,

So I'm new to Allegro and I'm having a problem seeing the display. Here's a picture of my desktop to help illustrate the problem:

{"name":"tlhhW.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/e\/2e4e48df6ac6f3334ef8d494071bbb96.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/e\/2e4e48df6ac6f3334ef8d494071bbb96"}tlhhW.png

Alternative Link: http://i.imgur.com/tlhhW.png

As you can see in the image, I'm running a demo in Allegro 5 in MS Visual Studio 10. I can see the display for the game in the taskbar, but when I click on it to maximize it, nothing happens.

This is on my HP laptop with a Radeon HD 6470M with switchable graphics. When I switch the graphics over to the low-power Intel integrated graphics, the allegro display comes up fine.

Is this a problem with my Radeon drivers or allegro? I've re-installed the latest AMD display drivers and it hasn't helped.

Trent Gamblin
Member #261
April 2000
avatar

Try switching the demo to use OpenGL by adding al_set_new_display_flags(ALLEGRO_OPENGL) before the al_create_display() call. See if that works.

Matthew Leverton
Supreme Loser
January 1999
avatar

It's probably being positioned off screen.

Try playing with al_get_window_position() and al_set_window_position().

Trent Gamblin
Member #261
April 2000
avatar

Ah, I had someone have the problem Matthew describes actually... I didn't investigate it because I'm not sure where to begin. Do you have another monitor connected by any chance?

Matthew Leverton
Supreme Loser
January 1999
avatar

If the default monitor starts at (-screen_w,0) or (screen_w,0) instead of (0,0) perhaps Allegro is centering it incorrectly. i.e., If Allegro always uses (screen_w/2 - display_w/2, screen_h/2 - display_h/2) as the starting spot, it could be wrong.

Just a guess. Seems like the only reasonable explanation.

DrewDog
Member #13,149
August 2011

Thanks for the quick replies!

It seems Matthew was correct; the display is being positioned off-screen.

When I called al_get_window_position(display, x_test, y_test), the x and y positions were:
x_test, y_test = -320 32792

When I called al_set_window_position(display, 0, 0), the display is positioned in the upper left corner of the screen and everything is fine.

I don't understand why the default x and y values would be -320 and 32792, though. That seems pretty weird. I guess I should just always reposition the window during the initialization of the display.

Thanks again!

Matthew Leverton
Supreme Loser
January 1999
avatar

Can you run ex_monitorinfo and paste the results of that here?

DrewDog
Member #13,149
August 2011

Sure. It actually took a little doing because I couldn't get common.c to compile, but I just printed the info to the console instead.

Here is the output:

1 adapters found...
Adapter 0
(-858993460, -858993460) - (-858993460, -858993460)
Available fullscreen display modes:
Mode 0: 320 x 200, 60 Hz
Mode 1: 320 x 200, 40 Hz
Mode 2: 320 x 240, 60 Hz
Mode 3: 320 x 240, 40 Hz
Mode 4: 400 x 300, 60 Hz
Mode 5: 400 x 300, 40 Hz
Mode 6: 512 x 384, 60 Hz
Mode 7: 512 x 384, 40 Hz
Mode 8: 640 x 400, 60 Hz
Mode 9: 640 x 400, 40 Hz
Mode 10: 640 x 480, 60 Hz
Mode 11: 640 x 480, 40 Hz
Mode 12: 800 x 600, 60 Hz
Mode 13: 800 x 600, 40 Hz
Mode 14: 1024 x 768, 60 Hz
Mode 15: 1024 x 768, 40 Hz
Mode 16: 1280 x 600, 60 Hz
Mode 17: 1280 x 600, 40 Hz
Mode 18: 1280 x 720, 60 Hz
Mode 19: 1280 x 720, 40 Hz
Mode 20: 1280 x 768, 60 Hz
Mode 21: 1280 x 768, 40 Hz
Mode 22: 1360 x 768, 60 Hz
Mode 23: 1360 x 768, 40 Hz
Mode 24: 1366 x 768, 40 Hz
Mode 25: 1366 x 768, 60 Hz
Mode 26: 320 x 200, 60 Hz
Mode 27: 320 x 200, 40 Hz
Mode 28: 320 x 240, 60 Hz
Mode 29: 320 x 240, 40 Hz
Mode 30: 400 x 300, 60 Hz
Mode 31: 400 x 300, 40 Hz
Mode 32: 512 x 384, 60 Hz
Mode 33: 512 x 384, 40 Hz
Mode 34: 640 x 400, 60 Hz
Mode 35: 640 x 400, 40 Hz
Mode 36: 640 x 480, 60 Hz
Mode 37: 640 x 480, 40 Hz
Mode 38: 800 x 600, 60 Hz
Mode 39: 800 x 600, 40 Hz
Mode 40: 1024 x 768, 60 Hz
Mode 41: 1024 x 768, 40 Hz
Mode 42: 1280 x 600, 60 Hz
Mode 43: 1280 x 600, 40 Hz
Mode 44: 1280 x 720, 60 Hz
Mode 45: 1280 x 720, 40 Hz
Mode 46: 1280 x 768, 60 Hz
Mode 47: 1280 x 768, 40 Hz
Mode 48: 1360 x 768, 60 Hz
Mode 49: 1360 x 768, 40 Hz
Mode 50: 1366 x 768, 40 Hz
Mode 51: 1366 x 768, 60 Hz

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

(-858993460, -858993460) - (-858993460, -858993460)

Those numbers are 0xcccccccc, so something isn't initialized. It's possible this has already been fixed in 5.1 SVN, but I don't know.

Go to: