delaying OpenGL rendering?

Seems like the OS I’m using crashes Panda3D app if there is no monitor (video projector in my case) connected when it is ran. Thing is, my Panda3D program is what turns on and off the video projector. I bet if I don’t have Panda3D initialize the OpenGL window before it turns on the projector, then the program won’t be closed by the OS. How can I do that though?

are you using panda or python to turn on the monitor? if just python , turn on monitor before calling ShowBase.ShowBase().

There’s information missing here.

Like, how you turn on the projector in software manually.

With an Arduino via PySerial.

I did something like this

import time

# import pandac

# initialize Arduino

# 5 seconds should be enough for Ubuntu to configure the video output and not crash the OpenGL window
for i in range(5):
    # tell Arduino to turn on the projector and keep it on unless it doesn't get response for 2 seconds
   time.sleep(1)

# import directStart

# now tell Arduino to keep the projector on in a proper Panda task

Yeah, don’t import DirectStart. It basically import ShowBase and instantiates it right away, opening a window and everything. Instead, use ShowBase, as also used in the hello world sample in the manual. This gives you a bit more flexibility because you can wait with instantiating ShowBase until you’re ready.

Or, you can pass windowType=‘none’ to ShowBase so you can have the Panda features available without a window, and basically call base.makeDefaultPipe() base.openDefaultWindow() when you’re ready.

It seems to have worked this way. :slight_smile: