MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mxvk::VKSpritePixelPlotter Struct Reference

Pixel plotter adapter that draws square pixels into a VK_Sprite. More...

#include <mxvk/include/mxvk/mxvk_math.h>

Public Member Functions

void operator() (int x, int y, MXCOLOR) const
 Plot one square pixel if the sprite is valid.
void operator() (int x, int y, MXCOLOR) const
 Plot one square pixel if the sprite is valid.

Public Attributes

int size = 1
 Square pixel size in sprite coordinates.
VK_Spritesprite = nullptr
 Sprite receiving plotted pixels.

Detailed Description

Pixel plotter adapter that draws square pixels into a VK_Sprite.

Definition at line 2066 of file mxvk_math.h.

Member Function Documentation

◆ operator()() [1/2]

void mxvk::VKSpritePixelPlotter::operator() ( int x,
int y,
MXCOLOR  ) const
inline

Plot one square pixel if the sprite is valid.

Definition at line 2074 of file mxvk_math.h.

2074 {
2075 if (sprite != nullptr) {
2076 sprite->drawSpriteRect(x, y, std::max(1, size), std::max(1, size));
2077 }
2078 }
int size
Square pixel size in sprite coordinates.
Definition mxvk_math.h:2071
VK_Sprite * sprite
Sprite receiving plotted pixels.
Definition mxvk_math.h:2068

◆ operator()() [2/2]

void mxvk::VKSpritePixelPlotter::operator() ( int x,
int y,
MXCOLOR  ) const
inline

Plot one square pixel if the sprite is valid.

Definition at line 2087 of file mxvk_math_eigen.hpp.

2087 {
2088 if (sprite != nullptr) {
2089 sprite->drawSpriteRect(x, y, std::max(1, size), std::max(1, size));
2090 }
2091 }

Member Data Documentation

◆ size

int mxvk::VKSpritePixelPlotter::size = 1

Square pixel size in sprite coordinates.

Definition at line 2071 of file mxvk_math.h.

◆ sprite

VK_Sprite * mxvk::VKSpritePixelPlotter::sprite = nullptr

Sprite receiving plotted pixels.

Definition at line 2068 of file mxvk_math.h.


The documentation for this struct was generated from the following files: