You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3433 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: John Whitington
Version: 3.08 (Windows/mingw)
OS: Windows 2000
Submission from: cpc2-cmbg6-6-0-cust140.cmbg.cable.ntl.com (81.104.214.140)
Dear all,
I have an application which provides debug output using the OCaml Graphics
module. I'm outputting thousands of partial scanlines (represented by a
Graphics.image of height one row and widths from as small as one column) per
second from my renderer.
This works initially but after a few seconds the little images are drawn only
erratically, and then frequently the entire screen (i.e outside the Caml window
as well) goes black, and the Windows furniture / icons are drawn over the top of
this black. The program continues to run, however. It seems there is corruption
of some kind. The two salient features of the input data are small images and
high data rates.
I can try to put together a minimal example if required.
Cheers,
John Whitington
The text was updated successfully, but these errors were encountered:
Sorry for sending this direct -- I can't work out how to add it to the
previous
bug report.
The attatched code opens a graphical window, and redraws an object at
the
current cursor position on Graphics.Poll.
When I run it (under Windows)
(a) The object sometimes doesn't appear, giving a flickering effect
(This is
actually images not being drawn, rather than flicker due to update,
since we're
using manual syncronisation of the frame buffer)
(b) Resizing or moving the window can cause corruption of the screen
(mostly
turning black and Windows redrawing things wrongly)
Cheers,
John
--
John Whitington
(* Minimal Example for bug 3433 )
( Compile with support for Graphics library *)
type scanline = Graphics.color array
type sprite = scanline list
let example_scanline w =
Array.init w (fun i -> Graphics.rgb 128 128 (255 - (w * 2)))
let rec example w =
match w with
0 -> []
| _ -> (example_scanline w)::example (w - 1)
let plot_scanline x y l =
let image = Graphics.make_image [|l|] in
Graphics.draw_image image x y
let rec plot_sprite x y spr =
match spr with
[] -> Graphics.synchronize ()
| l::ls -> plot_scanline x y l; plot_sprite x (y + 1) ls
let mine = example 100
let _ = Graphics.open_graph " 400x400"; Graphics.auto_synchronize false
Original bug ID: 3433
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: John Whitington
Version: 3.08 (Windows/mingw)
OS: Windows 2000
Submission from: cpc2-cmbg6-6-0-cust140.cmbg.cable.ntl.com (81.104.214.140)
Dear all,
I have an application which provides debug output using the OCaml Graphics
module. I'm outputting thousands of partial scanlines (represented by a
Graphics.image of height one row and widths from as small as one column) per
second from my renderer.
This works initially but after a few seconds the little images are drawn only
erratically, and then frequently the entire screen (i.e outside the Caml window
as well) goes black, and the Windows furniture / icons are drawn over the top of
this black. The program continues to run, however. It seems there is corruption
of some kind. The two salient features of the input data are small images and
high data rates.
I can try to put together a minimal example if required.
Cheers,
John Whitington
The text was updated successfully, but these errors were encountered: