Thanks for the quick response.  Can you elaborate a bit more?  I've
never worked with OpenGL before, so I don't know exactly how to start
with that.

I found that I can use the mapped screen directly to generate a
monochrome bitbmap.

   (make-monochrome-bitmap 512 256
     (apply bytes (map (lambda (x) (modulo x 255)) (range (* 512 256)))))

With that I can get rid of the transformation bits->argb-bytes->pict->bitmap.

I saw gl-context but I didn't figure out how to use it the image that
I send to big-bang.

Thanks,
Wanderley

On Tue, Oct 22, 2019 at 8:58 AM Jay McCarthy <jay.mccar...@gmail.com> wrote:
>
> I would use a really simple OpenGL draw call that just draws a
> rectangle and update the texture contents with the screen bits.
>
> --
> Jay McCarthy
> Associate Professor @ CS @ UMass Lowell
> http://jeapostrophe.github.io
> Vincit qui se vincit.
>
> On Tue, Oct 22, 2019 at 6:54 PM wanderley.guimar...@gmail.com
> <wanderley.guimar...@gmail.com> wrote:
> >
> > Hi folks,
> >
> > I decided to write a computer simulator (16-bit machine as the one
> > built in nand2tetris course) in Racket.  The computer maps the screen
> > to a memory space where bits represent the pixel colors (black and
> > white).
> >
> > Right now, I am generating the screen image by converting the bits to
> > a vector of argb pixels and then converting it to bitmap using
> > argb-pixels->pict and then pict-bitmap.  The screen updates 10 frames
> > per second but this conversion bits->bitmap is a bottleneck even in
> > this low rate of update.
> >
> > How would be a better approach for this process?  I can imagine how an
> > incremental approach can be faster by only changing the necessary
> > parts of the image, but my idea of representing the screen as a
> > quadtree sounds too complex to be the right path.
> >
> > Thanks,
> > Wanderley Guimarães
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/CAAmHZocH9NaV2hwvQsi%2B_dXZy%3DT4nkPd-HmwhzTGKABh89kntg%40mail.gmail.com.



-- 
Abraço,
Wanderley Guimarães

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAAmHZoend3%2BS3CPKKnuXR%3D8F5vrG1XA%3Dc3LBFtb%2B2rd5EQbMYQ%40mail.gmail.com.

Reply via email to