rolling screen
BlitzMax Forums/BlitzMax Programming/rolling screen
| ||
I have an urgent need for a routine to roll the screen in the y axis, I need to convince the viewer they are looking at a tilted screen. Here is what I am trying to acheive, any ideas? |----------| |----------| |----------| |----------| |----------| frame 0 |----------| |----------| |----------| frame 1 |----------| frame 2 |
| ||
i can only think of... use render to texture on a cube, (sleptos version of minib3d?) use opengl to do a transform, (have a look at minib3d to see how to switch states) |
| ||
Draw the image twice. Heres pseudo code (assumes handle top left of image) Drawimage Image1, 0, topY Drawimage Image1, 0, topy - imageheight(image1) topy:+4 ' scroll down if topy > (height of the screen) then topy = 0 ' reset to the top of the screen endif get the idea ? |
| ||
Draw the image twice. Or just use TileImage and reset the y coord when it is greater than the image height. |
| ||
Re: TileImage: "Its viewport dependent and you can't rely on that working on all hardware" http://www.blitzbasic.com/Community/posts.php?topic=80113#900189 |
| ||
Guess rolling was not that good a description. I did'nt mean scrolling. I have edited the frames in the first post to give a better description, hopefully. Thanks for trying to answer though. the minib3d thing sounds interesting will have a look at that. |
| ||
Hi Nigel, if you have access to B3D there is a sample in the 2D section that does what I think you are looking for. The example is called 5 screen FX (or similar) and the one you want is called drag and stretch. Sorry, I do not have access to it at the moment but maybe someone would be kind enough to post it if you do not have it yourself. It is purely 2D code but looks 3D. Hope this helps, Jason. |
| ||
QuickSilva, I have B+,B3D,BMAX but not able to find "Samples\Blitz 2D Samples\5screenfx\5fx.bb" Anyone help? |
| ||
I have the CD version, maybe it wasn`t included with the download version if you are using that? Check your email :) Jason. |
| ||
minib3d doesnt need kleptos version to do render to texture, I just looked at the samples |
| ||
QuickSilva, thanks that works exactly as I had wished for and its fast. Even when converted to run under BMAX :-) |
| ||
Now I need to grab a screen image as an AnimImage or convert the image I grab in the following code: Local image:TImage = CreateImage( screenWidth, screenHeight, 1 ) GrabImage(image, 0,0) I need to then convert the image( screenWidth, screenHeight, 1 ) to AnimImage( screenWidth, 1, screenHeight ) is this possible? |