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

Unified Diff: gpu/demos/framework/pepper.cc

Issue 6062003: Added ppapi::Context3D interface. The API has already been reviewed. I am add... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | ppapi/c/dev/pp_graphics_3d_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/demos/framework/pepper.cc
===================================================================
--- gpu/demos/framework/pepper.cc (revision 69970)
+++ gpu/demos/framework/pepper.cc (working copy)
@@ -8,10 +8,11 @@
#include "gpu/demos/framework/demo_factory.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/dev/graphics_3d_dev.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/size.h"
+#include "ppapi/cpp/dev/context_3d_dev.h"
+#include "ppapi/cpp/dev/graphics_3d_dev.h"
#include "ppapi/lib/gl/gles2/gl2ext_ppapi.h"
namespace gpu {
@@ -29,8 +30,8 @@
}
~PluginInstance() {
- if (!graphics_.is_null()) {
- glSetCurrentContextPPAPI(graphics_.pp_resource());
+ if (!context_.is_null()) {
+ glSetCurrentContextPPAPI(context_.pp_resource());
delete demo_;
glSetCurrentContextPPAPI(0);
}
@@ -44,15 +45,15 @@
size_ = position.size();
demo_->InitWindowSize(size_.width(), size_.height());
- if (graphics_.is_null()) {
- graphics_ = pp::Graphics3D_Dev(*this, 0, NULL, NULL);
- if (graphics_.is_null())
+ if (context_.is_null()) {
+ context_ = pp::Context3D_Dev(*this, 0, pp::Context3D_Dev(), NULL);
+ if (context_.is_null())
return;
- if (!pp::Instance::BindGraphics(graphics_))
+ if (!pp::Instance::BindGraphics(context_))
return;
- glSetCurrentContextPPAPI(graphics_.pp_resource());
+ glSetCurrentContextPPAPI(context_.pp_resource());
demo_->InitGL();
glSetCurrentContextPPAPI(0);
}
@@ -64,9 +65,9 @@
}
void Paint() {
- glSetCurrentContextPPAPI(graphics_.pp_resource());
+ glSetCurrentContextPPAPI(context_.pp_resource());
demo_->Draw();
- graphics_.SwapBuffers();
+ context_.SwapBuffers();
glSetCurrentContextPPAPI(0);
}
@@ -79,7 +80,7 @@
pp::Module* module_;
Demo* demo_;
- pp::Graphics3D_Dev graphics_;
+ pp::Context3D_Dev context_;
pp::Size size_;
pp::CompletionCallbackFactory<PluginInstance> callback_factory_;
};
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | ppapi/c/dev/pp_graphics_3d_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698