Closed slimsag closed 10 years ago
According to Draw(r image.Rectangle, o *Object, c *Camera)
at http://azul3d.org/gfx.v1#Canvas:
// The object will not be drawn if any of the following cases are true:
// o.Shader == nil
// len(o.Shader.Error) > 0
// len(o.Meshes) == 0
// !o.Meshes[N].Loaded && len(o.Meshes[N].Vertices) == 0
Meaning this would require a documentation change to azul3d/gfx -- which is okay, but for backwards compatibility guarantees we have to bump the version number up (silly for just this one thing).
Upon more thought into this issue -- the real truth is that:
[]byte
in the Go source code -- which is semi confusing for people reading over it (mixing between Go->GLSL->Go etc). We should instead declare these in seperate .vert and .frag files in the example's directory (and comment them well).See new issue for this at azul3d/examples#4
I think that's a fine idea, plus many editors support glsl files. Maybe another idea for an example is dynamic reloading of a shader file via fsnotify.
It's actually kind of a touchy subject reloading a shader file depending on the editor used and how it "saves" a file, but the code isn't overly verbose and for someone learning shaders, having a way to edit the glsl file and see those changes immediately while running the program is a great learning tool.
Maybe another idea for an example is dynamic reloading of a shader file via fsnotify.
Very interesting idea! Please create an issue for that at azul3d/issues as I would like to see that feature somewhere too, or even hear other's thoughts on it.
It would be nice if renderers could provide default shaders that work for most generic cases. The default shader should try to encapsulate all current examples such that no shader is needed.
This issue is a complaint from a user about not being able to use the graphics engine without explicitly writing GLSL shaders.