🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #119

fastest way to access screen searched

#119
From: Ulrich Grepel
Date: Tue, 03 Nov 1992 09:53
48 lines
3067 bytes
Hi all,

sorry if that is a newbie question, but without newbies there wouldn't be
any experts...

what is the fastest way to get a bitmap onto the screen (actually a window,
no, actually a view in a window)? At the moment I do it with NXDrawBitmap,
but you can do anything with it's speed but animation. Another drawback
of my usage of NXDrawBitmap is that it doesn't update the screen immediately,
only after returning from the 'run' message the button in the other window
gave to the view.

My situation is as follows:

I have a very fast algorithm to calculate mandelbrot set pictures (about as 
fast as the DSP demo program but in full double precision). It runs around the 
areas of the same 'color' and fills them afterwards. I can calculate the 
picture and then display it, but that's getting quite boring during the 
calculation. I also can plot every single point with postscript, but that's 
even more boring since you get the feeling of an old Commodore 64, programmed 
in Simon's Basic. My solution idea is to plot into my own bitmap, that is very 
fast, and then to update the window regularly (every 1000 plots or every second 
or so). Now I have two problems: NXDrawBitmap is slow (slower than the actual 
mandelbrot calculation if you do not use too deep depths) (is the 
NXBitmapImageRep class any faster? Have not yet tried...) and it is queueing
the screen updates until the calculation is ready and returns from the 'run' 
message. Yes, I have [window flushWindow] messages after the NXDrawBitmap 
calls, but nothing happens.

I could live with a not-early displaying mandelbrot set calculation program, 
but for any kind of game animation based on bitmaps (there's another little 
project to connect different computers playing the same game in the planning 
phase) it is not bearable. Since windows are moved VERY fast around the screen, 
there has to be a way to improve the speed of screen access. Is there perhaps
a fast way to use 'a whole window' without postscript? (Or, almost without,
I wanna have a title bar.)

BTW: My hardware is a mono-slab, I run NeXTSTEP 3.0, the bitmaps of the 
mandelbrot programs are (at the moment) two bits/pixel but could easily be 
adjusted to anything else, even at run time.

If you could answer to any of the above questions, please e-mail me too (no
NeXTmail yet, at least not for fonts...), since it might happen that I skip the 
most important things...

Thanks,

Uli
Technical Details
Message-ID: <1992Nov3.095321.64577@news.th-darmstadt.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!spool.mu.edu!agate!doc.ic.ac.uk!uknet!mcsun!Germany.EU.net!rrz.uni-koeln.de!unidui!math.fu-berlin.de!news.th-darmstadt.de!aida!uli

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!spool.mu.edu!agate!doc.ic.ac.uk!uknet!mcsun!Germany.EU.net!rrz.uni-koeln.de!unidui!math.fu-berlin.de!news.th-darmstadt.de!aida!uli
From: uli@aida.intellektik.informatik.th-darmstadt.de (Ulrich Grepel)
Newsgroups: comp.sys.next.programmer
Subject: fastest way to access screen searched
Message-ID: <1992Nov3.095321.64577@news.th-darmstadt.de>
Date: 3 Nov 92 09:53:21 GMT
Sender: uli@aida (Ulrich Grepel)
Organization: TH Darmstadt
Lines: 48
Nntp-Posting-Host: aida.intellektik.informatik.th-darmstadt.de