Silverfrost Forums

Welcome to our forums

Program crashing on displaying large quantities of graphics

8 Oct 2014 2:47 #14789

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
8 Oct 2014 5:02 #14790

The same happened on v7.10... 😦

Rudnei

8 Oct 2014 5:03 (Edited: 9 Oct 2014 7:48) #14791

Hi rudnei,

I prefer CORE which seems to be very fast and robust. Here's a small example:

      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

8 Oct 2014 5:19 #14792

Thanks, Wilfried! Rudnei

Please login to reply.