mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
tests: skip auto-shader tests if Cg shaders are not supported
This commit is contained in:
parent
fa53e013cb
commit
57b0be8647
@ -105,6 +105,12 @@ def render_color_pixel(region, state, vertex_color=None):
|
||||
"""Renders a fragment using the specified render settings, and returns the
|
||||
resulting color value."""
|
||||
|
||||
# Skip auto-shader tests if we don't support Cg shaders.
|
||||
if not region.window.gsg.supports_basic_shaders:
|
||||
sattr = state.get_attrib(core.ShaderAttrib)
|
||||
if sattr and sattr.auto_shader():
|
||||
pytest.skip("Cannot test auto-shader without Cg shader support")
|
||||
|
||||
# Set up the scene with a blank card rendering at specified distance.
|
||||
scene = core.NodePath("root")
|
||||
scene.set_attrib(core.DepthTestAttrib.make(core.RenderAttrib.M_always))
|
||||
|
Loading…
x
Reference in New Issue
Block a user