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

Surface memory access


Surface memory access

Postby Pam » Jun 24, 2002 @ 3:41pm

Hi,

How do I gain access to the Surface memory? I'm trying to read/write on a pixel basis.

Thanks,

Pam
All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


GetPixels, for internal use only ?

Postby Conan » Jun 24, 2002 @ 5:26pm

If I'm correct it looks like the GetPixels function is only for internal use by PocketFrog ?

It's a method of GraphicBuffer found in graphicbuffer.h

You could probably figure out how to get at them by looking at this source but my understanding is that internal stuff is not useable from the user's game.

You could request a new function? I had not gone looking for this yet. Seems to me that many user-written special effects will rely on getting at the Pixels

ps: what are you trying to do ? just in case there's an alternative approach
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby Kzinti » Jun 24, 2002 @ 5:35pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Pam » Jun 24, 2002 @ 7:06pm

All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby BurningSheep » Jun 24, 2002 @ 10:12pm

the lock/unlock thing is what I used for my plasma effect (), didn't get what the discard parameter was about though (didn't really think about it either), so I just omitted it altogether :)
Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Postby Kzinti » Jun 25, 2002 @ 12:57am

I selected the default value for "bDiscard" as being false. This way, if you don't know what it's for, Lock/Unlock will work as you expect it.

Basically, if bDiscard is set to true on Lock(), the content of the surface can be discarded (i.e. erased). This is really useful to save time when I load images.

The bDiscard on Unlock() is really similar. If you only lock to surface to read the pixels (read only access), there is no need to re-swizzle the temporary buffer. So you can use Unlock( true ) to save time.

Of course, when writting a plasma effect, you should use the default values (bDiscard = false).
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Nice demo, shame about the sheep

Postby Conan » Jun 25, 2002 @ 7:52am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby Kzinti » Jun 25, 2002 @ 8:38am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby BurningSheep » Jun 25, 2002 @ 10:37am

Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Pitch not understood yet

Postby Conan » Jun 25, 2002 @ 11:23am

I need to read up about this pitch issue as I don;t follow what it's about. I have PocketGL source plus the EasyCE toolkit & GapiDraw in addition to PocketFrog so between them I'm sure to find out enough. I want to do some special effect & the plasma type effects will look nice in a space game
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby BurningSheep » Jun 25, 2002 @ 11:48am

Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Postby BurningSheep » Jun 25, 2002 @ 12:26pm

Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Postby Kzinti » Jun 26, 2002 @ 6:27am

Thanks for the source code Sheep!

Two comments:

1) It seems you are not handling the pitch (hence the problems on the Casio E-125)
2) There is no need for this "filepath" Easy-CE rip... PocketFrog already has a function to do just that: PocketPC::GetFullPathName(). (Yeah yeah, I know, docs are needed).

I would like to request your permission to adapt your source code so that it becomes another sample in the next release of PocketFrog. Let me know!
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby BurningSheep » Jun 26, 2002 @ 10:01am

Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

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