CopyImage

BlitzMax Forums/BlitzMax Beginners Area/CopyImage

Almo(Posted 2005) [#1]
Hi!

I've checked the forums and the Wiki. What I'm looking for is recommended techniques for dealing with BMax's non-implementation of CopyImage.


Sledge(Posted 2005) [#2]
Pre-calc with GrabImage.

For example, for this:


I loaded the original image, grabbed each horizontal line into an array then applied some cosine magic to each index*. Max seems to be fairly fast (at throwing things about, that is).

Download. (Temporary)


*(EDIT: More of a stand-in for the kinds of things you might get up to with CopyRect, obv, so BONUS!)


xlsior(Posted 2005) [#3]
You know... I just noticed that there is nothing that makes a stuck pixel on an LCD screen stand out more than a sideway scrolling starfield. :-?


Almo(Posted 2005) [#4]
Thanks for the tip! And I forgot how COOL parallax starfields are! :)

I think BlitzMax will bring Hard Core Game Design back into existence. Will resurrect my Asteroids clone. Already had the basic game working in REALbasic. Then they broke the sprite driver. That was WAY back at version 2.17a, many years ago. It hasn't been vsynced since. I got 4.5, and the 8-bit sprite surface crashed with no sprites! So I got a refund. BlitzMax is what I've been waiting for to do cross-platform development.


Almo(Posted 2005) [#5]
Okay, I'm lookin again. Doesn't GrabImage require getting the pixels from the BackBuffer? So if I load an image, and want to fill it in to an array of image objects, do I have to load it, draw it to the BackBuffer then grab it?


Sledge(Posted 2005) [#6]

So if I load an image, and want to fill it in to an array of image objects, do I have to load it, draw it to the BackBuffer then grab it?



Exactly that.


ImaginaryHuman(Posted 2005) [#7]
Set up and use glCopyPixels()

Having said that it probably uses the CPU. Better off if you can precalculate some of it by using the GrabImage or glCopyTexSubImage2D()


Almo(Posted 2005) [#8]
Okay, thanks guys.