Hi all

I have been reading this great messageboard for
some time now and joined today. Now I can also
ask questions around here :grin:

Back in DOS days you simply switch the screen to mode 13h
via a DOS interrupt and then move data to segment A000h
to plot pixels.

Now I can't figure it out with Win32ASM. I want to switch
to 800x600 16bit and start plotting pixels. Should I use
DirectDraw, OpenGL or GDI. I also don't know how to use
these because the tutorials are very complicated. Can someone
point me to a simple DirectDraw template that switch the screen
to 800x600 and a simple line for how to put a pixel on the
screen?

Regards
Posted on 2002-05-22 03:51:05 by Logan
Back in the Dos days, everything was simple enough to allow writes to the video memory at 0a000h.

Now because hardware is much more complicated there has to be a 'layer' that sits in between the display hardware and your application (otherwise your software would have to support all hardware) which 'insulates' the managment of the hardware and provides simplfied methods of getting things done.

GDI and DirectX are both one of those 'layers' (but I recommend you start with GDI as DirectX requires a more advanced level of programming and a understanding of GDI). OpenGL is something else.

However GDI only really allows painting and drawing not things like changing screen resolution but its probably the best place to make a start.
Posted on 2002-05-22 04:40:32 by huh
you CAN plot pixels with a little mov [...], COLOR...
in windows you need a device-independant-bitmap
for this but it isn't that complicated...

i attached my a little starscroller written for win32asm.
this was my first experience so it's very messy... the
drawing routine isn't located in a thread so there's a
little flickering effect but it isn't hard to put everything
in a thread if you understand how DIB works...

BTW: it's uncommented and i'm using a really dumb
way to slow down the whole thing... if you don't get
it i would rewrite it for you but at this time i'm very busy
so... :(
Posted on 2002-05-22 06:19:42 by mob
Thanks a lot!

I will look at the example and other things
you have posted. :alright:
Posted on 2002-05-22 06:56:28 by Logan
Go with DirectDraw. It's faster, and not really that hard. Besides,
write the setup and handling code once, and you can reuse it for
later projects.
Posted on 2002-05-22 07:11:05 by f0dder
HERE is an example of ploting with DX8.
Posted on 2002-05-22 07:59:35 by bitRAKE