|
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"} 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
|
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
|
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
|
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
|
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: 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
|
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... |
Matthew Leverton
Supreme Loser
January 1999
|
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. |
|