【发布时间】:2012-06-11 18:33:02
【问题描述】:
我尝试使用 Michael Daley 为他的Particle Designer 构建的伟大粒子发射器在 GLKView 中工作。我看到了两种到达那里的方法:
- 破解来自他伟大(但太旧)tutorial 的代码,以便在 GLKView 中使用 iOS5.1
- 付费并使用他的粒子设计器将粒子效果添加到 glkview
我尝试了 1. 一整天,但独自结束并迷失在 openGL 的广阔土地上。我不知道如何从 GL-stuff 进行初始化或什么是重要的。
我移植了 Image、Texture2D、Common 和 ParticleEmitter 类,并在 GLKViewController 中实例化了它们,并在 ParticleEmitter.m 的第 341 行以 EXC_BAD_ACCESS 结束:
// Now that all of the VBOs have been used to configure the vertices, pointer size and color
// use glDrawArrays to draw the points
glDrawArrays(GL_POINTS, 0, particleIndex);
我不知道为什么或什么......
现在我考虑购买粒子设计器并尝试在 GLKViewController 及其 GLKView 中实现它。
有没有人可以帮助我完成 1./2。解决我的问题,将 OpenGL 粒子发射器添加到基于视图的应用程序中?
谢谢!
编辑:删除了一些愚蠢的代码
【问题讨论】:
标签: objective-c ios opengl-es eaglview particle-system