MCPcopy Create free account
hub / github.com/cginternals/globjects / readPixelsToByteArray

Method readPixelsToByteArray

source/globjects/source/Framebuffer.cpp:285–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285std::vector<unsigned char> Framebuffer::readPixelsToByteArray(const std::array<GLint, 4> & rect, const GLenum format, const GLenum type) const
286{
287 int size = imageSizeInBytes(rect[2], rect[3], 1, format, type);
288 std::vector<unsigned char> data(size);
289
290 readPixels(rect, format, type, data.data());
291
292 return data;
293}
294
295std::vector<unsigned char> Framebuffer::readPixelsToByteArray(GLenum readBuffer, const std::array<GLint, 4> & rect, GLenum format, GLenum type) const
296{

Callers

nothing calls this directly

Calls 2

imageSizeInBytesFunction · 0.85
dataMethod · 0.80

Tested by

no test coverage detected