OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
7 #endif | 7 #endif |
8 | 8 |
9 #import "remoting/client/ios/example_view_controller.h" | 9 #import "remoting/client/ios/example_view_controller.h" |
10 | 10 |
11 #import "remoting/client/opengl_wrapper.h" | 11 #import "remoting/client/sys_opengl.h" |
12 | 12 |
13 @interface ExampleViewController() | 13 @interface ExampleViewController() |
14 | 14 |
15 // Helper functions dealing with the GL Context. | 15 // Helper functions dealing with the GL Context. |
16 - (void)setupGL; | 16 - (void)setupGL; |
17 - (void)tearDownGL; | 17 - (void)tearDownGL; |
18 | 18 |
19 @end | 19 @end |
20 | 20 |
21 @implementation ExampleViewController | 21 @implementation ExampleViewController |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #pragma mark - GLKViewDelegate | 67 #pragma mark - GLKViewDelegate |
68 | 68 |
69 // In general, avoid expensive work in this function to maximize frame rate. | 69 // In general, avoid expensive work in this function to maximize frame rate. |
70 - (void)glkView:(GLKView*)view drawInRect:(CGRect)rect { | 70 - (void)glkView:(GLKView*)view drawInRect:(CGRect)rect { |
71 // Clear to give the background color. | 71 // Clear to give the background color. |
72 glClearColor(0.0, 40.0, 0.0, 1.0); | 72 glClearColor(0.0, 40.0, 0.0, 1.0); |
73 glClear(GL_COLOR_BUFFER_BIT); | 73 glClear(GL_COLOR_BUFFER_BIT); |
74 } | 74 } |
75 | 75 |
76 @end | 76 @end |
OLD | NEW |