PocketMatrix forums

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

GapiDraw 2.02 released!

<a href="http://www.gapidraw.com">GapiDraw</a> - The Graphics SDK for Stationary PCs, Smartphones and Handheld Computers was released today in a new version!

New features include surface clipping in all operations, full support for the Pocket PC 2003 environment, a new pixel shader, and several bug fixes!

Read more at http://www.gapidraw.com

Image
Above: The new pixel shader BLTFAST_MULTIPLY is especially useful for changing colors of text fonts.

Complete release notes:

GapiDraw 2.02 [2003-07-15]
--------------------------

SDK additions:
-Clipping support in all operations! A clipping viewport can be set for each surface using CGapiSurface::SetClipper and CGapiSurface::GetClipper.
-GapiDraw now comes with XScale-optimized binaries for the PocketPC 2003 environment (Windows CE 4.2).
-New function: CGapiApplication::CreateVideoSurfaces. Place all your code for creating video surfaces here. This function will be called if video surfaces are lost. This function is also called on application startup.
-New function: CGapiApplication::OnMinimize (use this to suspend music output).
-New function: CGapiApplication::OnRestore (use this to resume music output).
-New helper classes: CPoint and CRect. Use them in all functions requiring a POINT or RECT structure (e.g. BltFast(0, 0, &surface;, CRect(10, 10, 100, 100), 0, NULL)). They are located in the files GapiDrawExtension.h and GapiDrawExtension.cpp.
-New font functions: CGapiBitmapFont::GetStringWidth, CGapiBitmapFont::GetCharWidth, and CGapiBitmapFont::GetSpacing.
-New font functions: CGapiDisplay::GetSystemFont and CGapiDisplay::GetSystemFontBorder to retrieve pointers to the built-in system fonts.
-New BltFast pixel shader: Multiply! Use this to easily change color of fonts.

SDK improvements:
-CGapiBitmapFont::CreateFont now allows ASCII strings with less characters than the bitmap font to be used (only those defined in the ASCII string will be used). If the ASCII string contains more characters than the bitmap font, only those defined in the bitmap font will be used.
-CGapiBitmapFont::CreateFont no longer requires the first character in the ASCII string to be <space>, e.g. a font can now contain only the characters "1234567890" with no space. This applies to both the simple as well as the advanced font bitmap formats.
-It is now possible to call CreateSurface() on a surface that is a backbuffer copy (assigned using CGapiDisplay::GetBackBuffer).
-The back buffer is now cleared at startup on Pocket PCs with direct display access.
-CGapiSurface::Intersect now works with signed coordinates.
-A new flag GDRGBASURFACE_SYSTEMMEMORY was introduced. RGBA surfaces can currently only be stored in system memory, this flag was added for extra code clarity.

SDK Changes:
-If surfaces stored in video memory are lost, CGapiApplication will now call CGapiApplication::CreateVideoSurfaces (previously CGapiApplication::CreateSurfaces was called). Move all your video surface creation code from CGapiApplication::CreateSurfaces to CGapiApplication::CreateVideoSurfaces.
-If the width and height passed to CGapiDisplay::OpenDisplay is 0, GapiDraw will now open the display as 240x320 if windowed, and 320x240 if full screen.
-The .NET function calls (GapiDrawNet.h) CGapiDisplay_OpenDisplay and CGapiDisplay_OpenDisplayByName were slightly modified.
-CGapiApplication does no longer include CrtDebug debug checking for full STL compatibility.
-The single-threaded version of CGapiApplication does no longer sleep 1 millisecond if it cannot reach its target FPS.
-DrawText with system font was removed. It is no longer possible to draw text directly using the system font. Instead if you want to draw text with one of the system fonts, call CGapiDisplay::GetSystemFont to retrieve a font pointer and then use the bitmapped system font for drawing.
-RenderSystemFont was moved from CGapiSurface to CGapiDisplay and is no longer a static function.
-The GDDRAWTEXT_CALCWIDTH feature was removed. Use CGapiBitmapFont::GetStringWidth instead.

Bug fixes
-Using the flag GDALPHABLTFAST_OPACITY with CGapiSurface::AlphaBltFast would previously not work on pixels where alpha was 255 (totally opaque).
-Calling AlphaBlt with a destination rectangle in a different size than the source surface would previously cause rendering errors in some display modes.
-Blt using rotation center would previously not work correctly in all display modes.
Hi Johan,

I think I got your private message to test gd2.02 a little late. I just logged on and saw that its been released already. Anyway, I'm glad that its been released!!! I'll go test it right away with my game.

Regards,

Erick :)
:) Please do feel free to post here if everything works out as it should.
Johan,

A small problem with the documentation in the CGapiSurface::GetClipper and SetClipper sections. Somewhere you still refer to them as HRESULT GetViewPort(RECT* pRect) and SetViewPort. Apart from it I think we got something amazing again. Thanks.
Sparkie: Thanks for reporting! I have updated both the documentation online and the distribution file.
ppcStudios · 16 Jul 2003, 19:57 UTC — GDAPPCONFIG
According to the docs for GDAPPCONFIG:


dwDisplayWidth
[OPTIONAL] (Stationary PCs) The width of the display. If NULL, display will be set to 320x240.
dwDisplayHeight
[OPTIONAL] (Stationary PCs) The height of the display. If NULL, display will be set to 320x240.


Actually, the display defaults to 240x320 now if these elements are left NULL. This is a change from 2.01b.
Just a quick benchmark for those interested...

Using MFC.EXE Release @ 800x600 Full Screen:
--------------------------------------------
GD2.01b - 345 sprites average @ 50fps.
GD2.02 - 325 sprites average @ 50fps.

Test Machine Spec:
------------------
Pentium III - 450MHz
128MB Memory
Riva TNT2 AGP
DirectX 9
Windows 2000 - SP4

I assume that the small drop in spritecount is due to the clipper, and maybe some of the other small arsenal of new features - in the end, it’s a sacrifice I'm willing to make! :D

Excellent work Johan!
Pejo Software - Per · 17 Jul 2003, 10:33 UTC
6% performance loss!
Since I have no use for a clipper or the other features for now maybe I should move back to 2.01 again. I want my smartphone game to run smoothly while playing MP3. It does, but barely (music will skip in some extreme cases) so in my case 6% loss isn't very good.
But is there a reason why you would get a performance loss if you don't use any of the new features (isn't clipping off by default?).

version 2.02 seems to be running well on my smartphone game though, but almost every GD call I make is BltFast..
Pejo Software - Per · 17 Jul 2003, 11:15 UTC
Well..
When testing with an MP3 recorded with 160 KBPS instead of 192 everything runs smooth and no skipping. So I guess I am satisfied with that.
I tried some different optimization flags on the stationary version (since I get internal compiler error constantly from VC6) - which might affect performance negatively. This does not affect the PPC/Smartphone versions...
Hi Johan,

Ok I was able to upgrade my game to use v2.02 and found it very stable on my end. However, my game does not use any rotation blitting, just lots of bltfast, rectangles, blt effects and clipping. Thanks for the built-in clipping routines, it works just great. I also noticed that when I run the game using an xscale ipaq h1910, I had a drop of about 2 fps compared to the v2.01 build. I'll look into this more later.

However, there seems to be something wrong with your download site, I tried redownloading gd v2.02 last night and whenever I click on the "I agree with the terms and agreement" button, it just refreshed the page and didn't bring me to the download page. I tried clearing my cache and everything but to no avail.

Other than this, I had no other trouble whatsoever and I'm very happy with the current version. Can't wait to check out the final build on v2.03.

Thanks a lot Johan! More power to gapidraw!
Finally I have tested the new GD version and I have code a little sample that show how to use the new CGapiApplication included in gd202 with Hekkus Sound System.
With the new CGapiApplication you can add sound support without touching it but just subclass it. It works very well and the result are more elegant and easy to use/reuse and abuse :)
Tomorrow I'll add the sample on my homepage, if someone are interested you can find it on my website http://www.shlzero.com

Great work Johan!