Re: Win32Asm and Graphic
From: BSpider (NOSPAMpeterbls_at_o2.pl)
Date: 05/17/04
- Next message: Betov: "Re: sorted equates member-groups"
- Previous message: BSpider: "Re: Vmode question"
- In reply to: Beth: "Re: Win32Asm and Graphic"
- Next in thread: Beth: "Re: Win32Asm and Graphic"
- Reply: Beth: "Re: Win32Asm and Graphic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 17 May 2004 18:47:03 +0200
Użytkownik "Beth" <BethStone21@hotmail.NOSPICEDHAM.com> napisał w wiadomości
news:hVSpc.278$JL5.164@newsfe1-win...
> Gavioli Sara wrote:
> > Hallo to all
> > I've a question for you :-)
> >
> > How I can switch on a pixel on the screen only using MASM,
> without API or
> > Library :-?
>
> In Win32? Not really...
>
> It's all part of the "multi-tasking layered architecture" stuff,
> you see...everything goes via OS and device drivers to be able
> to "regulate" things (as well as provide "portability" because
> modern video cards all do everything differently to one another
> and so any "direct" means would be card-specific :)...the video
> screen is, after all, a _SHARED_ resource between multi-tasking
> programs (wouldn't be too clever if your program is drawing a
> bitmap and some other window is actually at the front and you're
> scribbling all over someone else's window!! That's not a very
> "polite" thing to do to their program now, is it? I mean, if
> their program did it to you, then you wouldn't be too happy
> about it either, eh? Pass it through the OS and the device
> drivers, though, and then these will "regulate" that all the
> windows don't start scribbling all over the place and ruining
> the graphics of some other program ;)...
>
> So, it's part of the design itself that the answer is "no"...and
> modern OSes are all much the same on this point (because, as
> noted, it's to do with "portability" between different hardware
> and regulating accesses in a multi-tasking environment where you
> can't really allow "carte blanche" for any application to write
> anywhere it likes to any hardware device or they'd all bump into
> each other and cause a terrible mess ;)...
>
Well, I'd have to say that you can use DirectX (in fact the Direct Draw
module of DirectX) to enter FULLSCREEN EXCLUSIVE mode, LOCK the primary
screen and simply "switch on or off a pixel on the screen" by storing a
value to the appropriate location (just like you did in the old DOS era).
You only need to retrieve the locked video memory address. Anyway, a better
approach would be to lock the virtual screen of your fliping chain and
simply call the flip function of the DirectDraw interface to change visible
pages. You're still using the Windows API though (in this case the
DirectDraw API).
BSpider
- Next message: Betov: "Re: sorted equates member-groups"
- Previous message: BSpider: "Re: Vmode question"
- In reply to: Beth: "Re: Win32Asm and Graphic"
- Next in thread: Beth: "Re: Win32Asm and Graphic"
- Reply: Beth: "Re: Win32Asm and Graphic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|