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

Side by Side Diff: native_client_sdk/src/examples/api/graphics_3d/graphics_3d.cc

Issue 14607005: [NaCl SDK] Cleanup examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 5
6 /** @file hello_world_gles.cc
7 * This example demonstrates loading and running a simple 3D openGL ES 2.0
8 * application.
9 */
10
11 //----------------------------------------------------------------------------- 6 //-----------------------------------------------------------------------------
12 // The spinning Cube 7 // The spinning Cube
13 //----------------------------------------------------------------------------- 8 //-----------------------------------------------------------------------------
14 9
15 #define _USE_MATH_DEFINES 1 10 #define _USE_MATH_DEFINES 1
16 #include <limits.h> 11 #include <limits.h>
17 #include <math.h> 12 #include <math.h>
18 #include <stdarg.h> 13 #include <stdarg.h>
19 #include <stddef.h> 14 #include <stddef.h>
20 #include <stdio.h> 15 #include <stdio.h>
21 #include <stdlib.h> 16 #include <stdlib.h>
22 #include <string.h> 17 #include <string.h>
23 18
24 #include "ppapi/c/pp_stdint.h"
25 #include "ppapi/c/pp_completion_callback.h" 19 #include "ppapi/c/pp_completion_callback.h"
26 #include "ppapi/c/pp_errors.h" 20 #include "ppapi/c/pp_errors.h"
27 #include "ppapi/c/pp_graphics_3d.h" 21 #include "ppapi/c/pp_graphics_3d.h"
28 #include "ppapi/c/pp_module.h" 22 #include "ppapi/c/pp_module.h"
23 #include "ppapi/c/pp_stdint.h"
29 #include "ppapi/c/pp_var.h" 24 #include "ppapi/c/pp_var.h"
30 #include "ppapi/c/ppb.h" 25 #include "ppapi/c/ppb.h"
31 #include "ppapi/c/ppb_core.h" 26 #include "ppapi/c/ppb_core.h"
32 #include "ppapi/c/ppb_graphics_3d.h" 27 #include "ppapi/c/ppb_graphics_3d.h"
33 #include "ppapi/c/ppb_instance.h" 28 #include "ppapi/c/ppb_instance.h"
34 #include "ppapi/c/ppb_messaging.h" 29 #include "ppapi/c/ppb_messaging.h"
35 #include "ppapi/c/ppb_opengles2.h" 30 #include "ppapi/c/ppb_opengles2.h"
31 #include "ppapi/c/ppb_url_loader.h"
32 #include "ppapi/c/ppb_url_request_info.h"
36 #include "ppapi/c/ppb_var.h" 33 #include "ppapi/c/ppb_var.h"
37 #include "ppapi/c/ppp.h" 34 #include "ppapi/c/ppp.h"
38 #include "ppapi/c/ppp_instance.h" 35 #include "ppapi/c/ppp_instance.h"
39 #include "ppapi/c/ppp_messaging.h" 36 #include "ppapi/c/ppp_messaging.h"
40 #include "ppapi/c/ppb_url_loader.h"
41 #include "ppapi/c/ppb_url_request_info.h"
42 37
43 #include "ppapi/c/ppp_graphics_3d.h" 38 #include "ppapi/c/ppp_graphics_3d.h"
44 #include "ppapi/lib/gl/gles2/gl2ext_ppapi.h" 39 #include "ppapi/lib/gl/gles2/gl2ext_ppapi.h"
45 40
46 #include <GLES2/gl2.h> 41 #include <GLES2/gl2.h>
47 #include "matrix.h" 42 #include "matrix.h"
48 43
49 static PPB_Messaging* ppb_messaging_interface = NULL; 44 static PPB_Messaging* ppb_messaging_interface = NULL;
50 static PPB_Var* ppb_var_interface = NULL; 45 static PPB_Var* ppb_var_interface = NULL;
51 static PPB_Core* ppb_core_interface = NULL; 46 static PPB_Core* ppb_core_interface = NULL;
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 }; 608 };
614 return &instance_interface; 609 return &instance_interface;
615 } 610 }
616 return NULL; 611 return NULL;
617 } 612 }
618 613
619 /** 614 /**
620 * Called before the plugin module is unloaded. 615 * Called before the plugin module is unloaded.
621 */ 616 */
622 PP_EXPORT void PPP_ShutdownModule() {} 617 PP_EXPORT void PPP_ShutdownModule() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698