|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
rudnei
Joined: 29 Dec 2011 Posts: 34
|
Posted: Wed Oct 08, 2014 3:47 pm Post subject: Program crashing on displaying large quantities of graphics |
|
|
Hi,
I am trying to display a computational map on a rectangular grid; each line has a number of pixels with colours computed by some formula, and I display each line as computed - this is rather like a scan-line conversion algorithm for polygons. Every tenth line I do a flush of the graphics buffer.
On a 400x400 pixels (rather small for my intents), it does not crash but is rather slow. If I try to use 800x800, then the computer hangs (does not respond to mouse events), until finally the program crashes.
I am using v7.00 and running on an HP Compaq 6000 Pro, 4 GB of RAM, Intel Core 2 Duo E8400 with an Intel GMA graphics driver, under Windows 7 Pro, 64-bit.
Any help is appreciated!
Cheers,
Rudnei
________________________________________
do j=0,799
do i=0,799
! computer colour
a%pixels(1,i,0) = char(colour%r)
a%pixels(2,i,0) = char(colour%g)
a%pixels(3,i,0) = char(colour%b)
end do
call display_dib_block@(0,j,a%pixels,a%hres,a%vres,
0,0,a%hres,a%vres,0,0,rslt)
if (mod(j,10)==0) then
call PERFORM_GRAPHICS_UPDATE@( )
end if
end do |
|
Back to top |
|
|
rudnei
Joined: 29 Dec 2011 Posts: 34
|
Posted: Wed Oct 08, 2014 6:02 pm Post subject: |
|
|
The same happened on v7.10...
Rudnei |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Wed Oct 08, 2014 6:03 pm Post subject: |
|
|
Hi rudnei,
I prefer CORE which seems to be very fast and robust. Here's a small example:
Code: | winapp
program test
implicit none
include <windows.ins>
external display
integer*4 j,display,ptr
common /graphics/ ptr
j = winio@('%ca[Test]%ac[Esc]%sc%`gr[user_surface,full_mouse_'
* //'input,rgb_colours]','exit',display,800L,600L,ptr,1L)
end
integer*4 function display()
integer*4 i,j,ptr,pos
common /graphics/ ptr
display = 1
pos = ptr
do i = 1,600
do j = 1,2400,3
core1(pos ) = mod(j,255)
core1(pos+1) = mod(i,255)
core1(pos+2) = mod(i+j,255)
pos = pos+3
end do
end do
call window_update@(ptr)
end
|
Regards - Wilfried
Last edited by Wilfried Linder on Thu Oct 09, 2014 8:48 am; edited 1 time in total |
|
Back to top |
|
|
rudnei
Joined: 29 Dec 2011 Posts: 34
|
Posted: Wed Oct 08, 2014 6:19 pm Post subject: |
|
|
Thanks, Wilfried!
Rudnei |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|