[futurebasic] Re: Direct to screen drawing

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: Chris <behmc@...>
Date: Fri, 21 Nov 1997 22:29:58 -0500
>> Alright, I've been playing around with drawing to the screen (not a window,
>> the whole screen) and I've got a question.  I don't have a problem getting
>> stuff to the screen, my problem is getting the system to update the rect.
>> I tried CALL INVALRECT(rect) but that didn't work (not that I expected it
>> to).  I can't think of anything that would tell the system to update
>> off-hand and I couldn't find anything in the manuals.
>
>I've been doing this for a while.  You have to update the windows with
>InvalRect and the desktop and assorted other areas with CALL PAINTBEHIND
>and CALL DRAWMENUBAR.
>
>Just out of curiousity, are you able to draw to video memory in 16 bit
>mode?  I can't seem to puzzle that out, but 8 works fine for me anyway.
>
>I have a code snippet to update the whole desktop and menubar, but windows
>must be done normally.
>

NOTE:  I realized that after I posted this the first time(because I went
and looked up CALL PAINTBEHIND) that you need a window for that to work.
My program has no windows (not even an about window :).  Anyway,  does
anyone know what I'd do in that case?  Also, my drawing code down there
draws to the whole monitor without using windows at all.  I don't know what
it would do if there was a window.

This may sound odd, and maybe even the wrong way to implement it.  But I'm
drawing to the screen in millions by just using this code


CALL OPENPORT(@scrnPort)
CALL SETPORT(@scrnPort)
CALL GETGWORLD(myWorld&,gDevice&)
CALL COPYBITS(#sourceGwolrd&+2,#myWorld&+2,sourceRect,destRect,cMode,0)


That's all I've done to draw directly to the screen in millions.  Note,
scrnPort is not initialized to anything (other than zero).

I'd like to see your code, if you don't mind, but I don't need to update
the whole desktop.  In fact, it would be a really bad idea to update the
whole thing for this app (unacceptable time).  However, even if your code
can't be modified to update anything less than the whole dtop send it
anyway.  I'd like to see how to do that, it's probably gonna be something I
end up needing/using in the future anyway :)

Thanks,
*Chris