Difference between revisions of "Krita/OpenGL"

Jump to: navigation, search
(Projects)
(Projects)
 
Line 10: Line 10:
 
* Refactor code to share rendering pipeline between Krita desktop and Krita sketch
 
* Refactor code to share rendering pipeline between Krita desktop and Krita sketch
 
* Rewrite code to avoid Core profile calls
 
* Rewrite code to avoid Core profile calls
* Rewrite KisCanvasDecoration not to use QPainter
+
* Rewrite KisCanvasDecoration not to use QPainter.  (That is, render the grid and the canvas assistants with OpenGL)

Latest revision as of 17:56, 8 December 2015

Overview

KisOpenGL canvas renders using opengl, in a couple of steps starting in paintGL. Then we have Krita Sketch/Krita Gemini, which are QML applications. QML/QtQtuick2 is also opengl these days, it's a scene graph. It offers hooks to draw opengl before and after the scene graph is rendered. Previously, Sketch was a QGraphicsView based application, which offers a hook to draw something in the background. To do that, we called the KisOpenGLCanvas methods to render the background, tiles, image and tool decorations from that function.

Now, those things need to be called in the right place from the QQuickView-based class, but for some reason, the opengl contexts aren't shared, or shared in the wrong way. (Qt examples do all initialization in the paintGL method.) There's a second problem with our opengl code, and that's that we use a lot of compatibility profile stuff, because we use QPainter to render on the opengl canvas a lot. That's broken on OSX, but it's a completely different issue.


Projects

  • Implement more efficient canvas updates, updating only the dirty area, not the whole canvas. // FIXME: Implement dirty rect for OpenGL
  • Refactor code to share rendering pipeline between Krita desktop and Krita sketch
  • Rewrite code to avoid Core profile calls
  • Rewrite KisCanvasDecoration not to use QPainter. (That is, render the grid and the canvas assistants with OpenGL)

This page was last edited on 8 December 2015, at 17:56. Content is available under Creative Commons License SA 4.0 unless otherwise noted.