Wed, 25 May 2022 20:36:34 +0300
Fix pick() picking from weird places on the screen with high DPI scaling
glReadPixels reads data from the frame buffer, which contains data after
high DPI scaling, so any reads to that need to take this scaling into account
150
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
1 | #pragma once |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
2 | #include "main.h" |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
3 | #include "model.h" |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
4 | |
193 | 5 | struct PolygonCache |
150
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
6 | { |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
7 | std::vector<gl::Polygon> cachedPolygons; |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
8 | bool needRecache = true; |
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
9 | }; |
193 | 10 | |
11 | const std::vector<gl::Polygon>& getCachedPolygons( | |
12 | PolygonCache* cache, | |
13 | Model* model, | |
14 | class DocumentManager* documents); |