This site is no longer active and is available for archival purposes only. Registration and login is disabled.

GetBuffer() question


GetBuffer() question

Postby efortier » Dec 31, 2002 @ 1:19am

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby Johan » Jan 2, 2003 @ 1:28am

Yes, you definitely need to call GetBuffer(). Do not access m_surface.pSurface directly. :)

The reason is that pSurface always points to buffer memory pointer (and is renamed to pBuffer in GD 1.1), and not pixel origo. On stationary PCs these two addresses are the same, on most Pocket PCs they are not. Also, you do not know the pixel format of the surface unless you call GetBuffer() - it can be 555 or 565.

Use GetBuffer() and you will always receive the correct buffer pointer.
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby efortier » Jan 3, 2003 @ 1:19am

Whoa... Thanks!

Just as a note, I'm using an iPaq 3850, and I never called GetBuffer() in any classes derived from CGapiSurface, and I never had a single problem.

I suspect that some other devices might not be as forgiving...

--Eric
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron