1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
import moderngl
import pytest
def test_renderbuffer(ctx):
ctx.renderbuffer((64, 64))
def test_multisample_renderbuffer(ctx):
if ctx.max_samples < 2:
pytest.skip('multisampling is not supported')
ctx.renderbuffer((64, 64), samples=2)
def test_depth_renderbuffer(ctx):
ctx.depth_renderbuffer((64, 64))
def test_multisample_depth_renderbuffer(ctx):
if ctx.max_samples < 2:
pytest.skip('multisampling is not supported')
ctx.depth_renderbuffer((64, 64), samples=2)
def test_renderbuffer_invalid_samples(ctx):
with pytest.raises(moderngl.Error, match='sample'):
ctx.renderbuffer((64, 64), samples=3)
|