… | |
… | |
164 | ($dw, $dh) = ($tw, $th); |
164 | ($dw, $dh) = ($tw, $th); |
165 | } |
165 | } |
166 | } |
166 | } |
167 | |
167 | |
168 | if ($render) { |
168 | if ($render) { |
169 | $ox = int .5 * ($::WIDTH - $tw); |
169 | $ox = int .5 * ($::WIDTH - $rw); |
170 | $oy = int .5 * ($::HEIGHT - $th); |
170 | $oy = int .5 * ($::HEIGHT - $rh); |
171 | |
171 | |
172 | glViewport $ox, $oy, $tw, $th; |
172 | glViewport $ox, $oy, $tw, $th; |
173 | #glScissor 0, 0, $tw, $th; |
173 | #glScissor 0, 0, $tw, $th; |
174 | #glEnable GL_SCISSOR_TEST; |
174 | #glEnable GL_SCISSOR_TEST; |
175 | glMatrixMode GL_PROJECTION; |
175 | glMatrixMode GL_PROJECTION; |