PocketMatrix forums

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

GapiDraw 1.1 beta1 issues

Post your feedback here...
run application on win2k in window mode
do ctrl-alt-del while the app is running
choose "task manager"
the screen will flicker
then the gapidraw app will crash in gd110.dll
The "only supporting 16bit color" is killing me. Everyone I have sent a beta to has bitched about it. Apparently everyone runs in 24 or 32 bit color these days. Will there be another beta with this fixed, or do you have an estimate on when the final will be released?
There will be another beta than fixes this...
Do you have an estimate on when the next beta will be released?
Next week. I can fix a special "non-banner" for you if you need it sooner.
When will the final version be, any estimates?

I haven't used the betas yet, but I am interested in some of the features, so I have to ask what is the reason for the banner?
I have a beta tester on windows 2k. On his video card if I use any non-sys memory surfaces, it crashes. As soon as he sends me the info about his video card I will post it.
Ok, thanks.

The reason for the banner is simply for me to not having to rename the DLL between each release. I don't want different 1.10 versions floating around...

Final 1.10 will be in January.
ok here is the video card that was having problems

Name NVIDIA RIVA TNT2 Model 64/Model 64 Pro
PNP Device ID PCI\VEN_10DE&DEV_002D&SUBSYS_562114AF&REV_15\3&61AAA01&0&60
Adapter Type RIVA TNT2 Model 64, NVIDIA compatible
Adapter Description NVIDIA RIVA TNT2 Model 64/Model 64 Pro
Adapter RAM 32.00 MB (33,554,432 bytes)
Installed Drivers nv4_disp.dll
Driver Version 5.13.01.1241
INF File oem4.inf (nv4 section)
Color Planes 1
Color Table Entries 65536
Resolution 1024 x 768 x 60 hertz
Bits/Pixel 16

I have tested it on a Geforce 4 and it seems fine. I am working on digging up another TNT card here that I can test the beta on.
Thanks Tully,

Great feedback as always... :)
Donovan · 19 Dec 2002, 03:21 UTC — bug fix and download
has the bug "CreateSurface(BYTE *buffer, DWORD size) " mentioned been fixed? i cannot display anything in the mem buffer.

anyway, if its a bug, is it fixed in beta 1.1? where can i download this version?
it is actually only a bug in the beta. As long as you use GDSURFACE_SYSTEMMEMORY on all your surfaces everything will work fine. I didn't have any problems creating surfaces pre-beta.
Donovan · 19 Dec 2002, 04:13 UTC — GDSURFACE_SYSTEMMEMORY ??
really? what is this "GDSURFACE_SYSTEMMEMORY"? i am now using the gapidraw 1.04 version and sees no such stuff in it.

so, where can i get this? if not, suppose i have to display a buffer say an array of bytes (size 32x32x3 bytes created "dynamically" prepared for a size 32x32 24 bits bmp), how can i do it, as how it can be done in VC++ by means of GDI?
:?
Sorry, this thread is about problems in the 1.1 beta. GDSURFACE_SYSTEMMEMORY is only in 1.1.

There are a number of ways you can write into a buffer...

First create surface

CGapiSurface *m_pSurface = new CGapiSurface;

// this code is 1.1 beta code look in the online help for the right paramaters for this call
m_pSurface->CreateSurface( GDSURFACE_SYSTEMMEMORY | GDSURFACE_CLEAR, WIDTH, HEIGHT );

// then call methods on it to draw on it
// this is usually done in OnDraw type code
m_pSurface->FillRect( &size, 0, 0, NULL );
m_pSurface->DrawRect( &size, RGB( 200, 200, 200 ), 0, NULL );

etc. etc

// if you want to do pixel by pixel stuff you can do
m_pSurface->SetPixel( x, y, color );

but it is probably better to get the raw buffer and write your own specialized drawing code as there is a lot of overhead doing row after row of setpixel calls.

You can also get a gdi handle from the surface

HRESULT m_pSurface->GetDC(HDC* pDC);

but again GDI is REALLY slow so I would limit what you do with it.
Donovan · 19 Dec 2002, 08:32 UTC — hmm.....
need not apologize...setpixels and gdi are very slow i totally agreed...that's why i prefer to create a surface with ready raw data and later blt to the screen..can't do it with ver 1.04..therefore i was wondering whether the new beta 1.1 would have got the problem right and so i can download and use.

btw, where to get this beta 1.1? is it available?
:wink:
In the older version you can get to the buffer it the call is GetBuffer(GDBUFFERDESC* pGDBufferDesc); on a surface. You have to make sure you call ReleaseBuffer when you are done. There is an example that comes with gapidraw that works on raw buffers. It is called plasma. Look at Plasma.cpp in the in the common section.


As for the beta if you look farther back in on this message board there is a post about it being released. In the post is a link to the file. You should know that the beta isn't well documented though and if you are just getting into this library it is probably best to wait for the next release. (Unless you like digging through samples and header files.)

Hope that helps...
seems that's the only way out..thanks alot..u r a great help to me...!!
In using version 1.10b2, I've noticed something a little odd versus my previous use in 1.04 on a stationary PC.

I'm guessing that it may be related to hardware acceleration in some way, as it only occurs in Fullscreen mode.

Using a blt with a colorkey and scaling, the framerate drops precipitously in fullscreen mode. This is a pretty large blit, admittedly - 500x400 or so. This does not occur in windowed - everything is fine.
I tried setting the backbuffer to GDDISPLAY_BACKBUFFERSYSMEM and that fixed it as well, so, as mentioned before, I think it might have something to do with hardware accel. I'm using an NVidia GEForce II.


Don't know if this makes any sense, but if you'd like further clarification, let me know!

Thanks for such a fantastic library!
Lemur
Lemur: By default GapiDraw will store all surfaces in video memory when running in full screen mode.. If you operate on these surfaces using operations that are not HW accelerated it will be much slower than if the surfaces were stored in system memory.. I'll add lots of HW documentation to the web site in time for the 1.10 release.

*Update* You can improve performance of video surfaces by calling "LockVideoSurface()" on the surface, then do all your un-accelerated stuff. When you are finished, just call "UnlockVideoSurface()".
There is a bug in the pseudo version that I am using on the desktop pc. If Pocket War is running and the screen saver kicks in when the screen saver goes away Pocket War crashes and it is down in gapidraw somewhere.

If there is more information I can get for you on this one let me know.
tedson: This should be fixed in the current build. I'll publish a daily build later tonight...
Excellent, one more question. Is there anyway to get gapidraw to run attached to a WS_CHILD based window as opposed to a WS_POPUP window?

When I try and do this it crashes. (Again this is on my funky version.)
DirectDraw does not allow binding to child windows. Try "WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX" if you run windowed.
I was trying to hook into the preview window for a screen saver. That requires you to create a child windows of the preview panel at the right location. No problem though I can just fake the preview.