Commit graph

19 commits

Author SHA1 Message Date
RuiwenTang
95dde5807e gl_engine: Fix memory leak caused by no deleted GlRenderTask 2024-06-27 14:42:27 +09:00
RuiwenTang
5836661155 gl_engine: Fix compile error if only has OpenGL library on MacOS
Since GLES headers and library can not be found on MacOS,
use macros to determin if link with OpenGL library.
2024-06-27 14:42:27 +09:00
RuiwenTang
063474ba05 gl_engine: fix clip path and bounds not correct
* Optimize clip logical, change to use GL_GRATER and keep incrace depth
  value, so no need to do depth clear after every clip draw.
* Correct geometry bounding box calculation, and make sure the bounds is
  larger than all vertices
* Limit drawing area for off-screen RenderPass with correct scissor box
2024-06-24 14:47:33 +09:00
RuiwenTang
06fc52ff22 gl_engine: fix stencil logical not correct
Fix the stencil reference and compile function cause rendering not
correct
2024-06-24 12:31:41 +09:00
RuiwenTang
a6974a9495 gl_engine: fix rendering error caused by viewport and stencil state
Fix some error:
* glViewport not controlled by framebuffer, and need to set manually when
target framebuffer is changed.
* change even-odd stencil operation, so no need to do third draw call to
  clear stencil buffer
* fix the missing `GlCanvas::update` calls in Lottoe and LottieExtension
2024-06-24 12:27:17 +09:00
RuiwenTang
216d958e97 gl_engine: using depth buffer to support path clip
* Append depth buffer attachment in tvgGlRenderPass
* using depth test if Shape has path clip
2024-06-24 12:17:38 +09:00
RuiwenTang
b7eb72a27d gl_engine: fix some typo inside GlRenderer
* Fix a typo error when prepare blit task
* Prevent repeated texture generation during task preparation
2024-06-24 12:12:10 +09:00
RuiwenTang
574783be16 gl_engine: using normal texture rendering in final color blit
Since blit msaa framebuffer to another msaa framebuffer may generate
GLError in some platforms. Use normal texture rendering to blit the final
color buffer onto target framebuffer.
2024-06-24 12:10:18 +09:00
RuiwenTang
ed146ed162 gl_engine: make stencil task support other advance logical
* Support rendering Gradient in path Stroke mode
* Fix GlStencilCoverTask not support even-odd fill rule
* Make GlStencilCoverTask can discard overlapped area during stroke
  rendering
2024-04-06 12:08:22 +09:00
RuiwenTang
faff16e7d4 gl_engine: enable msaa resolve in GLRenderPass
* use GLRenderBuffer in color and stencil attachment, also use x4 sample
  count by default.
* add msaa resolve logical at the end of a ComposeTask, so the normal
  color texture can get the final rendering result.
2024-04-06 12:08:21 +09:00
RuiwenTang
2855b9b339 gl_engine: add stencil and cover render task
* add new render task to do stencil and cover rendering which is a
  fallback rendering method to handle cases that trianglation tessellation
  failed

* add a new tessellator to generate stencil and cover vertex mesh
2024-04-06 12:08:21 +09:00
RuiwenTang
fc7ba88585 gl_engine: append stencil attachment in GLRenderTarget
Plans to use stencil to test support for path clipping and complex path rendering
When the tessellation algorithm cannot handle it.
2024-04-05 17:34:59 +09:00
Jinny You
92288c8291 updated copyright date (#1866) 2024-01-02 20:34:12 +09:00
RuiwenTang
d3169ea8fe gl_engine: fix wrong scissor value cause content not fully rendered 2024-01-02 20:34:11 +09:00
RuiwenTang
2038818e16 gl_engine: use raw pointer to pass and hold GlRenderTask 2023-12-26 17:51:46 +09:00
RuiwenTang
a46af19ccb gl_engine: support basic alpha composite
* introduce a new class GlRenderPass to hold off-screen rendering result
* add basic alpha composite support with begin/end render-pass
2023-12-26 17:50:50 +09:00
RuiwenTang
49b7ea4679 gl_engine: support clip by using scissor and stencil 2023-12-26 17:48:41 +09:00
RuiwenTang
453cba7ddd gl_engine: make GlRenderTask generic with uniform block
* Use uniform block to pack all color informations
* Move the actual gl draw call into GlRenderer::sync function, so all
  data is been uploaded into GPU
* Make GlRenderTask simple and generic for direct gl draw
2023-09-21 22:24:07 +09:00
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Renamed from src/lib/gl_engine/tvgGlRenderTask.cpp (Browse further)