diff --git a/doc/python/conf.py b/doc/python/conf.py index 1fb217e..8b9140c 100644 --- a/doc/python/conf.py +++ b/doc/python/conf.py @@ -68,20 +68,24 @@ magnum.__annotations__ = { 'TARGET_WEBGL': bool, 'TARGET_VK': bool } -magnum.gl.__annotations__ = {} -magnum.gl.__annotations__['default_framebuffer'] = magnum.gl.DefaultFramebuffer -magnum.shaders.VertexColor2D.__annotations__ = {} -magnum.shaders.VertexColor2D.__annotations__['POSITION'] = magnum.gl.Attribute -magnum.shaders.VertexColor2D.__annotations__['COLOR3'] = magnum.gl.Attribute -magnum.shaders.VertexColor2D.__annotations__['COLOR4'] = magnum.gl.Attribute -magnum.shaders.VertexColor3D.__annotations__ = {} -magnum.shaders.VertexColor3D.__annotations__['POSITION'] = magnum.gl.Attribute -magnum.shaders.VertexColor3D.__annotations__['COLOR3'] = magnum.gl.Attribute -magnum.shaders.VertexColor3D.__annotations__['COLOR4'] = magnum.gl.Attribute -magnum.shaders.Phong.__annotations__ = {} -magnum.shaders.Phong.__annotations__['POSITION'] = magnum.gl.Attribute -magnum.shaders.Phong.__annotations__['TEXTURE_COORDINATES'] = magnum.gl.Attribute -magnum.shaders.Phong.__annotations__['NORMAL'] = magnum.gl.Attribute +magnum.gl.__annotations__ = { + 'default_framebuffer': magnum.gl.DefaultFramebuffer +} +magnum.shaders.VertexColor2D.__annotations__ = { + 'POSITION': magnum.gl.Attribute, + 'COLOR3': magnum.gl.Attribute, + 'COLOR4': magnum.gl.Attribute +} +magnum.shaders.VertexColor3D.__annotations__ = { + 'POSITION': magnum.gl.Attribute, + 'COLOR3': magnum.gl.Attribute, + 'COLOR4': magnum.gl.Attribute +} +magnum.shaders.Phong.__annotations__ = { + 'POSITION': magnum.gl.Attribute, + 'NORMAL': magnum.gl.Attribute, + 'TEXTURE_COORDINATES': magnum.gl.Attribute +} PROJECT_TITLE = 'Magnum' PROJECT_SUBTITLE = 'Python docs' diff --git a/doc/python/magnum.shaders.rst b/doc/python/magnum.shaders.rst index c4e8c6d..02270b3 100644 --- a/doc/python/magnum.shaders.rst +++ b/doc/python/magnum.shaders.rst @@ -23,20 +23,17 @@ DEALINGS IN THE SOFTWARE. .. -.. py:data:: magnum.shaders.VertexColor2D.POSITION - :summary: Two-component vertex position - -.. py:data:: magnum.shaders.VertexColor3D.POSITION - :summary: Three-component vertex position - -.. py:data:: magnum.shaders.VertexColor2D.COLOR3 - :summary: Three-component vertex color - -.. py:data:: magnum.shaders.VertexColor3D.COLOR3 - :summary: Three-component vertex color - -.. py:data:: magnum.shaders.VertexColor2D.COLOR4 - :summary: Four-component vertex color - -.. py:data:: magnum.shaders.VertexColor3D.COLOR4 - :summary: Four-component vertex color +.. py:class:: magnum.shaders.VertexColor2D + :data POSITION: Vertex position + :data COLOR3: Three-component vertex color + :data COLOR4: Four-component vertex color + +.. py:class:: magnum.shaders.VertexColor3D + :data POSITION: Vertex position + :data COLOR3: Three-component vertex color + :data COLOR4: Four-component vertex color + +.. py:class:: magnum.shaders.Phong + :data POSITION: Vertex position + :data NORMAL: Normal direction + :data TEXTURE_COORDINATES: 2D texture coordinates