Page 1 of 1
Surface memory access

Posted:
Jun 24, 2002 @ 3:41pm
by Pam
Hi,
How do I gain access to the Surface memory? I'm trying to read/write on a pixel basis.
Thanks,
Pam
GetPixels, for internal use only ?

Posted:
Jun 24, 2002 @ 5:26pm
by Conan
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

Posted:
Jun 24, 2002 @ 5:35pm
by Kzinti

Posted:
Jun 24, 2002 @ 7:06pm
by Pam

Posted:
Jun 24, 2002 @ 10:12pm
by BurningSheep
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


Posted:
Jun 25, 2002 @ 12:57am
by Kzinti
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).
Nice demo, shame about the sheep

Posted:
Jun 25, 2002 @ 7:52am
by Conan

Posted:
Jun 25, 2002 @ 8:38am
by Kzinti

Posted:
Jun 25, 2002 @ 10:37am
by BurningSheep
Pitch not understood yet

Posted:
Jun 25, 2002 @ 11:23am
by Conan
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

Posted:
Jun 25, 2002 @ 11:48am
by BurningSheep

Posted:
Jun 25, 2002 @ 12:26pm
by BurningSheep

Posted:
Jun 26, 2002 @ 6:27am
by Kzinti
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!

Posted:
Jun 26, 2002 @ 10:01am
by BurningSheep