Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

granat

GDI GetPixel not supported.........

This topic is 6705 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It says in the MSDN library that the GDI-functions SetPixel & GetPixel are not supported by all devices. That sucks!! It guess only very old cards will not support these functions ?? (like 1 mb cards???)

Share this post


Link to post
Share on other sites
Advertisement
I think the devices mention in MSDN that don''t support are something like printers/plotters.
Other than that, I believe every graphics card support GetPixel/SetPixel.

PS: Anyone, do printers/plotters support GetPixel/SetPixel?

Share this post


Link to post
Share on other sites
Dot-matrix printers definitely won't support it, due to their sequential nature.

Plotters should be able to support it, and I don't see why laser printers can't, either. Both of these provide some "random access" to the page.

Who can tell? Even if the fundamental technology supports them in theory, the manufacturers and/or driver writers might not care to.

Maybe Microsoft have crippled the printer areas of GDI to not allow it. One way to definitely allow it would be to build the printer output on an in-memory GDI bitmap, then Blt that to the printer DC.

None of this relates to DirectX/OpenGL, though. In DirectDraw, you can call GetDC on a surface, and the returned GDI device context does support GetPixel/SetPixel, always.

Slowly, of course. 1) because GetDC and ReleaseDC do internal forms of Lock and Unlock, and 2) because GetPixel/SetPixel work with COLORREFs, which are always 24bit (4 bytes, one of which is always 0), and so have to do conversion to/from the surface pixelformat.

It should be possible to write your own asm GetPixel/SetPixel which are considerably faster than the GDI alternatives, although I don't really know, because I don't do asm, having got bored of 68k asm at Uni. I think I might have to pick x86 asm up soon, though.

TheTwistedOne
http://www.angrycake.com

Edited by - TheTwistedOne on 4/12/00 6:36:30 AM

Edited by - TheTwistedOne on 4/12/00 6:38:09 AM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!