¡@

Home 

c++ Programming Glossary: ratioscreen

Image scaling (KeepAspectRatioByExpanding) through OpenGL

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

float ratioImg float img_width img_height float ratioScreen gl_width gl_height if ratioImg ratioScreen gl_width 2 gl_height.. float ratioScreen gl_width gl_height if ratioImg ratioScreen gl_width 2 gl_height 2 ratioScreen ratioImg else gl_height.. gl_height if ratioImg ratioScreen gl_width 2 gl_height 2 ratioScreen ratioImg else gl_height 2 gl_width 2 ratioScreen ratioImg..