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. */
| 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: |
nothing calls this directly
no outgoing calls
no test coverage detected