Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

PocketHAL/PocketFrog documentation?


PocketHAL/PocketFrog documentation?

Postby beemboy » Jun 26, 2008 @ 2:03am

Hello all,

I'm just getting in to trying out PocketHAL for some hobby projects. Is there any API documentation available for these libraries? Or are the samples and source pretty much the documentation? Thanks, and sorry if this has already been answered before (I couldn't find any links, a forum search turned up nothing, and Google search returned broken links to the droneship website). Thanks!

-beemboy
beemboy
pm Member
 
Posts: 3
Joined: Jun 25, 2008 @ 10:22pm


Postby Kzinti » Jun 26, 2008 @ 6:20am

I am afaid there is no documentation for PocketHAL at the moment. The samplse are excellent documentation.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Fair enough

Postby beemboy » Jun 26, 2008 @ 6:47am

I was looking through the alpha-blend sample and it does seem like a fairly straightforward API to pick up. Plus Visual Studio Intellisense is usually my "documentation" anyway :wink:

Maybe generating the documentation via doxygen is something I or someone could do at some point.

Thanks for these awesome APIs.
beemboy
pm Member
 
Posts: 3
Joined: Jun 25, 2008 @ 10:22pm


Postby Kzinti » Jun 26, 2008 @ 7:01am

I never understood people who wanted Doxygen documents. Doxygen just extracts info from the source file... Why duplicate what your IDE or editor can do better... Beside it's a pain in the ass to properly maintain the comments formatting.

Just let me know if you have any questions with PocketHAL and I'll be happy to help.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Yann » Oct 31, 2008 @ 2:10pm

Kzinti wrote:Just let me know if you have any questions with PocketHAL and I'll be happy to help.


I has a question about the backbuffer mechanism in Display class.

Is the backbuffer a [pitch*height] bytes system memory?

Because my original game ap has own pre-allocted offscreen buffer. and all graphic lib base on the buffer every where(threads)

I want to use the backbuffer from PHAL instead, but it need to a lock(BeginScene) first and unlock

So it 'may' not give me a permanent buffer right?

If I don't change the architecture of my game then
I will do my final offcreen -> BeginScene -> copy my offscreen to backbuffer -> EndScene

this way make a duplicate big memcpy :(

I find there is a param can be set
Code: Select all






enum SwapEffect
{
    SWAP_NONE,                  ///< Direct access (no buffering).
    SWAP_DISCARD,               ///< We don't care about the content of the backbuffer.
    SWAP_COPY                   ///< We want to keep the backbuffer content.
};
6 lines; 1 keywds; 0 nums; 5 ops; 0 strs; 3 coms    Syntactic Coloring v0.4 - Dan East  

but I can't understand the meaning...

"Direct access (no buffering)" should be help but...
I still GetBackBuffer!?

So may you explain the backbuffer->video rawbuffer mechanism ? very thanks!
Yann
pm Member
 
Posts: 3
Joined: Oct 24, 2008 @ 7:36am


Postby Kzinti » Nov 3, 2008 @ 6:31pm

Yann wrote:Is the backbuffer a [pitch*height] bytes system memory?


That is correct.

Yann wrote:I want to use the backbuffer from PHAL instead, but it need to a lock(BeginScene) first and unlock


Correct. You should use it and you will need to lock at the beginning of a frame and unlock at the end. This works just like DirectX.

Yann wrote:So it 'may' not give me a permanent buffer right?


The returned buffer can be different each time you Lock()/Unlock() on certain devices. You shouldn't assume the same buffer will be returned.

Yann wrote:If I don't change the architecture of my game then
I will do my final offcreen -> BeginScene -> copy my offscreen to backbuffer -> EndScene

this way make a duplicate big memcpy :(


Yes, that is very inefficient. You should instead Lock() the display and use the returned buffer for drawing. This will same you a whole screen copy each frame.

Yann wrote:I find there is a param can be set
Code: Select all






enum SwapEffect
{
    SWAP_NONE,                  ///< Direct access (no buffering).
    SWAP_DISCARD,               ///< We don't care about the content of the backbuffer.
    SWAP_COPY                   ///< We want to keep the backbuffer content.
};
6 lines; 1 keywds; 0 nums; 5 ops; 0 strs; 3 coms    Syntactic Coloring v0.4 - Dan East  

but I can't understand the meaning...


SWAP_NONE won't do anything, don't use it. I wanted to provide direct screen access once, but it isn't possible to do so on many devices.

SWAP_DICARD means that PocketHAL is allowed to discard the content of the backbuffer each frame. This means that you have to fill the entire screen each frame, otherwise "corrupted pixels" will appear on screen.

SWAP_COPY means that PocketHAL will leave the backbuffer intact between each frame. Typically you would use this if only small parts of the screen change each frame and you don't want to redraw everything.

This, BTW, works just like DirectX. So you can look there if you want more details.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Yann » Nov 6, 2008 @ 7:13am

Kzinti wrote:...

SWAP_NONE won't do anything, don't use it. I wanted to provide direct screen access once, but it isn't possible to do so on many devices.
...
This, BTW, works just like DirectX. So you can look there if you want more details.


thanks for the explain, now i know the limit and how to do in may app...
Yann
pm Member
 
Posts: 3
Joined: Oct 24, 2008 @ 7:36am


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