Bug 82319 - use modern OpenGL for OpenGL canvas
Summary: use modern OpenGL for OpenGL canvas
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Impress-OpenGL
  Show dependency treegraph
 
Reported: 2014-08-08 03:47 UTC by Markus Mohrhard
Modified: 2021-09-13 08:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Mohrhard 2014-08-08 03:47:24 UTC
Currently many parts of the OpenGL canavs (implementation in canvas/source/opengl) use parts of the fixed pipeline. We should move these parts to modern OpenGL, so either 2.0+ or even 3.0+.

We are using FBos now so we are not compatible with 1.5 anyway.

You can recognize the fixed pipeline parts as they are normally between glBegin and glEnd. These should be moved to shaders. Some existing shaders are at canvas/opengl and chart2/opengl
Comment 1 Markus Mohrhard 2014-08-08 03:51:17 UTC
Make it an easy hack.

This hack can be either started now in the feature/use-ogl-context-in-canvas or after the branch has been merged in master.
Comment 2 Michael Jaumann 2014-09-15 09:09:11 UTC
He, i will start to work on this.
Comment 3 Markus Mohrhard 2014-09-15 10:33:13 UTC
See bug 82797. Please target OpenGL 2.1 for now as OpenGL 3.2 is not available on too many platforms.

I'm not sure if I mentioned it in our talk in Bern but the OpenGL canvas is incomplete and it would be one of the two open tasks to finish the work on it. Thorsten might be able to help a bit until I'm back around October, 20th.
Comment 4 Riccardo Magliocchetti 2015-10-03 10:30:19 UTC
FYI samuel_m is currently working on cross compiling libo to js with emscripten here [1]. In the browser we have this thing called WebGL which is a port of OpenGL ES 2.0. OpenGL ES 2.0 is AFAIU OpenGL 2.0 without the deprecated fixed pipeline. So if taking this in consideration during the rewrite would be not much hassle we can have a nice rendering path for free on the browser.

[1] https://gerrit.libreoffice.org/#/c/18643/
Comment 5 Robinson Tryon (qubit) 2015-12-14 05:01:16 UTC Comment hidden (obsolete)
Comment 6 jani 2016-02-17 07:19:51 UTC
Changes status ASSIGNED, since it was not
Comment 7 Tristan 2017-10-29 16:44:40 UTC Comment hidden (spam)
Comment 8 Michael Meeks 2018-05-17 09:14:06 UTC
Given that (underneath) VCL can use OpenGL anyway - I wonder what (if any) benefits the OpenGL canvas gives us - and whether we should just drop this code (and hence the easy hack) to ease maintenance - thoughts ?
Comment 9 Michael Meeks 2018-10-19 07:30:01 UTC
So - no feedback -> closing to remove it from the list; my hope is that VCL will ultimately provide good GL / Vulkan acceleration that makes this un-necessary - and the GL code in the Canvas is somewhat problematic =) I'd suggest we drop it.
Comment 10 Thorsten Behrens (allotropia) 2018-10-21 22:54:05 UTC
Michael, any concrete plans? Otherwise would like to keep this; any useful OpenGL acceleration of slideshow content needs texture transformation/blending/positioning, thus such code would in any case live through any re-architecting here.
Comment 11 Michael Meeks 2018-10-22 10:54:33 UTC
Well - as an easy hack - it's not hyper-easy re-working the GL =) When VCL is using GL - everything is a texture anyway, so I wonder what blending / transformation API we're missing that could be used the VCL backend (?)

But if you want to re-open; why not =) go for it; but I'd really like us to switch to Vulkan before resurrecting this, and to use GL acceleration here only when we have a known-good GL backend that VCL can use too - to reduce variables for QA etc. Thoughts ?
Comment 12 Thorsten Behrens (allotropia) 2018-10-22 12:26:36 UTC
Ok, reopening (needs work, even if using whatever future new vcl functions will be there), but removed easy hack keywords.

Michael, or is the task (use newer APIs for accelerated slideshow content) covered already elsewhere?
Comment 13 QA Administrators 2019-10-23 02:48:51 UTC Comment hidden (obsolete)
Comment 14 Timur 2021-09-10 12:50:02 UTC
Isn't OpenGL discarded?
Comment 15 Miklos Vajna 2021-09-13 08:40:43 UTC
The opengl backend of vcl is discarded, this is probably for canvas/source/opengl/, which is separate topic. (The Windows default is to use the vcl backend of the canvas.)