Lines Matching refs:context_

137       context_(0),
205 context_ =
235 delete context_;
236 context_ = 0;
263 } else if (context_) {
264 context_->viewport(0, 0, rect_.width, rect_.height);
266 context_->bindTexture(GL_TEXTURE_2D, color_texture_);
267 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
268 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
269 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
270 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
271 context_->texImage2D(GL_TEXTURE_2D,
280 context_->bindFramebuffer(GL_FRAMEBUFFER, framebuffer_);
281 context_->framebufferTexture2D(
287 context_->genMailboxCHROMIUM(mailbox.name);
288 context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
289 context_->flush();
290 uint32 sync_point = context_->insertSyncPoint();
387 if (!context_)
393 color_texture_ = context_->createTexture();
394 framebuffer_ = context_->createFramebuffer();
396 context_->viewport(0, 0, rect_.width, rect_.height);
397 context_->disable(GL_DEPTH_TEST);
398 context_->disable(GL_SCISSOR_TEST);
400 context_->clearColor(color[0], color[1], color[2], color[3]);
402 context_->enable(GL_BLEND);
403 context_->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
410 context_->viewport(0, 0, rect_.width, rect_.height);
411 context_->clear(GL_COLOR_BUFFER_BIT);
453 context_->deleteProgram(scene_.program);
457 context_->deleteBuffer(scene_.vbo);
462 context_->deleteFramebuffer(framebuffer_);
467 context_->deleteTexture(color_texture_);
490 scene_.color_location = context_->getUniformLocation(scene_.program, "color");
492 context_->getAttribLocation(scene_.program, "position");
499 scene_.vbo = context_->createBuffer();
505 context_->bindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
506 context_->bufferData(GL_ARRAY_BUFFER, sizeof(vertices), 0, GL_STATIC_DRAW);
507 context_->bufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices);
516 context_->useProgram(scene_.program);
521 context_->uniform4f(
525 context_->bindBuffer(GL_ARRAY_BUFFER, scene_.vbo);
526 context_->enableVertexAttribArray(scene_.position_location);
527 context_->vertexAttribPointer(
529 context_->drawArrays(GL_TRIANGLES, 0, 3);
533 unsigned shader = context_->createShader(type);
535 context_->shaderSource(shader, source.data());
536 context_->compileShader(shader);
539 context_->getShaderiv(shader, GL_COMPILE_STATUS, &compiled);
541 context_->deleteShader(shader);
552 unsigned program = context_->createProgram();
554 context_->attachShader(program, vertex_shader);
555 context_->attachShader(program, fragment_shader);
556 context_->linkProgram(program);
559 context_->getProgramiv(program, GL_LINK_STATUS, &linked);
561 context_->deleteProgram(program);
566 context_->deleteShader(vertex_shader);
568 context_->deleteShader(fragment_shader);