scrolling graphics ?

BlitzMax Forums/BlitzMax Beginners Area/scrolling graphics ?

rod54(Posted 2005) [#1]
Probably a dumb question but is it possible in BMAX to setup a larger screen image area than you can see in a current view and then scroll the image by changing a location in memory that points to where graphic memory starts other than having to move graphic images around?


rod54(Posted 2005) [#2]
Gee not even an answer after 18 hours hmmmm guess it was a stupid question


Bremer(Posted 2005) [#3]
You should be able to load a huge image and then use DrawImageRect from the max2d module I would think.


rod54(Posted 2005) [#4]
Thanks zawran... you have some awesome demos.

will give it a try..


Bremer(Posted 2005) [#5]
Thanks zawran... you have some awesome demos.


Thanks, hopefully soon I will be making some demos with Bmax as well using openGL :)


SoggyP(Posted 2005) [#6]
Greetings Puppies,

Have you seen the setorigin command, I *think* it's what you're after. I'll try and post some code later.

Peace,

Jes


ImaginaryHuman(Posted 2005) [#7]
You are talking about hardware scrolling where you instruct the graphics hardware to read the image data from a specific address and to turn that into a visible picture signal. No it's not a standard OpenGL feature and is only supported by a handful of graphics cards. It was a feature on the Amiga, but is not in BlitzMax.

Considering the general speed of graphics cards today you shouldn't have any problem re-drawing the whole screen every frame.


rod54(Posted 2005) [#8]
Angel.... YEs takes me back to the old amiga days...

Why would they not keep that flexibility seems that is a lot faster then moving the data, I know cards are fast now but still one has to go through all the code of moving the
image vice repointing where grahics memory starts.

Thanks everyone.


ImaginaryHuman(Posted 2005) [#9]
The Amiga definitely had its efficiencies and clever graphics techniques.

I wouldn't worry too much about having to be as efficient with your graphics, these days the gfx cards and CPU's are fast enough that you should be able to redraw the whole display every frame without it slowing down.

One thing you might consider is making your own scroller that splits the backbuffer into 4 quadrants and draws all objects in 4 parts, which could then instead of doing a Flip, could copy the backbuffer to the front buffer to display it in its non-split arrangement. That might be faster if you can be pixel-perfect about your rendering.