OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
11 #include "ppapi/c/ppb_opengles2.h" | 11 #include "ppapi/c/ppb_opengles2.h" |
12 #include "ppapi/cpp/core.h" | 12 #include "ppapi/cpp/core.h" |
13 #include "ppapi/cpp/fullscreen.h" | 13 #include "ppapi/cpp/fullscreen.h" |
14 #include "ppapi/cpp/graphics_3d.h" | 14 #include "ppapi/cpp/graphics_3d.h" |
15 #include "ppapi/cpp/graphics_3d_client.h" | 15 #include "ppapi/cpp/graphics_3d_client.h" |
16 #include "ppapi/cpp/input_event.h" | 16 #include "ppapi/cpp/input_event.h" |
17 #include "ppapi/cpp/instance.h" | 17 #include "ppapi/cpp/instance.h" |
18 #include "ppapi/cpp/module.h" | 18 #include "ppapi/cpp/module.h" |
19 #include "ppapi/cpp/rect.h" | 19 #include "ppapi/cpp/rect.h" |
20 #include "ppapi/cpp/var.h" | 20 #include "ppapi/cpp/var.h" |
21 #include "ppapi/lib/gl/include/GLES2/gl2.h" | 21 #include "ppapi/lib/gl/include/GLES2/gl2.h" |
22 #include "ppapi/utility/completion_callback_factory.h" | 22 #include "ppapi/utility/completion_callback_factory.h" |
23 | 23 |
24 // Use assert as a poor-man's CHECK, even in non-debug mode. | 24 // Use assert as a makeshift CHECK, even in non-debug mode. |
25 // Since <assert.h> redefines assert on every inclusion (it doesn't use | 25 // Since <assert.h> redefines assert on every inclusion (it doesn't use |
26 // include-guards), make sure this is the last file #include'd in this file. | 26 // include-guards), make sure this is the last file #include'd in this file. |
27 #undef NDEBUG | 27 #undef NDEBUG |
28 #include <assert.h> | 28 #include <assert.h> |
29 #include <stdint.h> | 29 #include <stdint.h> |
30 | 30 |
31 // Assert |context_| isn't holding any GL Errors. Done as a macro instead of a | 31 // Assert |context_| isn't holding any GL Errors. Done as a macro instead of a |
32 // function to preserve line number information in the failure message. | 32 // function to preserve line number information in the failure message. |
33 #define assertNoGLError() \ | 33 #define assertNoGLError() \ |
34 assert(!gles2_if_->GetError(context_->pp_resource())); | 34 assert(!gles2_if_->GetError(context_->pp_resource())); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 } // anonymous namespace | 174 } // anonymous namespace |
175 | 175 |
176 namespace pp { | 176 namespace pp { |
177 // Factory function for your specialization of the Module object. | 177 // Factory function for your specialization of the Module object. |
178 Module* CreateModule() { | 178 Module* CreateModule() { |
179 return new GLES2DemoModule(); | 179 return new GLES2DemoModule(); |
180 } | 180 } |
181 } // namespace pp | 181 } // namespace pp |
OLD | NEW |