¡@

Home 

c++ Programming Glossary: gl_unpack_row_length

openGL SubTexturing

http://stackoverflow.com/questions/205522/opengl-subtexturing

this question Edit Use glPixelStorei. You use it to set GL_UNPACK_ROW_LENGTH to the width in pixels of the entire image. Then you call glTexImage2D.. width and height of the subimage. Don't forget to restore GL_UNPACK_ROW_LENGTH to 0 when you're finished with it. Ie glPixelStorei GL_UNPACK_ROW_LENGTH.. to 0 when you're finished with it. Ie glPixelStorei GL_UNPACK_ROW_LENGTH img_width char subimg char m_data sub_x sub_y img_width 4 glTexImage2D..