在哪里可以找到响应触摸的 iPhone OpenGL ES 示例? [英] Where can I find an iPhone OpenGL ES Example that responds to touch?

查看:11
本文介绍了在哪里可以找到响应触摸的 iPhone OpenGL ES 示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到一个响应触摸的 iPhone OpenGL ES 示例.理想情况下,它会满足这些要求:

  • 在屏幕中央显示一个像立方体一样的 3D 对象
  • 将纹理映射到立方体表面
  • 应在拖动手指时围绕立方体移动相机
  • 应该通过捏合来放大和缩小立方体上的相机
  • 可以选择在立方体后面有一个背景,环绕在相机的背面.(例如,这可以创建立方体在空间中的效果)

有没有人见过一个或多个可以做到这些或至少用纹理渲染立方体的例子?

解决方案

我的 iPhone 应用程序 Molecules 通过 BSD 许可证提供其源代码.它使用 OpenGL ES 来渲染分子结构,使用单点触摸来旋转结构,使用捏合手势进行缩放,以及同时移动两个手指来平移分子.不幸的是,它还没有使用纹理进行任何渲染.

我记录了我从中学到的关于 OpenGL ES 的一些事情 这里这里.p>

I would like to find an iPhone OpenGL ES Example that responds to touch. Ideally it would meet these requirements:

  • Displays a 3D object in the center of the screen like a cube
  • Maps a texture to the cube surfaces
  • Should move the camera around the cube as you drag your finger
  • Should zoom the camera in and out on the cube by pinching
  • Optionally has a background behind the cube that wraps around the back of the camera.(for example this could create the effect of the cube being in space)

Has anyone seen one or more examples that can do these or at least render the cube with the texture?

解决方案

My iPhone application Molecules has its source code available via a BSD license. It uses OpenGL ES to render a molecular structure, using single touches to rotate the structure, a pinch gesture for zooming, and simultaneous movement of two fingers for panning across the molecule. Unfortunately, it does not yet use textures for any of the rendering it does.

I document some of the things I've learned about OpenGL ES from it here and here.

这篇关于在哪里可以找到响应触摸的 iPhone OpenGL ES 示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆