View Full Version : Feedback when out of window(post before)
03-20-2002, 05:37 AM
(This one was post on Advanced Forum before, but they said it is to simple to be post there, therefore I post it again here. If you saw it on another forum, just ignore this one. Sorry for crossing-post)
If I draw two points, the first one is out of the window, the second one is inside the window. In FEEDBACK mode, what are the values in feedback buffer?
1. Slot one: wrong value of point1
Slot two: right value of point2
2. Slot one: right value of point2
Slot two: no value
What one is right? Or they are both wrong?
03-20-2002, 06:43 AM
If I understood the spec correctly (section 5.3), feedback happens after culling, polygon decomposition and clipping. More specifically, it says "While in feedback mode, each primitive that would be rasterized ...".
While I think the language is a bit muddy, I'd interpret it so, that case 2 of your example will happen.
When in doubt, it may be wise to just test the mechanism by implementing your example and checking the results.
Hope this helps http://www.opengl.org/discussion_boards/ubb/smile.gif
03-20-2002, 09:19 AM
I have not used feedback, but the documentation suggests that case 2 of your example would be correct. Something like point one would be clipped before it could reach the feedback buffer.
If it helps you can use a passthrough marker between the drawing of point one and two to test. In the results a value before the marker represents point one and a value after the marker represents point two.
[This message has been edited by Furrage (edited 03-20-2002).]
03-20-2002, 11:53 AM
Actually I have many points in my view and I need there screen coodinates. If all the points are in the view, then in a loop, we can get the information from feedback buffer easily through a right increment. However, if some points are out of the window, then the sequence of points in the buffer is totally messed up. Even if we use markers to seperate these points, it becomes a little bit tricky to track these markers. Does anyone have some idea to solve the problem elegantly?
03-21-2002, 04:15 AM
Based on the documentation in the redbook, markers are the way elements are tracked in feedback. Hopefully, someone else can give you a better way. Otherwise its back to maths and trig and data structures to represent your drawing elements, viewing volume, etc.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.