struct
#include <engine/render/picker/picker.hpp>
RenderPicker Component which provides a texture to store entity/gizmo ids, for selection with a mouse.
Public functions
- auto read(unsigned int x, unsigned int y) const -> uint32_t
- Reads the identifier at the given pixel coordinates.
Public variables
- glm::uvec2 size
- Size of the RenderPicker textures, in pixels.
- bool cleared
- Whether the RenderPicker front texture has already been cleared this frame.
-
core::
gl:: Texture2D backTexture - Picking back texture, stores entity/gizmo ids for each pixel on the screen. Access to the picker results is made through this texture, to ensure the CPU doesn't wait for the current frame to finish.
-
core::
gl:: Texture2D frontTexture - Picking front texture, stores entity/gizmo ids for each pixel on the screen. This is the texture used by the renderer to write ids. It is automatically swapped with the back texture by the renderPickerPlugin.
-
core::
gl:: PixelPackBuffer pixelBuffer - Pixel pack buffer used to access the data in the backTexture.
Function documentation
uint32_t cubos:: engine:: RenderPicker:: read(unsigned int x,
unsigned int y) const
Reads the identifier at the given pixel coordinates.
Parameters | |
---|---|
x | X coordinate. |
y | Y coordinate. |
Returns | Identifier. |