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_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'

31
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

Loading…
Cancel
Save