View Full Version : How to implement this?
11-23-2005, 01:48 PM
I need to code such thing: there is a wide ribbon that moves top-down, there is an interactive background under it. I'd like that there where a horizontal stripe in the top and bottom of the screen, where thar ribbon would be invisible, so I could see background.
Damn, sounds rough :) Can't find words to describe it ;]
Intriguing! But I must confess that I don't fully understand what you're attempting. Is there something you can compare it to, that's similar to your situation? :)
All I can think of is some sort of alpha-blending thing, or something.
Do it all in a 2D orthogonal view, use some depth and some blending: draw the background first, then your ribbon (supposedly textured) and finally your stripes.
Hope that helps.
11-24-2005, 06:19 AM
First draw your background. Then you can use the scissor test to define a rectangle where the drawing should happen, outside the rectangle nothing will be drawn.
This way you can "cut" your ribbon (whatever that is ;) ) so that in the top and bottom part of the screen you still see the background. If you need more complex shapes than a screen space rectangle, you should use the stencil test.
I'm not sure I correctly understood what you're trying to do :rolleyes:
11-24-2005, 08:59 AM
Scissor! Of course.
That will do fine.
Thanks a lot!
With best regards. Daniel.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.