WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 11-21-2012, 08:42 AM
Timbuntu Timbuntu is offline
Join Date: Mar 2012
Posts: 5
Saving renderTexture


I am trying to save the content of a renderTexture to a file.
I basically use code from the examples as listed further down my post.
Everytime I call"test") i get an error message that tells me that there is no data in the image.
* ERROR: Texture does not contain image data, cannot save to file 'test'
Any hints on what I am doing wrong?
I also put the texture on a quad to see if there is actually something going wrong, but the desired render is diplayed fine on the quad.
Here is my code:
                # Create render texture for sending screenshots
                self.renderTexture = viz.addRenderTexture()
                # Create render node as camera
                self.renderNode = viz.addRenderNode(size=(800,600))
                # Do not inherit view/projection settings from main window
                # Set FOV for renderTexture camera
                # Render to renderTexture feed texture
                #NOTE: I also tried renderNode.setTexture here, but that didn't work either

                # Only render once per frame, in case stereo is enabled
                #add a texture quad
                quad = viz.addTexQuad()
                #add the rendertexture to the texturequad
                quad.texture( self.renderTexture )
                #position the texture quad
                #NOTE: The texture renders fine on the quad
                #This call fails with above error
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving as a WRL Andrey Vizard 6 05-15-2008 10:03 AM
saving the scene giancamati Vizard 1 12-21-2006 09:25 AM
saving the position poolshark Vizard 3 09-26-2003 01:57 PM

All times are GMT -7. The time now is 02:10 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC