c++ Programming Glossary: img_width
openGL SubTexturing http://stackoverflow.com/questions/205522/opengl-subtexturing finished with it. Ie glPixelStorei GL_UNPACK_ROW_LENGTH img_width char subimg char m_data sub_x sub_y img_width 4 glTexImage2D.. img_width char subimg char m_data sub_x sub_y img_width 4 glTexImage2D GL_TEXTURE_2D 0 GL_RGBA sub_width sub_height.. to pointer maths glPixelStorei GL_UNPACK_ROW_LENGTH img_width glPixelStorei GL_UNPACK_SKIP_PIXELS sub_x glPixelStorei GL_UNPACK_SKIP_ROWS..
Image scaling (KeepAspectRatioByExpanding) through OpenGL http://stackoverflow.com/questions/9011108/image-scaling-keepaspectratiobyexpanding-through-opengl GL_TEXTURE_RECTANGLE_ARB glClearColor 0.3 0.3 0.4 1.0 int img_width _frame width int img_height _frame height int offset_x 0 int.. ratio and offset Y for widescreen borders double ratiox img_width gl_width double ratioy img_height gl_height if ratiox ratioy.. gl_height 2 gl_height offset_y 2 else gl_width qRound img_width ratioy offset_x qRound width gl_width 2 gl_width offset_x..
|