Home-grown DirectX
Hello all. The idea is being tossed around over on PocketProjects of developing a DirectX-like API for the PocketPC based on top of GAPI. We're thinking of a couple of API's with much of the functionality we all wish GAPI had, roughly based on DirectX (but only VERY roughly!). If you might be interested in joining the effort, feel free to contact myself (
fzammetti@omnytex.com) or simply check out the thread:
http://www.pocketprojects.com/ubb/Forum ... 01837.htmlOn PocketProjects. Thanks all!
EasyCE is pretty cool. I don't know how close it is to DirectDraw, since I haven't yet programmed in DD, but you may want to look at that first, maybe even use a few functions.
http://userwww.econ.hvu.nl/~kouwenhs/tech.htm
I'm curious as to what added value I would get from calling a more DX-like API over using GAPI?
Have you guys had a look at Jakko's EasyCE library?
Actually, I'd rather see a more OpenGL type library. I HATE OpenGL mind you, but it does make games like Quake look 100X better assuming you have the hardware.
Last modification: randall - 07/06/01 at 15:04:57
While the idea of a " DirectX-like" API is not a horrible idea, it will not be that useful. The real goal is to create a DirectX replacement so that games can be easily ported to Windows CE. If a programmer is going to sit down and write a game from scratch, which is where 90% of the good Pocket PC games come from, then the library will not be as valuable. However, if because of its existence, software companies say "it will be very easy to build our existing game for Pocket PC because of this DirectX library", then you will bring games over to Pocket PC.
Good: We are creating a 100% compatible subset of the DirectX API.
Bad: We are creating something VERY roughly like DirectX.
Dan East
Friggin smileys caused a Last modification: Dan East - 07/07/01 at 06:46:42
Ya, what Dan said
Interesting thought Dan, and I do agree with it. I guess the way I would answer it is to say this...
The idea of porting DirectX to PocketPC was in fact our first thought, but we quickly came to the same conclusion Microsoft itself did: it probahly was not a viable alternative. So, following from that initial idea we decided that using DirectX as a basis for a library made some sense. The idea is to create a standard library that anyone can use for graphics programming, games being the obvious big use, that is similar to DirectX in theory and execution, but still different. Simpler we hope too.
It's not an original idea by any stretch, but we think the idea of building on top of GAPI may be. GAPI is a good starting point, and when you think of basically extensions to GAPI giving you some of the same features as DirectX, we think that makes a lot of sense.
I agree completely, an implementation that is 100% DirectX compatible would be a huge boon for PocketPC game development. That just doesn't seem possible for a multitude of reasons. So, the next best thing we think is a standard library that gives you many of the same features but not as expensively.
I have looked at EasyCE, I think it's excellent. I suspect we will look at it in more detail as things progress too. I'm sure we'll look at a lot of graphics libraries for ideas along the way.
I agree, it won't be the ideal solution, but we do feel it will be a step in the right direction. Besides, I personally expect Microsoft will port DirectX, likely some specific subset of it, over in due time anyway. We may just be a stopgap solution, but hopefully it'll be of some use anyway!
Windows CE supports DDraw and DSound already, however the Pocket PC OEMs didn't pick it up. Probably because they don't see games as being a big enough market for their devices. Maybe MS charges them less for an OS license without it?
Porting a 100% DirectX compatible library would be far too difficult right now. Though I don't think it should be just "roughly" based on DirectX, I think it should be as close as possible. Something that would not necessarily make porting automatic, but alot easier. Even if that means using the same naming convention for commands as DirectX. Sure we'll skip a command here and there (possibly added later by a team member or the public if it goes open-source). Subsets of DirectDraw, DirectSound, DirectInput and DirectPlay maybe? (And if someone dares, make a Direct3d module... yikes).
Ya, that's exactly what we need.
I've done some research on the SDL libraries. This is a GPL'ed, cross-platform DirectX-alike. It supports a lot of things, and I think writing another wrapper over this that does a lot of DirectX calls would be simple.
I'd say that it's 90% compilable on EVC++, but there's a lack of low level functions (sempahores - supported in the docs, but the winbase.h as no mention of semaphore calls) that need substitutes on PPC.
Here's the source to SDL:
http://www.libsdl.org/download-1.2.html
Here's a link the projects status as it relates to Windows CE:
http://www.libsdl.org/faq/FAQ-Win32.html
What about DirectGameplay? Will the lib support that?

Yes, we will have GAPIPlay, like DirectPlay.
The problem with comming close to the implimentation of DirectX is the underlying COM+ classes. It would make the project almost undoable. However, I can see a need to closely match DirectX. Need to do some more thinking on this subject.
By the way, anyone know if the mailing list is down? Or is it just me?
it was a joke.
Ya, not DirectPlay, DirectGameplay. It's a joke saying that most MS games don't have gameplay, so they should have created DirectGameplay.
But DirectPlay over IR would be cool. Too bad I don't know anyone else with a PPC?
DirectX is based on COM, not COM+. A really good book on implementing COM objects and interfaces is
"Essential COM" by Don Box.
I get it...DirectGamePlay...ha! Maybe I can work on that one anyway?
My head was up my butt on that too, I was thinking DirectInput, not DirectPlay, but hey both would be most cool....and I was thinking that DirectPlay via IP would be sweet...gotta think about it.
Just a point of fact...not that I care about symantics....but OLE, COM and DCOM have ALL now been affectionately dubbed COM+ by MS in a never ending effort to confuse everyone with cryptic naming conventions. So, while yes, DirectX is technically COM insofaras it will not marshal properly over the COM+ transport layer, it still can be considered COM+...but I digress.
The COM+ thing doesn't scare me, but it adds a layer of complexity that I think can be postponed until a later version. I am thinking in project management terms now, so I want to do a code drop ASAP and get it out there for people to test and use as soon as possible...that's the plan anyway.
-RICoder
P.S. Does anyone know what happened to fzammetti? Can't raise him on IM or e-mail, and the PPCDX list seems not to be working....what gives?
Got this thing going on with GDBitmap...a class in the library. I FINALLY got LoadImage to work in Emulation and PPC, turns out LR_LOADFROMFILE is not supported (haha) but 0x10 as a flag does make it go to a file....however, it needs and explicit path on Emulation (L"\\Windows\\" does not work but L"c:\\Windows CE Tools\\..blah..\\Emulation\\Windows\\" does).
Anyway, I get an HBITMAP, which is cool, and the a BITMAP, but what I need is a pointer to the bits, so I can translate to 16BIT or whatever and make a new file format for it. No prob working with a Resource since you can lock and retrieve the BITMAP with a valid pointer...but how the hell do you do it with an HBITMAP from a file? Or if no one knows this...does anyone know off the top of their head how big (in bytes) the header of a BMP is?
RICoder,
If you need to get at the raw bits of a BMP, why don't you just read the data from the .bmp file directly into a buffer? There's no point in storing the image in a GDI bitmap if you're going to use GAPI to display images.
Regarding the size of a .bmp header: Look at the docs for BITMAPFILEHEADER and BITMAPINFO.
If you're writing an image loading class you might want to support gif, jpg, etc. by using imgdecmp.dll. More
here.
Regarding your upcoming DX-like libraries:
1) Is it going to be a DLL or a static library?
2) Will the implementation be thread-safe?
3) From your previous posts, it looks like you're writing C++ class libraries - Can your routines be called directly from a C program?
4) Do you forsee a problem for users of your library if you release an early version that doesn't support COM interfaces, and then later adding them? Will you continue to support the non-COM APIs going forward, or only the COM version?
DPlay is not well-received in the game development community. I would put that on the end of your list. Sockets and serial communications programming is dirt simple. I haven't done IR programming but it can't be that difficult.
Digby,
Yeah, that was the point, I would rather read it directly from a file, but I just hadn't put the effort in yet...thanks for the info.
Your answers--
1) Static right now...will be DLL before first release.
2) Current implimentation is not thread-safe...well, ok it is, but not tested, so I would have to say no.
3) I wouldn't try to call it from C, but why would you want to anyway?
4) It'll be like DirectX in this way. DX lets you use the COM interfaces OR the libs, doesn't really care. So the plan is to do it like that.
5) GPlay is something I would like to see implimented for a host of reasons...but it may have to wait a bit. It will not be TOO DPlay like, in that it will be more basic in its exposing of functions.
Do you code? Are you good? Would you like to join the list and perhaps contribute? Sounds to me like you know what you are doing....
Digby=pimped out yoda, in a programmer sense...
Ummm digby just copied that from some page he saw on the net. IT doesn't actualyl mean anything at all. Its jus worthless techno-babble.
meanwhile, we KNOW that Chick writes all his posts instead of copying them. There isn't a single page on the internet that has 4 spelling and grammatical errors per run-on sentence.

This is a signature writing style soon to be a classic. You just wait, years from now; you'll look in English book across the world, and my picture will be there. The inventor of "New English". Yes, Yes, i rip. Actually i speak very well, i just suck at spelling.

and that whole correct grammar thing on paper.
Actually I was astonished with your emulator review. I don't recall seeing any
glaring spelling or grammatical errors. It was almost like someone else wrote the review. I was expecting something like:
"this emultator feckin' suucks cuz its not the coo lik my Dreamcast icant even see the fekkin' screen

"
And about that length too. I'm not rippin' on you, it's just that you see someones writing style for so long and you expect that's the way they always write.
randall,
That's because he copied it from some page on the Net. It doesn't mean anything at all - it's just worthless techno-babble (Chuckbonics).
ROFL
go have smoke, chuck. It's all good.
