MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / getPixel

Method getPixel

include/TGALoader/TGALoader.h:39–39  ·  view source on GitHub ↗

Returns the pixel at location (x,y). ! ATTENTION: "getPixel (x,y)[0]" is BLUE "getPixel (x,y)[1]" is GREEN "getPixel (x,y)[2]" is RED "getPixel (x,y)[3]" is ALPHA This allows faster load-times (TGAs are stored this way natively) and faster upload-times to OpenGL. Use GL_BGRA as "format", when uploading the data to OpenGL. */

Source from the content-addressed store, hash-verified

37 Use GL_BGRA as "format", when uploading the data to OpenGL.
38 */
39 const unsigned char* getPixel (int x, int y) const {return (&m_Pixels[(y * m_iImageWidth + x) *4]);}
40
41 //! Returns the raw array, as needed when uploading the image to OpenGL.
42 /*! Upload the image to OpenGL like this:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected