- Home /
Call glDrawArrays on iPohone and then Error
Unity's GL class is too slow to many (tens of thousands~ ) lines.
 So I'm trying to draw lines by native glDrawArrays call.
I called the obj-c function bellow in OnPostRender of Main Camera, but nothing was drawn,
 and error message "OpenGLES error 0x0502" was printed.
 void drawLines(){
     static const GLfloat vertices[] = {
         -1.0f, -1.0f, 0,
         -1.0f, 1.0f,  0,
         1.0f,  1.0f, 0,
         1.0f, -1.0f, 0,
     };
     glBindBuffer(GL_ARRAY_BUFFER, 0);
     glVertexPointer(3, GL_FLOAT, 0, vertices);
     glEnableClientState(GL_VERTEX_ARRAY);
     glDrawArrays(GL_LINE_STRIP, 0, 4);
 
 }
What is wrong?
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Calling UnitySendMessage requires which library on iOS? 2 Answers
ES2.0 Diffuse Shader? 0 Answers
renderplugin example not working on ios 1 Answer
Objective-C Plugin issue 1 Answer
Open GL Binding 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                