26#include <opencv2/core/core.hpp>
32#ifdef JEVOIS_PLATFORM_PRO
33 class GPUtextureDmaBuf;
55 void set(cv::Mat
const & img,
bool rgb);
81 void draw(
int & x,
int & y,
unsigned short & w,
unsigned short &
h,
bool noalias, glm::mat4
const & pvm);
85 ImVec2
i2d(ImVec2
const & p);
89 ImVec2
i2ds(ImVec2
const & p);
93 ImVec2
d2i(ImVec2
const & p);
97 ImVec2
d2is(ImVec2
const & p);
100 void twirl(
float t,
float alpha = 1.0F);
103 void setInternal(
unsigned int width,
unsigned int height,
unsigned int fmt,
unsigned char const * data);
108#ifdef JEVOIS_PLATFORM_PRO
Class to hold a GPUtexture, GPUprogram, and other data associated with rendering an image in OpenGL.
GLuint itsVertexBuffers[2]
ImVec2 i2ds(ImVec2 const &p)
Convert a 2D size from within a rendered image to on-screen.
unsigned int itsDrawHeight
unsigned int itsTextureWidth
std::shared_ptr< GPUprogram > itsProgram
void setWithDmaBuf(jevois::RawImage const &img, int dmafd, EGLDisplay display)
ImVec2 i2d(ImVec2 const &p)
Convert coordinates of a point from within a rendered image to on-screen.
void set(RawImage const &img)
Set pixel data from a vanilla RawImage, pixel data will be copied to texture.
void twirl(float t, float alpha=1.0F)
Optional twirl and alpha fading effect to the image, useful mostly for demos/transitions.
std::shared_ptr< GPUtextureDmaBuf > itsTextureDmaBuf
unsigned int itsTextureHeight
ImVec2 d2i(ImVec2 const &p)
Convert coordinates of a point from on-screen to within a rendered image.
void set2(InputFrame const &frame, EGLDisplay display)
Set pixel data from camera input second (scaled) frame, sharing data with camera kernel driver using ...
std::shared_ptr< GPUtexture > itsTexture
void setInternal(unsigned int width, unsigned int height, unsigned int fmt, unsigned char const *data)
ImVec2 d2is(ImVec2 const &p)
Convert a 2D size from on-screen to within a rendered image.
void draw(int &x, int &y, unsigned short &w, unsigned short &h, bool noalias, glm::mat4 const &pvm)
Draw to OpenGL.
unsigned int itsDrawWidth
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
Main namespace for all JeVois classes and functions.