
argv return ShaderEditor ( ** kwargs ) if _name_ = '_main_' : ShaderEditorApp (). register ( 'ShaderViewer', cls = ShaderViewer ) class ShaderEditor ( FloatLayout ): source = StringProperty ( 'data/logo/kivy-icon-512.png' ) fs = StringProperty ( ''' void main (void) if len ( sys. fs = value def on_vs ( self, instance, value ): self. ask_update () def on_fs ( self, instance, value ): self. get_boottime () s = list ( map ( float, self. update_shader, 0 ) def update_shader ( self, * args ): s = self. canvas = RenderContext () super ( ShaderViewer, self ). require ( '1.0.6' ) from kivy.app import App from import FloatLayout from import Window from kivy.factory import Factory from aphics import RenderContext from kivy.properties import StringProperty, ObjectProperty from kivy.clock import Clock from pat import PY2 fs_header = ''' #ifdef GL_ES precision highp float #endif /* Outputs from the vertex shader */ varying vec4 frag_color varying vec2 tex_coord0 /* uniform texture samplers */ uniform sampler2D texture0 /* custom one */ uniform vec2 resolution uniform float time ''' vs_header = ''' #ifdef GL_ES precision highp float #endif /* Outputs to the fragment shader */ varying vec4 frag_color varying vec2 tex_coord0 /* vertex attributes */ attribute vec2 vPosition attribute vec2 vTexCoords0 /* uniform variables */ uniform mat4 modelview_mat uniform mat4 projection_mat uniform vec4 color ''' class ShaderViewer ( FloatLayout ): fs = StringProperty ( None ) vs = StringProperty ( None ) def _init_ ( self, ** kwargs ): self. Otherwise, the error is visible as logging message in your terminal. If there are no errors, the screen is updated. On each keystroke to either shader, declarations are added and the shaders are compiled. The file shadereditor.kv describes the interface. You should see a window with two editable panes on the left and a large kivy logo on the right.The top pane is the Vertex shader and the bottom is the Fragment shader. ''' Live Shader Editor = This provides a live editor for vertex and fragment editors.



Native support of MultitouchSupport framework for MacBook (MaxOSX platform).Native support of Wacom tablet from linuxwacom driver.Native support for HID input from the linux kernel.Compatibility module for Python 2.7 and >= 3.4.Touch Tracer Line Drawing Demonstration.Multistroke Recognition Database Demonstration.Texture Wrapping and Coordinates Example.Application example using build() + return.
