# Latest on command line GL rendering

**URL:** <https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890>\
**Category:** Using Cinder\
**Created:** [October 6, 2017, 1:05am UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890 "2017-10-06T01:05:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![heisters](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/heisters/32/462_2.png) [@heisters](https://discourse.libcinder.org/u/heisters)\
**Post date:** [October 6, 2017, 1:05am UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890/1 "2017-10-06T01:05:28Z")

</div>

What’s the latest is on being able to run Cinder in an offscreen window? I figured I’d just set the window as hidden in the Settings in the Cinder main macro, but I can’t find that in the documentation. I think this may be slightly different than “headless” rendering, because I’m running this on machines that do have displays. Ultimately, I want to be able run Cinder from a bash script, read an image, render a shader, take a screenshot, and then terminate the app.

---

<div class="post-metadata">

**Author:** ![andrewfb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrewfb/32/2_2.png) [@andrewfb](https://discourse.libcinder.org/u/andrewfb)\
**Post date:** [October 9, 2017, 1:31am UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890/2 "2017-10-09T01:31:05Z")

</div>

I currently have an app which performs headless, doing all of its processing in `setup()` and then calling `quit()` at the end, but it runs on a machine without a display, so the window is a non-issue.

This does strike me as something we can and should improve in Cinder. I do think there are a number of platform-specific subtleties to getting hardware-accelerated GL working headless. That said, I wonder if your use case could be addressed just by creating a normal `Window` and setting it to be invisible?

---

<div class="post-metadata">

**Author:** ![heisters](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/heisters/32/462_2.png) [@heisters](https://discourse.libcinder.org/u/heisters)\
**Post date:** [October 10, 2017, 11:35pm UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890/3 "2017-10-10T23:35:26Z")

</div>

Ok, great. That works as long as you render to texture and save with `tex->createSource()` instead of `copyWindowSurface()`. The latter is of course limited to the max window size, which is limited by the display size.

I can’t set the window to hidden in prepareSettings, but I can set its size to 1x1, and then hide it in setup. However, this still causes the whole screen to flash momentarily black twice. It’s not the end of the world, but any idea how to fix that?

---

<div class="post-metadata">

**Author:** ![andrewfb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrewfb/32/2_2.png) [@andrewfb](https://discourse.libcinder.org/u/andrewfb)\
**Post date:** [October 11, 2017, 4:35am UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890/4 "2017-10-11T04:35:18Z")

</div>

I don’t think there’s a way to do this currently, but the most direct route would be to add a `visible` field to `Window::Format`, and then use `prepareWindow()` in `prepareSettings()` to set that. (That call allows you to specify a `Window::Format` which overrides the default).

Obviously for this to work would require the platform-specific code to make use of it, but I think we could fast-track a pull request to that effect if your or someone else who needs it wants to submit one.

---

<div class="post-metadata">

**Author:** ![heisters](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/heisters/32/462_2.png) [@heisters](https://discourse.libcinder.org/u/heisters)\
**Post date:** [October 12, 2017, 9:45pm UTC](https://discourse.libcinder.org/t/latest-on-command-line-gl-rendering/890/5 "2017-10-12T21:45:55Z")

</div>

ok, thanks. I’ll look into that if it’s bothering me enough 😉
