iphone openGL错误:预期'=',',',';' 'pyramidVertices'之前的'asm'或'_attribute_'

Fli*_*lam 0 iphone opengl-es objective-c

嘿 - 刚刚开始尝试将一些openGL放入我的iphone应用程序中,并为这段代码遇到了这个错误:

static const GLfloat pyramidVertices[] = { 
   0.0f,  1.0f,  0.0f,  
  -1.0f, -1.0f,  1.0f, 
   1.0f, -1.0f,  1.0f,  
   1.0f, -1.0f, -1.0f,  
  -1.0f, -1.0f, -1.0f  
};
Run Code Online (Sandbox Code Playgroud)

我不包括我应该做的事情吗?没有这一切,一切都很好.

干杯!

Rob*_*ier 5

您还没有导入定义GLfloat的gl.h.