Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: examples/spinning_cube/gles2_client_impl.cc

Issue 1258733003: Expose glResizeCHROMIUM() and remove some uses of MojoGLES2GetGLES2Interface(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/spinning_cube/BUILD.gn ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/spinning_cube/gles2_client_impl.cc
diff --git a/examples/spinning_cube/gles2_client_impl.cc b/examples/spinning_cube/gles2_client_impl.cc
index ce638ead891c0aca1c1c00a02186616feb9701e7..a0f7cafde35813488dce315576d7131e4d5b7612 100644
--- a/examples/spinning_cube/gles2_client_impl.cc
+++ b/examples/spinning_cube/gles2_client_impl.cc
@@ -2,14 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifndef GL_GLEXT_PROTOTYPES
+#define GL_GLEXT_PROTOTYPES
+#endif
+
#include "examples/spinning_cube/gles2_client_impl.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include <GLES2/gl2extchromium.h>
#include <math.h>
#include <stdlib.h>
-#include "gpu/command_buffer/client/gles2_interface.h"
#include "mojo/public/c/gles2/gles2.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/utility/run_loop.h"
@@ -48,10 +52,7 @@ void GLES2ClientImpl::SetSize(const mojo::Size& size) {
cube_.set_size(size_.width, size_.height);
if (size_.width == 0 || size_.height == 0 || !context_)
return;
- static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))->ResizeCHROMIUM(size_.width,
- size_.height,
- 1);
+ glResizeCHROMIUM(size_.width, size_.height, 1.f);
WantToDraw();
}
« no previous file with comments | « examples/spinning_cube/BUILD.gn ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698