diff options
Diffstat (limited to 'source/Asura.Editor')
4 files changed, 30 insertions, 15 deletions
diff --git a/source/Asura.Editor/graphics/drawer.h b/source/Asura.Editor/graphics/drawer.h index a61a7f2..85cc88a 100644 --- a/source/Asura.Editor/graphics/drawer.h +++ b/source/Asura.Editor/graphics/drawer.h @@ -26,6 +26,7 @@ namespace AsuraEditor void DrawTexts(); void DrawCircle(int x, int y, float d); void DrawPoint(int x, int y); + void DrawPolyline(); private: diff --git a/source/Asura.Editor/graphics/shaders/poly_line.shader.h b/source/Asura.Editor/graphics/shaders/poly_line.shader.h deleted file mode 100644 index 763fd45..0000000 --- a/source/Asura.Editor/graphics/shaders/poly_line.shader.h +++ /dev/null @@ -1,15 +0,0 @@ - -const char* s = R"( -in vec2 asura_position; -in vec2 asura_texcoord0; - -uniform mat4 asura_model_matrix; -uniform mat4 asura_view_matrix; -uniform mat4 asura_projection_matrix; - -void main() -{ - gl_Position = asura_model_ -} - -)";
\ No newline at end of file diff --git a/source/Asura.Editor/graphics/shaders/poly_shape.shader.h b/source/Asura.Editor/graphics/shaders/poly_shape.shader.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/graphics/shaders/poly_shape.shader.h +++ /dev/null diff --git a/source/Asura.Editor/graphics/shaders/polygon.shader.h b/source/Asura.Editor/graphics/shaders/polygon.shader.h new file mode 100644 index 0000000..eed4f5a --- /dev/null +++ b/source/Asura.Editor/graphics/shaders/polygon.shader.h @@ -0,0 +1,29 @@ +#ifndef __ASURA_EDITOR_SHADER_H__ +#include "../shader.h" +#endif + +// +static AsuraEditor::Graphics::ShaderProgram polygon_shader = +{ + R"( +in vec2 position; + +uniform mat4 mvp_matrix; + +void main() +{ + gl_Position = mvp_matrix * vec4(position, 0, 1); +} + +)", + +R"( +uniform vec4 color; + +void main() +{ + gl_FragColor = color; +} + +)" +};
\ No newline at end of file |