From 137211b2b2815053d3cde20dcea5240a13817037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 2 Sep 2022 19:45:27 +0200 Subject: [PATCH] doc: a very hacky way to make python shader docs a bit more readable. --- doc/python/conf.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/python/conf.py b/doc/python/conf.py index 0e9631f..c4b0648 100644 --- a/doc/python/conf.py +++ b/doc/python/conf.py @@ -103,6 +103,28 @@ magnum.shaders.PhongGL.__annotations__ = { 'COLOR4': magnum.gl.Attribute } +# An extremely hacky way to remove noise for shader docs. It doesn't hide +# those, but at least puts them way down in the page, removing all docs. +# TODO needs a better solution directly in m.css +for shader in [magnum.shaders.FlatGL2D, + magnum.shaders.FlatGL3D, + magnum.shaders.VertexColorGL2D, + magnum.shaders.VertexColorGL3D, + magnum.shaders.PhongGL]: + shader.attach_shader = DoNotPrintValue() + shader.bind_attribute_location = DoNotPrintValue() + shader.bind_fragment_data_location = DoNotPrintValue() + shader.bind_fragment_data_location_indexed = DoNotPrintValue() + shader.dispatch_compute = DoNotPrintValue() + shader.link = DoNotPrintValue() + shader.retrievable_binary = DoNotPrintValue() + shader.separable = DoNotPrintValue() + shader.set_uniform_block_binding = DoNotPrintValue() + shader.set_uniform = DoNotPrintValue() + shader.uniform_block_index = DoNotPrintValue() + shader.uniform_location = DoNotPrintValue() + shader.TransformFeedbackBufferMode = DoNotPrintValue() + PROJECT_TITLE = 'Magnum' PROJECT_SUBTITLE = 'Python docs' MAIN_PROJECT_URL = 'https://magnum.graphics'