Mercurial > hg > pub > prymula > com
annotate DPF-Prymula-audioplugins/dpf/dgl/src/Vulkan.cpp @ 3:84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
author | prymula <prymula76@outlook.com> |
---|---|
date | Mon, 16 Oct 2023 21:53:34 +0200 |
parents | |
children |
rev | line source |
---|---|
3
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
1 /* |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
2 * DISTRHO Plugin Framework (DPF) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
4 * |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
5 * Permission to use, copy, modify, and/or distribute this software for any purpose with |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
6 * or without fee is hereby granted, provided that the above copyright notice and this |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
7 * permission notice appear in all copies. |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
8 * |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
10 * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
11 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
12 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
15 */ |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
16 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
17 #include "../Vulkan.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
18 #include "../Color.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
19 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
20 #include "SubWidgetPrivateData.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
21 #include "TopLevelWidgetPrivateData.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
22 #include "WidgetPrivateData.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
23 #include "WindowPrivateData.hpp" |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
24 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
25 START_NAMESPACE_DGL |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
26 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
27 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
28 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
29 static void notImplemented(const char* const name) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
30 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
31 d_stderr2("vulkan function not implemented: %s", name); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
32 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
33 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
34 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
35 // Color |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
36 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
37 void Color::setFor(const GraphicsContext&, bool) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
38 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
39 notImplemented("Color::setFor"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
40 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
41 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
42 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
43 // Line |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
44 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
45 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
46 void Line<T>::draw(const GraphicsContext&, T) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
47 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
48 notImplemented("Line::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
49 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
50 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
51 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
52 void Line<T>::draw() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
53 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
54 notImplemented("Line::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
55 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
56 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
57 template class Line<double>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
58 template class Line<float>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
59 template class Line<int>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
60 template class Line<uint>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
61 template class Line<short>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
62 template class Line<ushort>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
63 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
64 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
65 // Circle |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
66 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
67 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
68 void Circle<T>::draw(const GraphicsContext&) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
69 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
70 notImplemented("Circle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
71 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
72 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
73 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
74 void Circle<T>::drawOutline(const GraphicsContext&, T) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
75 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
76 notImplemented("Circle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
77 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
78 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
79 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
80 void Circle<T>::draw() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
81 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
82 notImplemented("Circle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
83 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
84 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
85 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
86 void Circle<T>::drawOutline() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
87 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
88 notImplemented("Circle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
89 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
90 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
91 template class Circle<double>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
92 template class Circle<float>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
93 template class Circle<int>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
94 template class Circle<uint>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
95 template class Circle<short>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
96 template class Circle<ushort>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
97 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
98 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
99 // Triangle |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
100 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
101 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
102 void Triangle<T>::draw(const GraphicsContext&) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
103 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
104 notImplemented("Triangle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
105 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
106 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
107 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
108 void Triangle<T>::drawOutline(const GraphicsContext&, T) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
109 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
110 notImplemented("Triangle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
111 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
112 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
113 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
114 void Triangle<T>::draw() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
115 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
116 notImplemented("Triangle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
117 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
118 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
119 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
120 void Triangle<T>::drawOutline() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
121 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
122 notImplemented("Triangle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
123 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
124 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
125 template class Triangle<double>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
126 template class Triangle<float>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
127 template class Triangle<int>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
128 template class Triangle<uint>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
129 template class Triangle<short>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
130 template class Triangle<ushort>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
131 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
132 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
133 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
134 // Rectangle |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
135 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
136 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
137 void Rectangle<T>::draw(const GraphicsContext&) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
138 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
139 notImplemented("Rectangle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
140 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
141 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
142 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
143 void Rectangle<T>::drawOutline(const GraphicsContext&, T) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
144 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
145 notImplemented("Rectangle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
146 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
147 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
148 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
149 void Rectangle<T>::draw() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
150 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
151 notImplemented("Rectangle::draw"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
152 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
153 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
154 template<typename T> |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
155 void Rectangle<T>::drawOutline() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
156 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
157 notImplemented("Rectangle::drawOutline"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
158 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
159 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
160 template class Rectangle<double>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
161 template class Rectangle<float>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
162 template class Rectangle<int>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
163 template class Rectangle<uint>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
164 template class Rectangle<short>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
165 template class Rectangle<ushort>; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
166 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
167 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
168 // VulkanImage |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
169 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
170 VulkanImage::VulkanImage() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
171 : ImageBase() {} |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
172 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
173 VulkanImage::VulkanImage(const char* const rdata, const uint w, const uint h, const ImageFormat fmt) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
174 : ImageBase(rdata, w, h, fmt) {} |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
175 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
176 VulkanImage::VulkanImage(const char* const rdata, const Size<uint>& s, const ImageFormat fmt) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
177 : ImageBase(rdata, s, fmt) {} |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
178 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
179 VulkanImage::VulkanImage(const VulkanImage& image) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
180 : ImageBase(image.rawData, image.size, image.format) {} |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
181 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
182 VulkanImage::~VulkanImage() {} |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
183 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
184 void VulkanImage::loadFromMemory(const char* const rdata, const Size<uint>& s, const ImageFormat fmt) noexcept |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
185 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
186 ImageBase::loadFromMemory(rdata, s, fmt); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
187 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
188 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
189 void VulkanImage::drawAt(const GraphicsContext&, const Point<int>&) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
190 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
191 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
192 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
193 VulkanImage& VulkanImage::operator=(const VulkanImage& image) noexcept |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
194 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
195 rawData = image.rawData; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
196 size = image.size; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
197 format = image.format; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
198 return *this; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
199 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
200 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
201 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
202 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
203 void SubWidget::PrivateData::display(const uint width, const uint height, const double autoScaleFactor) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
204 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
205 // TODO |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
206 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
207 selfw->pData->displaySubWidgets(width, height, autoScaleFactor); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
208 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
209 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
210 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
211 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
212 void TopLevelWidget::PrivateData::display() |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
213 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
214 if (! selfw->pData->visible) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
215 return; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
216 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
217 const Size<uint> size(window.getSize()); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
218 const uint width = size.getWidth(); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
219 const uint height = size.getHeight(); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
220 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
221 const double autoScaleFactor = window.pData->autoScaleFactor; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
222 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
223 // TODO |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
224 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
225 // main widget drawing |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
226 self->onDisplay(); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
227 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
228 // now draw subwidgets if there are any |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
229 selfw->pData->displaySubWidgets(width, height, autoScaleFactor); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
230 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
231 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
232 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
233 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
234 void Window::PrivateData::renderToPicture(const char*, const GraphicsContext&, uint, uint) |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
235 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
236 notImplemented("Window::PrivateData::renderToPicture"); |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
237 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
238 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
239 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
240 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
241 const GraphicsContext& Window::PrivateData::getGraphicsContext() const noexcept |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
242 { |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
243 return (const GraphicsContext&)graphicsContext; |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
244 } |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
245 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
246 // ----------------------------------------------------------------------- |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
247 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
248 END_NAMESPACE_DGL |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
249 |
84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
prymula <prymula76@outlook.com>
parents:
diff
changeset
|
250 // ----------------------------------------------------------------------- |