Q: Using projection_matrix on CR server node?
"David L. Page" <[email protected]> Fri, 20 Jun 2008 10:22:59 -0400
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============2095273854==
Content-Type: multipart/alternative;
boundary="----=_Part_6525_26330599.1213971779415"
------=_Part_6525_26330599.1213971779415
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I am over writing the projection matrix as the following python code
(snippet) below illustrates.
My motivation is that I want to have some more control over the projection
matrix for a tiled display. Currently, with the first code, the projection
matrix seems to be set and rigid, despite what happens to the projection
matrix in the application. However, I need to configure the projection
matrix specific to my wall display, but I also need some flexibility for it
to adjust on the fly via the application.
===begin snippet
renderspu = SPU( 'render' )
node = CRNetworkNode( "server%d" % id, "dynamic" )
node.Conf('optimize_bucket', 0)
node.AddTile( 0, 0, view.col, view.row )
p = CRMatrix()
p.Frustum( x_left, x_right, y_bottom, y_top, z_near, z_far )
node.Conf('projection_matrix', p.ToList())
node.AddSPU( renderspu )
cr.AddNode( node )
=== end snippet
My question is what if I created a "viewspu" that did the samething.
Basically, this new spu would intercept OpenGL calls that modified the
projection matrix (i.e. glOrtho, glFrustum, glScale, glRotate, etc.) and
force the projection matrix to remain as the one specified. The new python
code would look something like the following:
===begin snippet
viewspu = SPU('view')
renderspu = SPU( 'render' )
node = CRNetworkNode( "server%d" % id, "dynamic" )
node.Conf('optimize_bucket', 0)
node.AddTile( 0, 0, view.col, view.row )
p = CRMatrix()
p.Frustum( x_left, x_right, y_bottom, y_top, z_near, z_far )
viewspu.Conf('projection_matrix', p.ToList())
node.AddSPU( viewspu)
node.AddSPU( renderspu )
cr.AddNode( node )
=== end snippet
--
David L. Page
[email protected]
865.607.8192
------=_Part_6525_26330599.1213971779415
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div> </div>
<div>I am over writing the projection matrix as the following python code (snippet) below illustrates.
<div> </div>
<div>My motivation is that I want to have some more control over the projection matrix for a tiled display. Currently, with the first code, the projection matrix seems to be set and rigid, despite what happens to the projection matrix in the application. However, I need to configure the projection matrix specific to my wall display, but I also need some flexibility for it to adjust on the fly via the application.</div>
<div> </div></div>
<div> </div>
<div>===begin snippet</div>
<div> </div>
<div>renderspu = SPU( 'render' )<br>node = CRNetworkNode( "server%d" % id, "dynamic" )</div>
<div>node.Conf('optimize_bucket', 0)<br>node.AddTile( 0, 0, view.col, view.row )<br>p = CRMatrix()<br>p.Frustum( x_left, x_right, y_bottom, y_top, z_near, z_far )<br>node.Conf('projection_matrix', p.ToList())<br>
node.AddSPU( renderspu )<br>cr.AddNode( node )<br clear="all"></div>
<div>=== end snippet<br></div>
<div>My question is what if I created a "viewspu" that did the samething. Basically, this new spu would intercept OpenGL calls that modified the projection matrix (i.e. glOrtho, glFrustum, glScale, glRotate, etc.) and force the projection matrix to remain as the one specified. The new python code would look something like the following:</div>
<div> </div>
<div>
<div>===begin snippet</div>
<div> </div>
<div>viewspu = SPU('view')</div>
<div>renderspu = SPU( 'render' )<br>node = CRNetworkNode( "server%d" % id, "dynamic" )</div>
<div>node.Conf('optimize_bucket', 0)<br>node.AddTile( 0, 0, view.col, view.row )<br>p = CRMatrix()<br>p.Frustum( x_left, x_right, y_bottom, y_top, z_near, z_far )<br>viewspu.Conf('projection_matrix', p.ToList())<br>
node.AddSPU( viewspu)</div>
<div>node.AddSPU( renderspu )<br>cr.AddNode( node )<br clear="all"></div>
<div> </div>
<div>=== end snippet</div></div>
<div> </div>
<div>-- <br>David L. Page</div>
<div><a href="mailto:[email protected]">[email protected]</a><br>865.607.8192<br></div>
------=_Part_6525_26330599.1213971779415--
--===============2095273854==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--===============2095273854==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Chromium-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-dev
--===============2095273854==--