diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-19 13:14:04 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-19 13:14:38 -0300 |
commit | 8fc6bb8f771c520c15320c3b4be561abc648d65d (patch) | |
tree | dd02ad9af0e5bc87505c26ae6093426f49d58195 /drivers | |
parent | 01e447f3df570ab6a43d43e4d354b0f4bc4370fa (diff) |
Added polygon antialiasing, but it does not work on nvidia. Will have to try something else..
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index e6ffa39197..376a208559 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -691,6 +691,13 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur state.canvas_shader.set_uniform(CanvasShaderGLES3::COLOR_TEXPIXEL_SIZE, texpixel_size); } _draw_polygon(polygon->indices.ptr(), polygon->count, polygon->points.size(), polygon->points.ptr(), polygon->uvs.ptr(), polygon->colors.ptr(), polygon->colors.size() == 1); +#ifdef GLES_OVER_GL + if (polygon->antialiased) { + glEnable(GL_LINE_SMOOTH); + _draw_generic(GL_LINE_LOOP, polygon->points.size(), polygon->points.ptr(), polygon->uvs.ptr(), polygon->colors.ptr(), polygon->colors.size() == 1); + glDisable(GL_LINE_SMOOTH); + } +#endif } break; case Item::Command::TYPE_PARTICLES: { |