From 9c512a8273e554d3eb11e3f960ef3591277eafe3 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Wed, 15 Jun 2011 13:22:59 +0200 Subject: [PATCH] doc: activate shader documentation --- doc/autobuild.py | 2 +- kivy/graphics/shader.pyx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/autobuild.py b/doc/autobuild.py index b0cc9a5d4..1b69b0d8d 100644 --- a/doc/autobuild.py +++ b/doc/autobuild.py @@ -9,7 +9,6 @@ Be careful if you change anything in ! ignore_list = ( 'kivy.factory_registers', 'kivy.graphics.buffer', - 'kivy.graphics.shader', 'kivy.graphics.vbo', 'kivy.graphics.vertex', ) @@ -34,6 +33,7 @@ import kivy.core.video import kivy.core.window import kivy.ext import kivy.graphics +import kivy.graphics.shader import kivy.animation from kivy.factory import Factory diff --git a/kivy/graphics/shader.pyx b/kivy/graphics/shader.pyx index ab6835c28..6f49eeeca 100644 --- a/kivy/graphics/shader.pyx +++ b/kivy/graphics/shader.pyx @@ -95,9 +95,9 @@ cdef class Shader: '''Create a vertex or fragment shader :Parameters: - `vs` : string + `vs`: string, default to None source code for vertex shader - `fs` : string + `fs`: string, default to None source code for fragment shader ''' def __cinit__(self): @@ -299,6 +299,11 @@ cdef class Shader: # property vs: + '''Vertex shader source code. + + If you set a new vertex shader source code, it will be automatically + compiled and replace the current one. + ''' def __get__(self): return self.vert_src def __set__(self, object source): @@ -308,6 +313,11 @@ cdef class Shader: self.build_vertex() property fs: + '''Fragment shader source code. + + If you set a new fragment shader source code, it will be automatically + compiled and replace the current one. + ''' def __get__(self): return self.frag_src def __set__(self, object source): @@ -317,5 +327,7 @@ cdef class Shader: self.build_fragment() property success: + '''Indicate if shader is ok for usage or not. + ''' def __get__(self): return self._success