Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/task/CreateSpan.cc @ 1047:6a80ca9a65d9
broken texure ( h/w != 2^n ) protection
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 05:38:45 +0900 |
parents | 55159a5bf2c4 |
children |
comparison
equal
deleted
inserted
replaced
1046:8c75060eb153 | 1047:6a80ca9a65d9 |
---|---|
151 getScale(int width, int height, int tex_width, int tex_height, int scale_max) | 151 getScale(int width, int height, int tex_width, int tex_height, int scale_max) |
152 { | 152 { |
153 int base, tex_base; | 153 int base, tex_base; |
154 int scale = 1; | 154 int scale = 1; |
155 | 155 |
156 if (scale_max==0) return 1; // broken case | |
156 /** | 157 /** |
157 * width と height で、長い方を基準に、 | 158 * width と height で、長い方を基準に、 |
158 * texture の scale を決める | 159 * texture の scale を決める |
159 */ | 160 */ |
160 if (width > height) { | 161 if (width > height) { |