SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 301 | Next

Robert P. Kuehne and J. D. Sullivan

"OpenGL Programming on Mac OS X: Architecture, Performance, and Integration"


Share Data Across Contexts When Possible
If you have multiple contexts and all of them can use the same OpenGL resources,
be sure to share them across contexts to eliminate redundant copies of
the data. See Chapter 5 for more information.
Metrics
The overview introduced the idea of considering your application performance
from a variety of perspectives, including the perspective of the user as well as
the perspective of the system. Regardless of whether you have the same application
style as the one described in the overview, or something more demanding,
such as a visual ?¬‚ight or driving simulator, or game, you ultimately need to
measure performance. De?¬?ning a few metrics for performance is an essential
?¬?rst step.
Frame Rate
The ?¬?rst metric useful in performance analysis is the frame rate. The frame
rate measures the number of frames per second your application displays.
Unlike most performance metrics, the frame rate is a discrete measurement.
You cannot, for instance, have a frame rate of 12.5 frames per second (FPS).
Metrics 207
Table 11-1 Pixel Format Buffer Selection Mode
API Double Buffer Single Buffer
CGL kCGLPFADoubleBuffer,
GL TRUE
kCGLPFADoubleBuffer,
GL FALSE
AGL AGL DOUBLEBUFFER, GL TRUE AGL DOUBLEBUFFER, GL FALSE
Cocoa NSOpenGLPFADoubleBuffer,
YES
NSOpenGLPFADoubleBuffer,
NO
GLUT GLUT DOUBLE GLUT SINGLE
Further, if your application is vertical blank synchronized your frame rate will
be quantized by the refresh rate of the display device you are using.


Pages:
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313