[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    Re: [Mesa3d-dev] Capturing 3D geometries
From:       Brian Paul <brian.paul () tungstengraphics ! com>
Date:       2006-01-18 15:11:48
Message-ID: 43CE5AB4.9070305 () tungstengraphics ! com
[Download RAW message or body]


Which coordinate space do you want to get your geometry in?

Vertex programs produce vertices in clip coordinates (after the 
modelview and projection transformations).  So even if you could 
capture coords immediately after the vertex program, you may have to 
apply an inverse transformation to get what you want.

If you're not sure about coordinate spaces, see section 2.10 of the 
OpenGL specification.

Another possibility that occurs to me would be to write a new 
extension to the feedback mechanism that returns coordinates in clip 
space, before clipping and perspective division.

-Brian


Michael Frumin wrote:
> you're right.  that worked, but it turns out the FeedbackBuffer is not 
> the approach I'm looking for.  there's no Z-depth because its in screen 
> coordinates, and it clips everything to the viewing frustum, as opposed 
> to giving me polygons _before_ clipping and flattening.
> 
> will maybe pursue the re-use of Mesa vertex program processing.
> 
> thanks,
> mike
> 
> On 1/17/06, *Brian Paul* < brian.paul@tungstengraphics.com 
> <mailto:brian.paul@tungstengraphics.com>> wrote:
> 
>     Michael Frumin wrote:
>      >
>      >
>      > On 1/17/06, *Brian Paul* <brian.paul@tungstengraphics.com
>     <mailto:brian.paul@tungstengraphics.com>
>      > <mailto:brian.paul@tungstengraphics.com
>     <mailto:brian.paul@tungstengraphics.com> >> wrote:
>      >
>      >     Michael Frumin wrote:
>      >      > I am attempting to capture 3D geometries from OpenGL
>     applications for
>      >      >
>      >
>      >     Have you looked at OpenGL's feedback feature?  It lets you
>     capture
>      >     OpenGL geometry after it's been transformed to screen space,
>     before
>      >     rasterization.
>      >
>      >
>      >
>      > Wow, I wish I had known about that earlier.  That's a great idea, in
>      > fact it was super easy to rig something up to capture the whole
>     buffer.
>      > Any suggestions as to how to easily build a parser for the binary
>     string
>      > returned in the buffer, that is structured according to the
>     grammar at:
>      >
>     http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html
>      >  (preferable in windows, but *nix would be fine just to see how
>     it works)?
> 
>     You don't really need a parser.  I think that a switch statement with
>     some loops (over the polygon vertices) would suffice.
> 
>     -Brian
> 
> 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic