40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
|
#:kivy 1.0
|
||
|
#: import GLShaderLexer pygments.lexers.GLShaderLexer
|
||
|
|
||
|
<ShaderEditor>:
|
||
|
viewer: viewer
|
||
|
|
||
|
BoxLayout:
|
||
|
BoxLayout:
|
||
|
orientation: 'vertical'
|
||
|
size_hint_x: None
|
||
|
width: 350
|
||
|
|
||
|
Label:
|
||
|
text: 'Fragment Shader'
|
||
|
size_hint_y: None
|
||
|
height: self.texture_size[1] + 10
|
||
|
CodeInput:
|
||
|
text: root.fs
|
||
|
lexer: GLShaderLexer()
|
||
|
on_text: root.fs = args[1]
|
||
|
|
||
|
Label:
|
||
|
text: 'Vertex Shader'
|
||
|
size_hint_y: None
|
||
|
height: self.texture_size[1] + 10
|
||
|
CodeInput:
|
||
|
text: root.vs
|
||
|
lexer: GLShaderLexer()
|
||
|
on_text: root.vs = args[1]
|
||
|
|
||
|
ShaderViewer:
|
||
|
id: viewer
|
||
|
canvas:
|
||
|
Color:
|
||
|
rgb: 1, 1, 1
|
||
|
Rectangle:
|
||
|
size: self.size
|
||
|
pos: self.pos
|
||
|
source: root.source
|