本文介绍了如何在iPhone上使用openGLES制作水效果视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了这个视频: http://www.youtube.com/watch?v=eVi6ThY3LRs 我想知道这是否是openGLES的某种标准效果.我非常确定,因为我经常看到这种情况. KoiPond使用它,DuckDuckDuck使用它.许多游戏都使用它.他们并不都是宇航员.他们是普通的程序员;)那这是怎么做的呢?网路上有任何相关的教学课程吗?

I found this vid: http://www.youtube.com/watch?v=eVi6ThY3LRsI wonder if that's some kind of standard effect of openGLES. I'm pretty sure it is, since I have seen this pretty often. KoiPond uses it, DuckDuckDuck uses it. A lot of games use it. They're not all astronauts. They're normal programmers ;) So how is this done? Is there any tutorial for this on the web?

推荐答案

有关旧示例,请查看'扭曲示例.请注意,这是早在1992年创建的(仅在distort.c中查看).

For an old example have a look at the 'distort' example. Note that this is a thing created back in 1992 (just looked in distort.c).

我设法在Mac上编译了示例.

I managed to compile the example on my mac.

  • 将所有#include <GL/glut.h>重命名为#include <GLUT/glut.h>
  • idle()函数中添加usleep(33*1000);
  • 将文件ripple_precalc.c重命名为ripple_precalc.c.org(或仅将其rm)
  • 使用"cc *.c -framework GLUT -framework OpenGL"进行编译将创建a.out
  • Rename all #include <GL/glut.h> to #include <GLUT/glut.h>
  • Add a usleep(33*1000); in the idle() function
  • Rename the file ripple_precalc.c to ripple_precalc.c.org (or just rm it)
  • Compile with "cc *.c -framework GLUT -framework OpenGL" will create an a.out

这篇关于如何在iPhone上使用openGLES制作水效果视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 17:30