Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vertical retrace



I put together a 2d engine using OpenGL once, making extensive use of
textures for my sprites. Very nice, very easy, but the biggest problem was
the limitation that OpenGL imposes in terms of raster coordinates--even
translating x,y by 0.375 as The Red Book suggests, I still often had things
off by a pixel here and there (big problem on iBooks, not a problem on
Radeons). I guess Zack could just make a 1024x1024 texture and blit a
subset of it, but trying to piece together 512x512 + 128x128 textures to
build up a 640x480 space could turn into a real pain if being off by a pixel
on some machines is a concern.

There's been a lot of talk on opengl dev about performance issues with
glWrite/ReadPixels but I haven't kept up with what the consequences are
regarding 10.2, etc.

I'd love to take my OpenGL sprite engine beyond a proof-of-concept, but
without pixel-perfect manipulation (or decent consistency between hardware
:) ), I'm in QuickDraw land.

on 9/13/02 12:57 AM, Erik M. Buck at email@hidden wrote:

> My advise is to blit to an 8, 16, or 24 bit AGP OpenGL texture, draw the
> texture on a quad, and let the OpenGL drivers worry about communication
> between main memory and VRAM as well as frame buffer swapping. My limited
> experience with a 450 G4 system is that Mac CPU->Bus performance is so bad
> that attempting to write anything directly to VRAM is a horrible waste of
> CPU time. It is much faster to write to main RAM and let dedicated DMA
> handle the transfer to VRAM (at least in our test cases). Apple's Fast
> texture demo,
> http://developer.apple.com/samplecode/Sample_Code/Graphics_3D/OpenGLFastTexD
> emo.htm, is the fastest way that we have found to get anything on screen on
> a Mac. I don't know anything about OS 9 though.
>
> Using OpenGL on OS X will also partially solve your problems with windowed
> games and overlaid windows, menus etc. but has all of the associated
> performance drawbacks of requiring bi-directional bus transfers.
_______________________________________________
mac-games-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-games-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: vertical retrace (From: "Erik M. Buck" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.