PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

GapiDraw 3.01 BETA 2 Released!

<a href="http://www.gapidraw.com">GapiDraw</a> 3.01 BETA 2 was released today with improved support for the Palm platform! We are getting closer to the final release of GapiDraw 3.01 with full support for Palm, Symbian and Windows Mobile. GapiDraw 3.01 is planned for a public release on May 12, where we will be showcasing GapiDraw at the Electronic Entertainment Exposition (West Hall, Booth 2128)!

Licensed users of GapiDraw 3.0 can request a version of the beta without banner if they plan to release commercial software based on 3.01 before we ship the final release. GapiDraw 3.01 will be available free of charge to all current GapiDraw 3.0 licensees.

Here are some of the new features in BETA 2:

* A new cross-platform sample application skeleton was added for Palm, Symbian, all Windows Mobile devices and Stationary PCs!
* Palm: Major performance improvements on the Palm platform. Performance is now up to par with many Pocket PC devices!
* Palm: GapiDraw no longer requires MathLib to be pre-installed on Palm devices.

<a href="http://www.gapidraw.com">Click here for more information</a>
Oh, and for those of you wondering what will be added in the final release..

We will be adding a platform-independent resource manager that will use zipped resource bundles to store images and other data. This will make it possible to use image resources larger than 64kb on the Palm platform, and it will also provide a platform-independent CreateSurface() operation that works on ALL platforms supported by GapiDraw! :) Perhaps we some day can get rid of all #ifdef's...
Great news Johan! :) We'll surely test this version and let you know how it goes. Thanks!
will gapidraw become like the complete directx library (sound/3d!!/input/ddraw) ?
shanytc: We have lots of plans for GapiDraw.. ;)
What compilers are used for palm?
CodeWarrior only. The lib file created with CodeWarrior is not readable by PRCTools / GCC. And since PRCTools does not support code jumps larger than 32k we could not build a native PRCTools-version of GapiDraw.
Palm Tungsten E. Not sure which OS version, about applications says v 4.5.1P.

Minimal runs OK.

Simple gets about 120ms 8fps in all four orientations.

TileDemo gets about the same.

There may be an issue with lockups that require a hard reset. It happened to me, so I hard reset then HotSynced everything back. It happened again (during that HotSync cleanup actually) so it is a conflict with either the other software I had (pretty much just RealPlayer and the game DreamWay) or with the altered versions of the samples that I compiled. I deleted my HotSync user, hard reset again, and reinstalled just the samples and they seem to work. I'll do more testing later.

I get a free license for all this testing right? :D
:) Unfortunately not...

The simple demo is about the worst demo available on the Palm. Memory reads has a terrible overhead, and doing a arbitary rotation in a non-cache optimize way is basically killing Palm performance...

Sorry to hear about the issues you experience.. We will try it on more devices as we have time...
I should clarify, I have both the stock samples as distributed, and altered versions of the samples that I compiled myself in CW9.3 for testing.

Right now I'm sorting through the mess, because my altered samples are also named "minimal" (haven't changed the name yet), and also they seem to compile into the original directory (because I copied the project and haven't yet figured out where to change that setting).
Are there any gotchas to using _stprintf on Palm?

Here's my situation. Things seem to be working now in my own application, but a few images aren't showing. I tried to collect all the HRESULTs from CreateSurface into an array to print out, to see what the problem is.

For the 19 images I see the HRESULTs like this:

0 0
0 1
0 2
0 3
and so on until
0 18

So it appears that all images are created with result 0 which is OK.

However, the weird thing is, that the numbers are printed in reverse. The first number should be the index, the second should be the result. My print looks like this:

_stprintf(str, TEXT("%d, %d"), n, hresultarray[n]);

Why would this occur? I know that function argument order of evaluation is undefined, but why would the order be incorrect even in the function itself?

Further, the fact that the images seem to be created OK sheds no light on the mystery of why they aren't showing for me. (Only some images, not all.)

OK, I printed just the result and two images return -32761 which I assume is out of memory. But why isn't %d OK for printing ints? It seems like %d wants two bytes but the int is four bytes, or something like that, which would explain the weird prints the first time.

Also, the images that don't load are the images that don't display, but there are still some images that did load but don't display. Actually, it's a font. The image created OK, but one font isn't working.

I'll look into things some more. Most everything else seems to be working. There are some rough edges, and of course, the issues with performance and image size, but on the whole things look promising.

Oh one more thing, on my Tungsten E, this program takes 33s to get by the GapiDraw splash screen (creating images and everything). There are only 19 images, about half under 20KB, the rest under 90KB, except one is 206KB. It's not a very big program, altogether it builds a PRC file that is 510KB.
Also, the images that don't load are the images that don't display, but there are still some images that did load but don't display. Actually, it's a font. The image created OK, but one font isn't working.


Did you check the return code from CreateFont? It needs memory for the kerning tables...
Johan,

I just tried the beta2 GD simple app and flipping/rotating the screen works great on a T3. I also noticed that GD automatically stretches on the fly whenever you stretched the T3's screen to 480x320. However, when stretched, the rects for the buttons (rotate, quit, etc.) doesn't seem to work anymore. Does this mean that all the rects have to be reinitialized whenever the screen is stretched?

Thanks.
Erick: There's a new operation: OnScreenSizeChanged() you should override to update your rectangles. Check the updated doc on CGapiApplication.. :)
Johan wrote:
Also, the images that don't load are the images that don't display, but there are still some images that did load but don't display. Actually, it's a font. The image created OK, but one font isn't working.


Did you check the return code from CreateFont? It needs memory for the kerning tables...


First, "%ld" works for printing ints, which is strange because it should be for longs. I see under the code generation options, 4-byte int and 8-byte double are checked.

Second, the return code from CreateFont is -932839312. I'm not sure what error that is, it doesn't appear to be E_OUTOFMEMORY or E_INVALIDARG.

The font itself is the second thing created (after the first font, which is essentially the same and works fine), and all the images (except one) after it load fine, so I'm not sure it's an out of memory problem.

I flipped the two fonts, so the second is created first, still no go. I flipped the two font images (but forgot to flip the transparent colour), neither works. Then I took a look at the transparent colours (the fonts are pretty much identical except for the background colour). I changed both fonts to use the same image and transparent colour, and they both work. So it seems to be a problem with the transparent colour.

The transparent colour is RGB(16, 60, 88). I verified that this is what it is in the BMP file (which is 256 colours). Why would there be a problem with this font and colour?
-932839312 = FFFFFFFFC8660070

From "gapidraw.h"

// INVALIDBITMAP: The bitmap file could not be parsed.
GDERR_INVALIDBITMAP = ((HRESULT)0xC8660070),

Something appears to be wrong with the font bitmap.. :-/ Perhaps you should try another colorkey?
You could still get that even if the CreateSurface was OK?
Yes, apparantly CreateFont could not parse your font bitmap correctly.
OK. It works on Windows and Pocket PC though so I'll have to investigate what the cause of the error is more closely.
Johan: I'm just curious, how come the font bitmap loads and runs well on the PC and PPC versions but not on the Palm version? What are the possible problems?
No clue... The simple demo works out alright with the font, as do the system fonts...