very low-level graphic programming
Hi all,
I need something really non-common... I just need a "system" that I can read and/or write in a buffer (char* for exemple) et then once I''ve finish to manipulate my buffer, tu flush it to the screen in "one-time", exactly like X11 programming using images, but I need it for Windows programming... I don''t want any acceleration, SDL, OpenGL or other is useless for me.
please, if someone know how to do, very very easily please (everybody say directdraw is easy but every tuts about it contains too much things useless and then its horrible to learn) if that I want is possible with GDI Developpement or other, I''m here to get your answer
thank you very much
bye bye
La femme est le chef-d''''oeuvre de Dieu, surtout quand elle a le diable au corps
La femme est le chef-d''oeuvre de Dieu, surtout quand elle a le diable au corps
hi
look into SetDiBits()
basically what you have to do is:
- create a memory dc ( CreateCompatibleDC() )
- create a bitmap and select it into the dc ( CreateCompatibleBitmap, SelectObject ( memorydc, bitmap) )
now you can just write the color data into a buffer (BGR, bottom-up) and use SetDiBits to get the buffer onto the memory dc, and the BitBlt from this memory dc to a visible surface
this is AFAIK the fastest(only) way to do what you want with GDI
Runicsoft -- home of my open source Function Parser and more
look into SetDiBits()
basically what you have to do is:
- create a memory dc ( CreateCompatibleDC() )
- create a bitmap and select it into the dc ( CreateCompatibleBitmap, SelectObject ( memorydc, bitmap) )
now you can just write the color data into a buffer (BGR, bottom-up) and use SetDiBits to get the buffer onto the memory dc, and the BitBlt from this memory dc to a visible surface
this is AFAIK the fastest(only) way to do what you want with GDI
Runicsoft -- home of my open source Function Parser and more
Burning_Ice, could you write me the code plz ? juste the smaller and easier as you can please, I don''t know GDI Programming and just that to help me will be very usefull...
you can mail me at fatalis@ifrance.com
thanx
you can mail me at fatalis@ifrance.com
thanx
La femme est le chef-d''oeuvre de Dieu, surtout quand elle a le diable au corps
This forum isn''t for having your code written for you,
it''s to help you work out how to solve problems.
Read up on SetDiBits(), and work out how to use it.
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
it''s to help you work out how to solve problems.
Read up on SetDiBits(), and work out how to use it.
--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.
AFAIK the preferable way to do this in Win32 in to use DIB section.
See this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_233i.asp
The void* pointer passed as the ppvBits will point to the buffer which format you choose by setting the pbmi.bmiHeader.biBitCount field.
See this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_233i.asp
The void* pointer passed as the ppvBits will point to the buffer which format you choose by setting the pbmi.bmiHeader.biBitCount field.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement