BlitzPlus Question-Draw directly on FrontBuffer()?

Blitz3D Forums/Blitz3D Beginners Area/BlitzPlus Question-Draw directly on FrontBuffer()?

maneesh(Posted 2005) [#1]
Hello, I cannot post in the BlitzPlus forum, so I am posting here.

I am writing a program where I try to draw something directly on the frontbuffer, using SetBuffer FrontBuffer(). However, when I do that, nothing at all appears on the screen. The only way for me to get something except a blank screen is to get rid of the line and use Flip, but that draws on the BackBuffer().

Can you tell me a way to draw on the FrontBuffer()? I want the bad animation and the other pitfalls that come with it, this demo is for demonstration purposes.

Thanks

-Maneesh


RiverRatt(Posted 2005) [#2]
; FrontBuffer()/Rect Example

; Engage graphics mode
Graphics 640,480,16

; Set the drawing buffer to front - instant drawing ops!
SetBuffer FrontBuffer()

; Repeat this until user presses ESC
While Not KeyHit(1)
; Set a random color
Color Rnd(255),Rnd(255),Rnd(255)
; Draw a rectangle at a random location, with a random width and height
; plus randomly choose if the rectangle is solid or just an outline
Rect Rnd(640),Rnd(480),Rnd(50),Rnd(50),Rnd(0,1)
; Blitz is so dang fast, we need a delay so you can watch it draw!
Delay 10
Wend


I don't have blitz plus but does this code from b3d docs not work?


maneesh(Posted 2005) [#3]
This code does not work. You cannot see anything in real time updating. When you close the program, for a brief instant you can see the rectangles, but that is only because focus is given to the window. Is there a way to allow you to see it updated in real time using the FrontBuffer()?

Thanks

-Maneesh


Floyd(Posted 2005) [#4]
There is no true front buffer in BlitzPlus. FrontBuffer() is just another name for BackBuffer()

You can see graphics in the example code by running in a window:

Graphics 640,480,0,2



WolRon(Posted 2005) [#5]
Why can't you post in B+ forum?


Dazman(Posted 2005) [#6]
Presumably because he only has the demo version of BlitzPlus?


WolRon(Posted 2005) [#7]
OH THE IRONY!


Dazman(Posted 2005) [#8]
LOL