当前位置: 动力学知识库 > 问答 > 编程问答 >

OpenGL ES 1.1 2D (iPhone): Resizing a group of textures/rectangular objects

问题描述:

I'm trying to resize whats being displayed by OpneGL ES on the screen by a factor equally.

More clearly, i'm trying to resize a layer by a factor, so that all the objects associated with that layer are resized by that factor.

-Suppose i have 2 images:image_1 of size:100x100 and image_2 of size:50x50. Both in layer_1.

-I set the layer_1 size to 0.5.

-The image_1 and image_2 should resize to 50x50 and 25x25 respectively.

-The images should be drawn in a new resized position.

I've been able to achieve this effect by doing some calculations on the CPU.

I would like to know if there is a way to do it on the GPU. Something like drawing to an empty texture. Is it possible with OpenGL ES 1.1? I'm quite new to OpenGL and graphics.

网友答案:

I don't think you will be able to calculate the scale on the GPU. So you will have to do calculations on the CPU as far as I know.

For the most part with OpenGL the drawing is handled with the GPU while most calculations are handled with the CPU.

分享给朋友:
您可能感兴趣的文章:
随机阅读: