renderWindow.SetSize() limits?

Hi,

I believe the fallback case is a GLUT window. GLUT is a lightweight toolkit that provides very basic GUI functionality so unexperienced users and students can roll out their OpenGL applications without cumbersome GUI programming getting in the way. I’ve seen people having trouble with GLUT window sizing before but I’ve never heard of any hard limits. But I don’t work with GLUT since my undergrad years decades ago. As far as I know, OpenGL works with the limits returned by the OpenGL API backend, that is, the graphics driver. So, make sure your graphics driver is up-to-date and/or your graphics hardware is not too old.

In essence, you have to ask OpenGL what is the maximimum viewport size of your system. OpenGL API defines the C function glGetIntegerv() (Função glGetIntegerv (Gl.h) - Win32 apps | Microsoft Learn). You pass the GL_MAX_VIEWPORT_DIMS constant to it to query the maximum viewport size in pixels. Since you’re in Python, I believe you can pip install PyOpenGL in your system to access OpenGL and use a code like this (untested):

import OpenGL.GL as gl

(...)

viewport_max_sizes = gl.glGetIntegerv(gl.GL_MAX_VIEWPORT_DIMS)

From there, you can use Python’s exploration programming capabilities to get your viewport max sizes.

I hope this helps,

Paulo