Render to a texture and PNG file without ever rending to the screen

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
tlogre
Gnoblar
Posts: 18
Joined: Tue Oct 03, 2017 7:27 pm
x 1

Render to a texture and PNG file without ever rending to the screen

Post by tlogre »

I have a need to use Ogre-2.0 to create a rendering that goes to a texture and then to a PNG file, all without ever creating a window or rendering to the screen.

Would it be possible to render to a texture without rendering to a screen? If so, can you suggest the best approach or a sample program that I could review?

More info: I am creating a service that accepts 3D data from sensors. I need to render that data using the capabilities that Ogre provides and then save the results to a file for later review. I am working on my rendering in the usual way by creating a program that renders to a window, but in my final implementation, I would like to render to a texture (and then a file) without ever rendering to the screen. My application would have no visual display at all.

I am running on Windows using DirectX11.
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Render to a texture and PNG file without ever rending to the screen

Post by Zonder »

The window is required but it can be hidden see here http://forums.ogre3d.org/viewtopic.php?t=41463
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Ybalrid
Halfling
Posts: 89
Joined: Thu Jul 10, 2014 6:52 pm
Location: France
x 31
Contact:

Re: Render to a texture and PNG file without ever rending to the screen

Post by Ybalrid »

By experience, creating a RenderWindow is mandatory for initializing the RenderSystem. Having the window actually displayed on the screen isn't. But you will not be able to create your render texture before having the Render-system fully initialized.
Ogre_glTF Ogre v2-1 GLTF2 loader : topic link github repo
BtOgre21 Fork of btOgre, for Ogre v2-1 : topic link github repo
OIS Current maintainer : Official repository
Annwvyn VR focused game engine using Ogre : https://github.com/Ybalrid/Annwvyn https://annwvyn.org/
Post Reply