¡@

Home 

c++ Programming Glossary: ratioimg

Image scaling (KeepAspectRatioByExpanding) through OpenGL

http://stackoverflow.com/questions/9011108/image-scaling-keepaspectratiobyexpanding-through-opengl

0 switch n_mode case 0 KeepAspectRatioByExpanding float ratioImg float img_width img_height float ratioScreen gl_width gl_height.. img_height float ratioScreen gl_width gl_height if ratioImg ratioScreen gl_width 2 gl_height 2 ratioScreen ratioImg else.. ratioImg ratioScreen gl_width 2 gl_height 2 ratioScreen ratioImg else gl_height 2 gl_width 2 ratioScreen ratioImg calculate..