i trying use opengl first time , i've ran error can not figure out.
i using code:
here vertex shader code:
attribute vec4 position; //attribute mediump vec4 inputtexturecoordinate; // //varying mediump vec2 texturecoordinate; attribute vec4 inputtexturecoordinate; varying vec2 texturecoordinate; void main() { gl_position = position; texturecoordinate = inputtexturecoordinate.xy; } and here code trying load with
nsstring *vertshaderpathname, *fragshaderpathname; // create shader program. *programpointer = glcreateprogram(); // create , compile vertex shader. vertshaderpathname = [[nsbundle mainbundle] pathforresource:vertexshadername oftype:@"vsh"]; if (![self compileshader:&vertexshader type:gl_vertex_shader file:vertshaderpathname]) { nslog(@"failed compile vertex shader"); and error of failed compile vertex shader , crashes application. know how can fix issue?
Comments
Post a Comment