View Single Post
Old 22 March 2023, 14:38   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,245
Quote:
Originally Posted by mateusz_s View Post
Issue no #1
So to copy my output frame buffer to wb public window I am using:

Code:
WritePixelArray(output_buffer_32, 0, 0, bytes_per_row, FRM_window->RPort, 0, 0, output_width, output_height, output_pixel_format );
I am not sure how to make double or triple buffer. Because when using WritePixelArray(..) I am blitting to the Window Rastport.
That does not "blit" anything. It uses the CPU to copy data, on native screens even a chunky to planar conversion is involved. The problem is that the source array is either not in a mode the native Amiga graphics support, or is not on board of the graphics card to use a VGA accelerator for the conversion.


If you want to render directly to a graphics card, you need to use the P96 API in one way or another, such as allocating a bitmap on the board, then lock the bitmap, render into it, then copy it to the target. That would then use the native blitter (if there is one).


Quote:
Originally Posted by mateusz_s View Post
How can I add second or third buffer? And how can I have synced blitting using two buffers. In previurs modes I was using RethinkDisplay() for double buffering with success. I am not sure what to do in this case - I mean I got only public window without the screen.
The workbench screen has obviously only a single screen frame buffer, so there is no double buffering. If you want double buffering, you need to open a screen on your own, and use the intuition API for double buffering. There is example code in the RKRMs how to do that.




Quote:
Originally Posted by mateusz_s View Post

Issue no #2
How can I protect the cursor not to leave my window?
You don't. This is very intrusive, and very unfriendly to the user. If you want to have a "display of your own", the right abstraction is a screen, not a window.


Quote:
Originally Posted by mateusz_s View Post

I can move mouse free to move the view, but if the cursor will be outside my window,

and I press "left-button" I will lost the focus from my window and I will "back" to workbench.
That is exactly what windows are meant for, namely that users can leave them *at their own will*, and can redirect the input focus to another window if they feel like.
Thomas Richter is offline  
 
Page generated in 0.09023 seconds with 11 queries