1. Graphics buffer
- Posted by Adam Weeden <theskaman at MINDSPRING.COM>
May 02, 1999
-
Last edited May 03, 1999
I have this program that uses regular pixel routines to put pixels on the
screen to test for speed. This causes a flicker. I then used a double
buffer. This caused even more flicker. I then added a wait for a verticle
retrace function (borrowed from Mic's mode 19 machine code library.....Thanx
Mic). No help. Am i doing something wrong?
Adam Weeden
WeedenSoft Technologies
2. Re: Graphics buffer
- Posted by Grape Vine <chat_town at HOTMAIL.COM>
May 02, 1999
-
Last edited May 03, 1999
this code by Nitrogen 2000
<code start>
--src is: {address, width, height} to copy from
--dest is: {address, width, height} to copy to.
--pos is: {x, y} position to start copy
global procedure copy_part(sequence dest, sequence src, sequence pos)
atom s, d
d = dest[1]
s = src[1] + pos[1] + (pos[2] * src[2])
for i = 1 to dest[3] do
mem_copy(d, s, dest[2])
d += dest[2]
s += src[2]
end for
end procedure
--test code:
------------
include machine.e
include graphics.e
atom big_vs
big_vs = allocate(1000 * 750)
object temp
--Make a crappy pattern.
puts(1,"Please wait while i make a pattern...[ ]")
temp = big_vs
for y = 0 to 749 do
for x = 0 to 999 do
poke(temp, x*y)
temp += 1
end for
position(1,39)
print(1, floor(100/749 * y))
puts(1,'%')
end for
temp = graphics_mode(19)
--Move around a bit.
for i = 1 to 300 do
copy_part({#A0000, 320, 200}, {big_vs, 1000, 750}, {i, i})
end for
for i = 300 to 1 by -1 do
copy_part({#A0000, 320, 200}, {big_vs, 1000, 750}, {i, 300})
end for
for i = 300 to 1 by -1 do
copy_part({#A0000, 320, 200}, {big_vs, 1000, 750}, {1, i})
end for
<code end>
>From: Adam Weeden <theskaman at MINDSPRING.COM>
>Reply-To: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU>
>To: EUPHORIA at LISTSERV.MUOHIO.EDU
>Subject: Graphics buffer
>Date: Sun, 2 May 1999 23:56:26 -0400
>
>I have this program that uses regular pixel routines to put pixels on the
>screen to test for speed. This causes a flicker. I then used a double
>buffer. This caused even more flicker. I then added a wait for a verticle
>retrace function (borrowed from Mic's mode 19 machine code
>library.....Thanx
>Mic). No help. Am i doing something wrong?
>
>Adam Weeden
>WeedenSoft Technologies
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
3. Re: Graphics buffer
I'm not much of a graphics expert, but perhaps you should try copying directly
the video memory.
EUPHORIA at LISTSERV.MUOHIO.EDU wrote:
> I have this program that uses regular pixel routines to put pixels on the
> screen to test for speed. This causes a flicker. I then used a double
> buffer. This caused even more flicker. I then added a wait for a verticle
> retrace function (borrowed from Mic's mode 19 machine code library.....Thanx
> Mic). No help. Am i doing something wrong?
>
> Adam Weeden
> WeedenSoft Technologies
--
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/
4. Re: Graphics buffer
I was, I found the problem, in my program, I was calling the clear_screen()
routine (causing the flicker). Once I removed it, I was fine.
----- Original Message -----
From: Jeffrey Fielding <JJProg at CYBERBURY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, May 03, 1999 6:33 AM
Subject: Re: Graphics buffer
> I'm not much of a graphics expert, but perhaps you should try copying
directly
> the video memory.
>
> EUPHORIA at LISTSERV.MUOHIO.EDU wrote:
>
> > I have this program that uses regular pixel routines to put pixels on
the
> > screen to test for speed. This causes a flicker. I then used a double
> > buffer. This caused even more flicker. I then added a wait for a
verticle
> > retrace function (borrowed from Mic's mode 19 machine code
library.....Thanx
> > Mic). No help. Am i doing something wrong?
> >
> > Adam Weeden
> > WeedenSoft Technologies
>
> --
> Jeffrey Fielding
> JJProg at cyberbury.net
> http://members.tripod.com/~JJProg/
>
>