1 #ifndef GL_RENDER_IMAGE_H 2 #define GL_RENDER_IMAGE_H 4 #include <KrisLibrary/camera/viewport.h> 5 #include <KrisLibrary/image/image.h> 35 bool Setup(
int w,
int h);
44 void GetRGBA(std::vector<unsigned int>& image);
46 void GetRGBA(std::vector<unsigned char>& image);
48 void GetRGBA(std::vector<std::vector<unsigned int> >& image);
52 void GetRGB(std::vector<unsigned char>& image);
67 unsigned int color_tex,fb,depth_rb;
72 #endif //GL_RENDER_IMAGE_H Allows for GL calls to draw to an image.
Definition: GLRenderToImage.h:28
void GetRGBA(std::vector< unsigned int > &image)
scan line order, top left to bottom right
Definition: GLRenderToImage.cpp:189
void GetDepth(const Camera::Viewport &vp, std::vector< float > &image)
scan line order, top left to bottom right
Definition: GLRenderToImage.cpp:333
void Begin()
Call Begin before rendering.
Definition: GLRenderToImage.cpp:166
A class containing viewport / camera information. This uses OpenGL coordinate convention in which x i...
Definition: viewport.h:11
Contains all definitions in the GLDraw package.
Definition: AnyGeometry.h:14
bool Setup(int w, int h)
Call this first to see if render to image is supported.
Definition: GLRenderToImage.cpp:51
void End()
Call End after rendering.
Definition: GLRenderToImage.cpp:179
void GetRGB(std::vector< unsigned char > &image)
pixels in scan line order in RGB format, top left to bottom right
Definition: GLRenderToImage.cpp:259
void GetZBuffer(std::vector< float > &image)
this is the raw value in the z buffer
Definition: GLRenderToImage.cpp:300