getting Screen resolution in Carbon
Hi,
I have an openGL app that can switch from window/fullscreen,and when
switching i need to resize my openGL viewport to match the new window resolution
(which will be the screen res as i don't change mode), so I need to find
out the screen resolution, any idea ?
I checked SWAP_AREA or RECT_AREA etc but they're not returning the
correct values ...
I have an openGL app that can switch from window/fullscreen,and when
switching i need to resize my openGL viewport to match the new window resolution
(which will be the screen res as i don't change mode), so I need to find
out the screen resolution, any idea ?
I checked SWAP_AREA or RECT_AREA etc but they're not returning the
correct values ...
1) Don't write new code in Carbon. Carbon is all but dead. Cocoa is easier and better documented. Even if you have a cross-platform codebase.
2) Is your viewport actually wrong? It seems to be set correctly when you attach the first drawable to a context...
3) The code you need is neither Carbon nor Cocoa, but CoreGraphics. CGGetActiveDisplayList and CGDisplayCurrentMode are the functions you need.
2) Is your viewport actually wrong? It seems to be set correctly when you attach the first drawable to a context...
3) The code you need is neither Carbon nor Cocoa, but CoreGraphics. CGGetActiveDisplayList and CGDisplayCurrentMode are the functions you need.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| DPI and Resolution for Graphics | mickyg | 9 | 6,663 |
Apr 27, 2012 03:02 PM Last Post: Andres Calil |
|
| switching screen resolution | NelsonMandella | 3 | 2,912 |
Apr 25, 2010 01:33 PM Last Post: SethWillits |
|
| OpenGL full screen mode leaves garbage on screen when exiting app | Malarkey | 5 | 4,460 |
Nov 19, 2008 12:51 PM Last Post: Malarkey |
|
| game image sizes and screen resolution | leRiCl | 5 | 3,831 |
Jul 2, 2008 03:31 AM Last Post: leRiCl |
|
| Changing resolution while already in full-screen mode? | Malarkey | 1 | 2,259 |
Jun 10, 2008 07:49 PM Last Post: AnotherJake |
|

