MRaster examples 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
glut_image.cpp File Reference

One way to get images from a ramCanvas into OpenGL. More...

Go to the source code of this file.

Detailed Description

One way to get images from a ramCanvas into OpenGL.

Author
Mitch Richling http://www.mitchr.me/
Date
2022-07-23
Version
VERSION
Standards
C++20
Details


We illustrate how to use the exportRasterData() member to get data suitable for use as an OpenGL image. Note that ramCanvas.h also supports directly an internal representation that is the same as that used by OpenGL — so one can actually use the raw pixel store in the ramCanvas as OpenGL image data. This program illustrates how one might get OpenGL image data if the ramCanvas for some reason was not internally compatible with OpenGL. Note this same technique allows easy integration with other libraries requiring similar data formats.

Definition in file glut_image.cpp.