Nicer error message if the ARB_copy_image extension is absent
This commit is contained in:
parent
cc157f1b3e
commit
9df413d9be
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user