Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Fast Pixel Access/Drawing in Windows Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Craig

July 17, 1999, 02:01 PM

Does anyone know of a way to draw pixels (FAST!) to the screen in windows without the need for OpenGL, DirectX or Glide just C++, Delphi, or maybe even ASM?!??

 
tangent

July 18, 1999, 04:03 AM

Craig wrote:
>>Does anyone know of a way to draw pixels (FAST!) to the screen in windows without the need
>>for OpenGL, DirectX or Glide just C++, Delphi, or maybe even ASM?!??

The fastest way using ordinary Win32 API calls is by using CreateDIBSection().
Another alternate (although slower) is using SetDIBitsToDevice()

Actually, DirectDraw is fairly easy to program with; you should learn how to use that.
DirectDraw allows you to access all of the video modes that the card can handle, allows
you to perform double buffering if you want it, and will use any hardware on the card
if available. This is the best way (by far) if you want to write your own drawing code.
Virtually all video cards will implement DirectDraw.

If you don't want to write for Windows, you can program in VGA modes, or try using VESA modes.
These are not supported by the Windows API and then you would have the equivalent of a
DOS program. You could get DirectDraw going sooner than implementing code for VGA or VESA.

 
Craig

July 18, 1999, 11:08 AM

Thanks tangent. I have programmed quite a bit in DOS in Pascal + ASM(Only a little bit - enough to get me by) but DOS is old hat now.

I have done a little bit of coding in DirectX, Glide(Not much at all) and OpenGL(Can't get it to support hardware - think I have the wrong DLLs).

At the moment I code in Delphi with DelphiX as it's good for throwing ideas to the screen except for pixel access/drawing - it's still too SLOOOOWWW.

Are there any little tricks (in DirectX)- like in the old days where they used ASM - to speed up pixel drawing. Where can I get info on programming Assembler for Win95/98. I have a couple of books on DOS ASM - will these do? PLEASE ANYTHING to speed up pixel drawing?!?

 
Craig

July 18, 1999, 11:10 AM

Thanks tangent. I have programmed quite a bit in DOS in Pascal + ASM(Only a little bit - enough to get me by) but DOS is old hat now.

I have done a little bit of coding in DirectX, Glide(Not much at all) and OpenGL(Can't get it to support hardware - think I have the wrong DLLs).

At the moment I code in Delphi with DelphiX as it's good for throwing ideas to the screen except for pixel access/drawing - it's still too SLOOOOWWW.

Are there any little tricks (in DirectX)- like in the old days where they used ASM - to speed up pixel drawing. Where can I get info on programming Assembler for Win95/98. I have a couple of books on DOS ASM - will these do? PLEASE ANYTHING to speed up pixel drawing?!?

 
gordy

July 18, 1999, 08:28 PM

I made a delphi class that you'll find useful in access pixels in windows, its called TFastBMP you can get it under delphi stuff on my site www.jps.net/gfody

 
Craig

July 19, 1999, 08:38 PM

Thanks gordy. Been to your site and found what may be the solution
to my problem. I'll be having a look at the sources to see what I can
learn.

Thanks.

 
This thread contains 6 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.