Drawing direct to screen possible?

Previous topic - Next topic

Mike_g

Is it possible NOT to draw to the back puffer but directly to the shown screen?
I wrote a simple fractal program and I want that the user can watch the fractal being drawed.

Thanks in advance for your help!

      - Mike -

Schranz0r

Use a Array to draw?!
Or a Viewport and update every frame?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Moru

#2
USEASBMP should do what you want. Just before each showscreen you call this and it will not clear the background buffer from what you just drew on the backbuffer.

If you have other things like numbers or other text that you update, draw that after you call USEASBMP, then that will be erased before next update since USEASBMP saves what is on screen as a background picture and restores that every SHOWSCREEN, erasing the text you draw after USEASBMP.

If you want to clear the screen, use "BLACKSCREEN"

spacefractal

Uses a off buffer (createscreen), and draw your fractals to that, then draw that buffer to the screen.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

kanonet

CLEARSCREEN -1 might be what you need.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

spacefractal

that will clear the buffer, which he is not intesered in. but you should draw your fractals to a offbuffer and then draw that buffer to the onscreen as sprite. Its property the best way.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Qedo


Mike_g

Quote from: kanonet on 2013-Oct-31
CLEARSCREEN -1 might be what you need.

This works fine for Windows, but when I compile to MacosX or Android and run the app only crap and flickering  is displayed on the screen.

Is there another way to do this, working on all platforms (especially Android)

           - Mike -

Mike_g

Quote from: spacefractal on 2013-Nov-01
that will clear the buffer, which he is not intesered in. but you should draw your fractals to a offbuffer and then draw that buffer to the onscreen as sprite. Its property the best way.

This is working well on all platforms - thank you!

         - Mike -

kanonet

If you have problems with CLEARSCREEN -1 on some platforms, then this may be a bug in GLB? Im not sure about this, can someone help?
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64