27 #ifndef UTIL_IMAGEWINDOW_H
28 #define UTIL_IMAGEWINDOW_H
30 #if defined(OVR_OS_WIN32)
31 #define WIN32_LEAN_AND_MEAN 1
37 #include "../../Include/OVR.h"
38 #include "../Kernel/OVR_Hash.h"
39 #include "../Kernel/OVR_Array.h"
40 #include "../Kernel/OVR_Threads.h"
41 #include "../Kernel/OVR_Deque.h"
45 namespace OVR {
namespace Util {
93 plots.ClearAndRelease();
109 #if defined(OVR_OS_WIN32)
113 ID2D1RenderTarget* pRT;
114 D2D1_SIZE_U resolution;
116 Mutex* frontBufferMutex;
120 ID2D1Bitmap* greyBitmap;
121 ID2D1Bitmap* colorBitmap;
129 void GetResolution(
size_t& width,
size_t& height ) { width = resolution.width; height = resolution.height; }
133 void UpdateImage(
const uint8_t* imageData, uint32_t width, uint32_t height ) {
UpdateImageBW( imageData, width, height ); }
134 void UpdateImageBW(
const uint8_t* imageData, uint32_t width, uint32_t height );
135 void UpdateImageRGBA(
const uint8_t* imageData, uint32_t width, uint32_t height, uint32_t pitch );
142 void addCircle(
float x ,
float y,
float radius,
float r,
float g,
float b,
bool fill );
150 Ptr<Frame> lastUnreadyFrame();
155 static ID2D1Factory* pD2DFactory;
156 static IDWriteFactory* pDWriteFactory;
169 void GetResolution(
size_t& width,
size_t& height ) { width = 0; height = 0; }
174 void UpdateImageBW(
const uint8_t* imageData, uint32_t width, uint32_t height ) { }
175 void UpdateImageRGBA(
const uint8_t* imageData, uint32_t width, uint32_t height, uint32_t pitch ) { }
182 void addCircle(
float x ,
float y,
float radius,
float r,
float g,
float b,
bool fill ) { }
void GetResolution(size_t &width, size_t &height)
void addCircle(float x, float y, float radius, float r, float g, float b, bool fill)
static const int MaxWindows
void UpdateImage(const uint8_t *imageData, uint32_t width, uint32_t height)
ImageWindow(uint32_t width, uint32_t height)
void UpdateImageRGBA(const uint8_t *imageData, uint32_t width, uint32_t height, uint32_t pitch)
static ImageWindow * GlobalWindow(int window)
Array< TextPlot > textLines
void addText(float x, float y, float r, float g, float b, OVR::String text)
Array< CirclePlot > plots
void UpdateImageBW(const uint8_t *imageData, uint32_t width, uint32_t height)
void AssociateSurface(void *surface)
static ImageWindow * globalWindow[4]