Lines Matching refs:state_
324 state_(new GLState()),
327 state_->angle_ = 45.0f;
333 if (state_->vbo_vertices_)
334 glDeleteBuffers(1, &state_->vbo_vertices_);
335 if (state_->vbo_indices_)
336 glDeleteBuffers(1, &state_->vbo_indices_);
337 if (state_->program_object_)
338 glDeleteProgram(state_->program_object_);
340 delete state_;
370 state_->program_object_ = LoadProgram(
372 state_->position_location_ = glGetAttribLocation(
373 state_->program_object_, "a_position");
374 state_->mvp_location_ = glGetUniformLocation(
375 state_->program_object_, "u_mvpMatrix");
376 state_->num_indices_ = GenerateCube(&state_->vbo_vertices_,
377 &state_->vbo_indices_);
389 state_->OnGLContextLost();
400 state_->angle_ += RotationForTimeDelta(delta_time) * fling_multiplier_;
401 if (state_->angle_ >= 360.0f)
402 state_->angle_ -= 360.0f;
414 state_->angle_ += RotationForDragDistance(distance);
415 if (state_->angle_ >= 360.0f )
416 state_->angle_ -= 360.0f;
425 glUseProgram(state_->program_object_);
427 glBindBuffer(GL_ARRAY_BUFFER, state_->vbo_vertices_);
428 glVertexAttribPointer(state_->position_location_,
433 glEnableVertexAttribArray(state_->position_location_);
435 glUniformMatrix4fv(state_->mvp_location_,
438 (GLfloat*) &state_->mvp_matrix_.m[0][0]);
439 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, state_->vbo_indices_);
441 state_->num_indices_,
456 modelview.Rotate(state_->angle_ * direction_, 1.0, 0.0, 1.0);
458 state_->mvp_matrix_.Multiply(&modelview, &perspective);