ios - about the glkview -


the thing this:

-(void)glkview:(glkview *)view drawinrect:(cgrect)rect     {      glfloat firstbar=[self.myfirstbar.text floatvalue];     glfloat secondbar=[self.mysecondbar.text floatvalue];     glfloat thirdbar=[self.mythirdbar.text floatvalue];     glfloat fourthbar=[self.myfourthbar.text floatvalue];      glclearcolor(1.0f, 1.0f, 1.0f, 1.0f);     glclear(gl_color_buffer_bit | gl_depth_buffer_bit);      glint situationnum=_situationbar.selectedsegmentindex;      [m_fourbar draw:firstbar secondbar:secondbar thirdbar:thirdbar fourthbar:fourthbar situation:situationnum]; } 

this glkview in viewcontroller. because firstbar, secondbar, thirdbar , fourthbar numbers want pass method of draw:firstbar secondbar:secondbar thirdbar:thirdbar fourthbar:fourthbar situation:situationnum. works if set 4 bars numbers instead of variables. want use user can type numbers textfields. , push button activate it. here uibutton in viewcontroller:

-(ibaction)startbutton:(uibutton *)sender {      glfloat firstbar=[self.myfirstbar.text floatvalue];     glfloat secondbar=[self.mysecondbar.text floatvalue];     glfloat thirdbar=[self.mythirdbar.text floatvalue];     glfloat fourthbar=[self.myfourthbar.text floatvalue];       glint situationnum=_situationbar.selectedsegmentindex;      [m_fourbar draw:firstbar secondbar:secondbar thirdbar:thirdbar fourthbar:fourthbar situation:situationnum]; } 

draw:firstbar secondbar:secondbar thirdbar:thirdbar fourthbar:fourthbar situation:situationnum class's method.

i find glkview can make opengl draw animation directly, means can call method several times. why that? thank helps.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -