mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Nicer error message if the ARB_copy_image extension is absent
This commit is contained in:
@@ -6,6 +6,7 @@ from functools import lru_cache
|
|||||||
|
|
||||||
from OpenGL.arrays import ArrayDatatype
|
from OpenGL.arrays import ArrayDatatype
|
||||||
import OpenGL.GL as gl
|
import OpenGL.GL as gl
|
||||||
|
from OpenGL.GL.ARB.copy_image import glCopyImageSubData # only present in opengl core >= 4.3
|
||||||
|
|
||||||
from .fonts import render_cell, cell_size
|
from .fonts import render_cell, cell_size
|
||||||
|
|
||||||
@@ -60,8 +61,8 @@ class Sprites:
|
|||||||
ynum = self.ynum
|
ynum = self.ynum
|
||||||
if self.z == 0:
|
if self.z == 0:
|
||||||
ynum -= 1 # Only copy the previous rows
|
ynum -= 1 # Only copy the previous rows
|
||||||
gl.glCopyImageSubData(self.texture_id, tgt, 0, 0, 0, 0, tex, tgt, 0, 0, 0, 0,
|
glCopyImageSubData(self.texture_id, tgt, 0, 0, 0, 0, tex, tgt, 0, 0, 0, 0,
|
||||||
width, ynum * self.cell_height, self.last_num_of_layers)
|
width, ynum * self.cell_height, self.last_num_of_layers)
|
||||||
gl.glDeleteTextures([self.texture_id])
|
gl.glDeleteTextures([self.texture_id])
|
||||||
self.last_num_of_layers = znum
|
self.last_num_of_layers = znum
|
||||||
self.texture_id = tex
|
self.texture_id = tex
|
||||||
|
|||||||
Reference in New Issue
Block a user