¡@

Home 

2014/10/15 ¤U¤È 10:09:39

iphone Programming Glossary: glkbaseeffect

How to draw a line inside the fish movement (OpenGLES in iPhone)?

http://stackoverflow.com/questions/10499077/how-to-draw-a-line-inside-the-fish-movement-opengles-in-iphone

GLKView view GLKView self.view view.context self.context EAGLContext setCurrentContext self.context self.effect GLKBaseEffect alloc init GLKMatrix4 projectionMatrix GLKMatrix4MakeOrtho 0 480 0 320 1024 1024 self.effect.transform.projectionMatrix.. view GLKView self.view view.context self.context view.drawableDepthFormat GLKViewDrawableDepthFormat24 self.effect GLKBaseEffect alloc init self.effect prepareToDraw const GLfloat line 0.0f 0.5f 3.0f 1.0f GLuint bufferObjectNameArray glGenBuffers.. view GLKView self.view view.context self.context view.drawableDepthFormat GLKViewDrawableDepthFormat24 self.effect GLKBaseEffect alloc init self.effect prepareToDraw const GLfloat line 0.0f 0.5f 3.0f 1.0f GLuint bufferObjectNameArray glGenBuffers 1..

Draw a straight line using OpenGL ES in iPhone?

http://stackoverflow.com/questions/9736887/draw-a-straight-line-using-opengl-es-in-iphone

with the OpenGL Game template Apple provides. Among other things the Apple template code will include creation of a GLKBaseEffect which provides some Shader functionality that seems to be required in order to be able to draw with OpenGL ES 2.0. Without.. some Shader functionality that seems to be required in order to be able to draw with OpenGL ES 2.0. Without the GLKBaseEffect you would need to use GLSL. The template provides an example of both with and without explicit GLSL Shader code. The template.. function which I modified to look like this void setupGL EAGLContext setCurrentContext self.context self.effect GLKBaseEffect alloc init autorelease Let's color the line self.effect.useConstantColor GL_TRUE Make the line a cyan color self.effect.constantColor..