Re: Win32Asm and Graphic

From: BSpider (NOSPAMpeterbls_at_o2.pl)
Date: 05/17/04


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



Relevant Pages

  • Re: Direct3D how ?
    ... The managed DirectX API is really just a thin wrapper around the actual DirectX API. ... I believe that with the managed DirectX wrapper, you can use windowed mode rendering and have your rendering done into the window of a Form. ... WPF but I just don't like WPF. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: full screen
    ... so there's no API to 'claim full screen until aplication ... How about DirectX APIs? ... How do I create a full screen top level window, ... but with title bar. ...
    (microsoft.public.pocketpc.developer)
  • Re: D3D10 Rendering Directly onto DWM Surface?
    ... DirectX 10 or DXGI: ... Render a cube onto an RGBA render target. ... without me having to BitBlt from the render target to the Layered Window? ... only the cube can be composed (by DWM) seamlessly with other desktop windows. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: OGL portability and future delivery
    ... it could be a severe impact against OpenGL. ... DirectX is no standardized API. ... DirectX 10 relies on the Windows Driver Model. ...
    (comp.graphics.api.opengl)
  • Re: DirectSound window handle and global focus
    ... The demo program I said worked in the last post also does not work on my ... Do you know of any possible visual studio, directX or windows configuration ... capture sound, even if minimized, or if another window has focus. ...
    (microsoft.public.win32.programmer.directx.audio)