예제 #1
0
    def __init__(self, screen, attrib_list):
        self.screen = screen
        self._display = screen.display._display
        self._visual_info = glx.glXChooseVisual(self._display,
            screen._x_screen_id, attrib_list)
        if not self._visual_info:
            raise gl.ContextException('No conforming visual exists')

        for name, attr in self.attribute_ids.items():
            value = c_int()
            result = glx.glXGetConfig(self._display,
                self._visual_info, attr, byref(value))
            if result >= 0:
                setattr(self, name, value.value)
        self.sample_buffers = 0
        self.samples = 0
예제 #2
0
파일: xlib.py 프로젝트: odyaka341/pyglet
    def __init__(self, canvas, glx_info, attrib_list, config):
        super(XlibCanvasConfig10, self).__init__(canvas, glx_info, config)
        x_display = canvas.display._display
        x_screen = canvas.display.x_screen

        self._visual_info = glx.glXChooseVisual(x_display, x_screen, attrib_list)
        if not self._visual_info:
            raise gl.ContextException("No conforming visual exists")

        for name, attr in self.attribute_ids.items():
            value = c_int()
            result = glx.glXGetConfig(x_display, self._visual_info, attr, byref(value))
            if result >= 0:
                setattr(self, name, value.value)
        self.sample_buffers = 0
        self.samples = 0
예제 #3
0
    def __init__(self, screen, attrib_list):
        self.screen = screen
        self._display = screen.display._display
        self._visual_info = glx.glXChooseVisual(self._display,
                                                screen._x_screen_id,
                                                attrib_list)
        if not self._visual_info:
            raise gl.ContextException('No conforming visual exists')

        for name, attr in self.attribute_ids.items():
            value = c_int()
            result = glx.glXGetConfig(self._display, self._visual_info, attr,
                                      byref(value))
            if result >= 0:
                setattr(self, name, value.value)
        self.sample_buffers = 0
        self.samples = 0
예제 #4
0
    def __init__(self, canvas, glx_info, attrib_list, config):
        super(XlibCanvasConfig10, self).__init__(canvas, glx_info, config)
        x_display = canvas.display._display
        x_screen = canvas.display.x_screen

        self._visual_info = glx.glXChooseVisual(x_display, x_screen,
                                                attrib_list)
        if not self._visual_info:
            raise gl.ContextException('No conforming visual exists')

        for name, attr in self.attribute_ids.items():
            value = c_int()
            result = glx.glXGetConfig(x_display, self._visual_info, attr,
                                      byref(value))
            if result >= 0:
                setattr(self, name, value.value)
        self.sample_buffers = 0
        self.samples = 0