MCPcopy Index your code
hub / github.com/SpectacularAI/sdk / __initDisplay

Method __initDisplay

python/cli/visualization/visualizer.py:296–314  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

294 self.poseTrail.reset()
295
296 def __initDisplay(self):
297 from pygame.locals import DOUBLEBUF, OPENGL, FULLSCREEN, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES
298
299 if self.adjustedResolution is None: return
300 w = self.adjustedResolution[0]
301 h = self.adjustedResolution[1]
302 self.displayInitialized = True
303
304 pygame.init()
305
306 # Configure multi-sampling (anti-aliasing)
307 pygame.display.gl_set_attribute(GL_MULTISAMPLEBUFFERS, 1)
308 pygame.display.gl_set_attribute(GL_MULTISAMPLESAMPLES, 4)
309 if self.fullScreen: pygame.display.set_mode((w, h), DOUBLEBUF | OPENGL | FULLSCREEN)
310 else: pygame.display.set_mode((w, h), DOUBLEBUF | OPENGL)
311 pygame.display.set_caption("Spectacular AI Visualizer")
312
313 # Enable multi-sampling in OpenGL
314 glEnable(GL_MULTISAMPLE)
315
316 def __close(self):
317 assert(self.shouldQuit)

Callers 1

__renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected