Win32 GDI graphics
Ok , so im writing a simple version of pong for graphics andI have a function I wrote to load a 24 bit targa file into memory. I wrote a function to display them but it is pretty damn slow (Using SetPixel in a loop to draw the image).
So i need a way to blit these things into memory and to do double buffering. I have head pf DIBs and CreateDIBSection() but the code i have seen has confused the hell out of me.
So can someone explain to me
a) what a DIB is , how tthey work and how to use them.
b) how to load raw 24bit RGB data into one
and
c) How to do double buffering
without MFC or C++ because they make my life miserable.
-Thanx , Santonel
quote: Original post by santonel
a) what a DIB is , how tthey work and how to use them.
Take a look here.
quote:
b) how to load raw 24bit RGB data into one
DIB consists of raw data, except it''s DWORD-aligned.
quote:
c) How to do double buffering
This is more of a DC-related topic that a DIB-related one. In short, create a compatible memory DC and do all your drawing over there, and then blit the memory DC to the screen DC in one call.
---visit #directxdev on afternet <- not just for directx, despite the name
on raw data, I also load targa files, and use CreateBitmap() for an hbitmap type. Then you can use select objects, hdc''s, and bitblt functions. Which should be everything you need.
this might help:
http://www.winprog.org/tutorial/
this might help:
http://www.winprog.org/tutorial/
___________________________Freeware development:ruinedsoft.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement