TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dean Roddey
from: Michael Duffy
date: 1994-11-21 13:09:46
subject: Re: hpsMemory Bitmap que

-=> Quoting Dean Roddey to Michael Duffy <=-

 DR> Thanks Michael Duffy for your msg about Re: hpsMemory Bitmap ques, on
 DR> Wednesday, 11-16-1994!

 DR> Actually what you want to do is to create a memory device context, use
 DR> that to create a presentation space for that device context, then
 DR> create a bitmap of the size you want, and associate it with the PS.
 DR> Then you can draw into the PS just like drawing to the screen except
 DR> that the output is drawn to the bitmap.
[ more reply and code example clipped... ]

   Thanks for the info, but it appears that I did not make myself completely
clear in my original post.  My mistake.  I am able to create a bitmap, 
associate it to a PS which is associated with a memory DC, and write to it
with the Gpi functions just fine.  I can write this bitmap to the screen
just fine, though I'm still working out kinks in keeping the palette 
correct.  What I cannot do is write directly to the surface of this bitmap
WITHOUT using the Gpi functions.  For example, I am writing sprites to the
bitmap.  The sprites are of my own design, and therefore there are no Gpi 
functions for them.  
   As it stands now, I have my memory bitmap and a buffer of the same size.
I have to write my sprites to the ordinary buffer, and then copy them to the
memory bitmap with GpiSetBitmapBits.  Then I have to copy the memory bitmap
to the screen.  This is a bit too slow, and if I could write my sprites 
directly to the memory bitmap, things would be much faster.  I have a handle
to the bitmap, but that doesn't give me a pointer to its surface where I 
could manipulate its bits directly.  The problem is, I don't even know if
OS/2 allows this to be done at all.
   Does anyone know how IBM planned for people to write PM based games for 
OS/2?  This is not a complaint, but a serious question.  I am finding OS/2 
to be extremely difficult and unweildy to work with as far as sprite based
graphics are concerned, although I now know nothing about DIVE.  The books
I have found on PM programming are of little help in this area. I am working 
on getting the DevCon CD, but it takes time to join the DAP and order the CD,
so I am still documentation-poor.  Does anyone know if game programming (or
fast sprite graphics) is covered in any documentation, DevCon CD or 
otherwise?  I would appreciate any pointers.

Michael "OS/2 is still spanking me" Duffy


... Taglines: Bumber stickers for the Information Superhighway
--- GEcho 1.10+

* Origin: Knight Mare 405 672 5644 (1:147/3006)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 147/3006 1032 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.