feat: pass through fragment coordinates for picking

This commit is contained in:
Nick Fisher
2024-10-29 17:22:48 +08:00
parent 4ed0e69321
commit 07bdc028df
10 changed files with 142 additions and 104 deletions

View File

@@ -98,7 +98,9 @@ namespace thermion
void clearBackgroundImage();
void setBackgroundImagePosition(float x, float y, bool clamp, uint32_t width, uint32_t height);
void pick(View *view, uint32_t x, uint32_t y, void (*callback)(EntityId entityId, int x, int y, View *view));
typedef void (*PickCallback)(EntityId entityId, int x, int y, View *view, float depth, float fragX, float fragY, float fragZ);
void pick(View *view, uint32_t x, uint32_t y, PickCallback callback);
Engine* getEngine() {
return _engine;
}