1
00:00:02,977 --> 00:00:05,217
Congrats, let's go!

2
00:00:07,497 --> 00:00:11,637
Right, I need to summarize how Quinn draws at the moment.

3
00:00:11,737 --> 00:00:14,737
Quinn is responsible for drawing your windows on the screen,

4
00:00:14,937 --> 00:00:17,977
and then occasionally, we draw effects on top.

5
00:00:18,977 --> 00:00:22,797
And the way it currently works, is it's a simple path to draw all your windows,

6
00:00:23,057 --> 00:00:27,217
and then throughout this, effects have various hooks where you just randomly

7
00:00:27,217 --> 00:00:31,997
throw OpenGL Yale calls in the middle of Quinn trying to do its main business.

8
00:00:33,677 --> 00:00:39,057
And I opened Yale codes quite long and old, so this is code to draw a circle,

9
00:00:39,337 --> 00:00:41,577
not lots of circles, a circle.

10
00:00:41,817 --> 00:00:43,737
Don't expect you to read it. It's a lot of code.

11
00:00:44,537 --> 00:00:47,677
And I wrote this slide about knowing Martin was going to be here.

12
00:00:48,317 --> 00:00:50,537
The result isn't very good.

13
00:00:51,777 --> 00:00:54,077
It looks like it was written 10 years ago.

14
00:00:55,477 --> 00:00:57,097
Fair enough, it was.

15
00:00:59,597 --> 00:01:02,797
But the problem is, the Quinn developers, the core developers,

16
00:01:03,137 --> 00:01:05,657
want to make the core even lower.

17
00:01:05,737 --> 00:01:09,017
They really need a fine-grained control of everything we're doing,

18
00:01:09,257 --> 00:01:13,037
changing which OpenGL call based on which drive you're using and what day of

19
00:01:13,037 --> 00:01:18,157
the week it is, and drawing onto different planes, and having absolute control

20
00:01:18,157 --> 00:01:20,637
of everything, knowing how long everything's going to take.

21
00:01:21,857 --> 00:01:26,037
And they want to have this really light scene graph with very simple rectangles,

22
00:01:26,157 --> 00:01:29,517
and long term also have a path to Vulkan.

23
00:01:29,697 --> 00:01:32,377
And I say long term, there's work in progress right now.

24
00:01:32,697 --> 00:01:37,897
And you can't have a path to Vulkan if you have loads of code throwing OpenGL calls at your screen.

25
00:01:39,097 --> 00:01:42,577
Now, as a not hardcore dev, that's not what I want.

26
00:01:42,877 --> 00:01:49,377
I want a very lightweight, simple API where I can draw in, load an image,

27
00:01:49,497 --> 00:01:53,577
load a texture, draw some text, which is really difficult in low-level OpenGL,

28
00:01:53,797 --> 00:01:58,637
and I definitely do not want to write another path for Vulkan.

29
00:01:58,757 --> 00:02:01,077
It would mean rewriting everything from scratch.

30
00:02:01,617 --> 00:02:05,157
So if we're going to do that, we need to look for a path forward that satisfies

31
00:02:05,157 --> 00:02:10,577
both of those sets of requirements which are quite competing.

32
00:02:11,077 --> 00:02:13,937
So the solution is to have two solutions.

33
00:02:16,537 --> 00:02:20,697
A low-level quinn goes lower, and a high-level quinn where we need a high FX

34
00:02:20,697 --> 00:02:22,737
goes higher, making use of Qt Quick.

35
00:02:23,377 --> 00:02:26,717
So your Qt Quick code renders into a texture, into an off-screen buffer,

36
00:02:26,957 --> 00:02:32,137
which the low-level code just sees as a rectangle, doesn't care what it is.

37
00:02:32,997 --> 00:02:37,357
And if the high-level code wants to render a window or a whole desktop,

38
00:02:37,637 --> 00:02:43,017
it just sees a regular Qt Quick item and doesn't care where that content comes from.

39
00:02:44,117 --> 00:02:49,197
And the main change was making all this happen really, really fast with shared

40
00:02:49,197 --> 00:02:51,337
OpenGL context, we can make all of that happen.

41
00:02:53,359 --> 00:02:57,339
So it benefits. We saw about 20 lines of code to draw a rectangle.

42
00:02:59,519 --> 00:03:03,919
Cute, quick, really easy. And also the designers can come in along.

43
00:03:04,099 --> 00:03:08,019
People who don't know any C++ can come in along and add a color,

44
00:03:08,119 --> 00:03:09,759
which actually I've forgotten.

45
00:03:10,099 --> 00:03:15,839
So it's really readable code. It's really easy to edit, maintain, which is what we want.

46
00:03:15,939 --> 00:03:18,659
And we get features like anti-aliasing for free.

47
00:03:19,019 --> 00:03:21,599
So it looks like a nice circle, Martin.

48
00:03:22,499 --> 00:03:28,519
But we also get interactivity really easy.

49
00:03:28,679 --> 00:03:32,339
So we had this overview effect in the past where it zoomed out and it saw all

50
00:03:32,339 --> 00:03:36,679
your windows, but doing a drag and drop or clicking a window and dragging it

51
00:03:36,679 --> 00:03:39,219
into another desktop, that was a lot of painful code.

52
00:03:39,359 --> 00:03:41,319
And sometimes we didn't have all of this code.

53
00:03:41,479 --> 00:03:45,759
We can start searching and get krunner results and that's really easy.

54
00:03:45,919 --> 00:03:48,659
All sorts of drag and drop and sliding and swiping.

55
00:03:49,519 --> 00:03:51,019
Not very difficult code now.

56
00:03:52,979 --> 00:03:58,259
And QQuick 3D is amazing and it's relatively easy to use.

57
00:03:58,679 --> 00:04:04,259
So we added a cube back obviously because everybody loves a cube but I'll go for an example.

58
00:04:04,759 --> 00:04:08,479
We had that effect before where you click a mouse and you get a little circle.

59
00:04:09,059 --> 00:04:10,779
Why not a full 3D hand?

60
00:04:12,899 --> 00:04:16,959
And before I exported this to a PDF, this was a lot more exciting.

61
00:04:17,619 --> 00:04:22,399
So could you just pretend this is whizzing around with a vector animation on

62
00:04:22,399 --> 00:04:24,879
your rotation? Just imagine that.

63
00:04:26,879 --> 00:04:29,799
But it's not even very difficult code with Qt Quick.

64
00:04:30,079 --> 00:04:34,639
You get a model, you run this magic command called balsam, and then you've got

65
00:04:34,639 --> 00:04:36,259
your model and you can just throw it in there.

66
00:04:36,419 --> 00:04:39,099
And you've even got all sorts of things for 3D.

67
00:04:40,779 --> 00:04:44,479
And obviously, we should throw more particles at things because particles are

68
00:04:44,479 --> 00:04:46,959
awesome, especially 3D particles.

69
00:04:49,506 --> 00:04:54,726
So, we want to rewrite a lot of our effects, and that opens it up to everybody.

70
00:04:55,046 --> 00:04:58,786
If you see any Quinn effect code that is doing drawing, which is the part we

71
00:04:58,786 --> 00:05:02,226
want to really move over to Qt Quick, grab it.

72
00:05:02,346 --> 00:05:06,286
It's quite a good task to get involved in Quinn, if you're interested.

73
00:05:06,546 --> 00:05:10,606
Or do cool stuff with 3D and particles. But get involved.

74
00:05:12,346 --> 00:05:13,006
That's the end.

75
00:05:17,806 --> 00:05:20,686
Yeah it's lunchtime next i'm not gonna keep you,

76
00:05:23,346 --> 00:05:27,006
talk for five minutes more you have the time any quick questions,

77
00:05:31,006 --> 00:05:34,106
let's give the people time to prepare lunch,

78
00:05:39,686 --> 00:05:45,866
Not really a question, but just a comment. So declarative QML effects is something

79
00:05:45,866 --> 00:05:49,206
I dreamed about something like 10 years ago,

80
00:05:49,346 --> 00:05:56,306
and I had concept of how to do it, but the technology was just not there. So I really love it.

81
00:06:02,846 --> 00:06:06,986
Okay we have another quick one please is this

82
00:06:06,986 --> 00:06:10,286
on i just wanted to mention uh something you didn't mention in your slide but

83
00:06:10,286 --> 00:06:14,886
for the current c++ effects a lot of them also have a software path so this

84
00:06:14,886 --> 00:06:19,106
is really nice instead of the separate open gl and software path now it can

85
00:06:19,106 --> 00:06:25,186
all be through qt quick and that's quite a bit of complexity we could get rid of yeah so what

86
00:06:25,586 --> 00:06:29,906
We've only got two paths, it was going to go up to three, now we've gone down to one.