Browse Source

python: update shader attribute docs, add Phong there too.

pull/8/head
Vladimír Vondruš 7 years ago
parent
commit
006987fa45
  1. 32
      doc/python/conf.py
  2. 31
      doc/python/magnum.shaders.rst

32
doc/python/conf.py

@ -68,20 +68,24 @@ magnum.__annotations__ = {
'TARGET_WEBGL': bool, 'TARGET_WEBGL': bool,
'TARGET_VK': bool 'TARGET_VK': bool
} }
magnum.gl.__annotations__ = {} magnum.gl.__annotations__ = {
magnum.gl.__annotations__['default_framebuffer'] = magnum.gl.DefaultFramebuffer 'default_framebuffer': magnum.gl.DefaultFramebuffer
magnum.shaders.VertexColor2D.__annotations__ = {} }
magnum.shaders.VertexColor2D.__annotations__['POSITION'] = magnum.gl.Attribute magnum.shaders.VertexColor2D.__annotations__ = {
magnum.shaders.VertexColor2D.__annotations__['COLOR3'] = magnum.gl.Attribute 'POSITION': magnum.gl.Attribute,
magnum.shaders.VertexColor2D.__annotations__['COLOR4'] = magnum.gl.Attribute 'COLOR3': magnum.gl.Attribute,
magnum.shaders.VertexColor3D.__annotations__ = {} 'COLOR4': magnum.gl.Attribute
magnum.shaders.VertexColor3D.__annotations__['POSITION'] = magnum.gl.Attribute }
magnum.shaders.VertexColor3D.__annotations__['COLOR3'] = magnum.gl.Attribute magnum.shaders.VertexColor3D.__annotations__ = {
magnum.shaders.VertexColor3D.__annotations__['COLOR4'] = magnum.gl.Attribute 'POSITION': magnum.gl.Attribute,
magnum.shaders.Phong.__annotations__ = {} 'COLOR3': magnum.gl.Attribute,
magnum.shaders.Phong.__annotations__['POSITION'] = magnum.gl.Attribute 'COLOR4': magnum.gl.Attribute
magnum.shaders.Phong.__annotations__['TEXTURE_COORDINATES'] = magnum.gl.Attribute }
magnum.shaders.Phong.__annotations__['NORMAL'] = magnum.gl.Attribute magnum.shaders.Phong.__annotations__ = {
'POSITION': magnum.gl.Attribute,
'NORMAL': magnum.gl.Attribute,
'TEXTURE_COORDINATES': magnum.gl.Attribute
}
PROJECT_TITLE = 'Magnum' PROJECT_TITLE = 'Magnum'
PROJECT_SUBTITLE = 'Python docs' PROJECT_SUBTITLE = 'Python docs'

31
doc/python/magnum.shaders.rst

@ -23,20 +23,17 @@
DEALINGS IN THE SOFTWARE. DEALINGS IN THE SOFTWARE.
.. ..
.. py:data:: magnum.shaders.VertexColor2D.POSITION .. py:class:: magnum.shaders.VertexColor2D
:summary: Two-component vertex position :data POSITION: Vertex position
:data COLOR3: Three-component vertex color
.. py:data:: magnum.shaders.VertexColor3D.POSITION :data COLOR4: Four-component vertex color
:summary: Three-component vertex position
.. py:class:: magnum.shaders.VertexColor3D
.. py:data:: magnum.shaders.VertexColor2D.COLOR3 :data POSITION: Vertex position
:summary: Three-component vertex color :data COLOR3: Three-component vertex color
:data COLOR4: Four-component vertex color
.. py:data:: magnum.shaders.VertexColor3D.COLOR3
:summary: Three-component vertex color .. py:class:: magnum.shaders.Phong
:data POSITION: Vertex position
.. py:data:: magnum.shaders.VertexColor2D.COLOR4 :data NORMAL: Normal direction
:summary: Four-component vertex color :data TEXTURE_COORDINATES: 2D texture coordinates
.. py:data:: magnum.shaders.VertexColor3D.COLOR4
:summary: Four-component vertex color

Loading…
Cancel
Save