test-kivy-app/kivy_venv/share/kivy-examples/demo/shadereditor/shadereditor.kv

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-09-15 12:12:16 +00:00
#: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