| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #import "RTCOpenGLVideoRenderer.h" | 11 #import "RTCOpenGLVideoRenderer.h" |
| 12 | 12 |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 | 14 |
| 15 #include "webrtc/base/scoped_ptr.h" | 15 #include "webrtc/base/scoped_ptr.h" |
| 16 | 16 |
| 17 #if TARGET_OS_IPHONE | 17 #if TARGET_OS_IPHONE |
| 18 #import <OpenGLES/ES3/gl.h> | 18 #import <OpenGLES/ES3/gl.h> |
| 19 #else | 19 #else |
| 20 #import <OpenGL/gl3.h> | 20 #import <OpenGL/gl3.h> |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 #import "RTCVideoFrame.h" | 23 #import "WebRTC/RTCVideoFrame.h" |
| 24 | 24 |
| 25 // TODO(tkchin): check and log openGL errors. Methods here return BOOLs in | 25 // TODO(tkchin): check and log openGL errors. Methods here return BOOLs in |
| 26 // anticipation of that happening in the future. | 26 // anticipation of that happening in the future. |
| 27 | 27 |
| 28 #if TARGET_OS_IPHONE | 28 #if TARGET_OS_IPHONE |
| 29 #define RTC_PIXEL_FORMAT GL_LUMINANCE | 29 #define RTC_PIXEL_FORMAT GL_LUMINANCE |
| 30 #define SHADER_VERSION | 30 #define SHADER_VERSION |
| 31 #define VERTEX_SHADER_IN "attribute" | 31 #define VERTEX_SHADER_IN "attribute" |
| 32 #define VERTEX_SHADER_OUT "varying" | 32 #define VERTEX_SHADER_OUT "varying" |
| 33 #define FRAGMENT_SHADER_IN "varying" | 33 #define FRAGMENT_SHADER_IN "varying" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 GL_FLOAT, | 476 GL_FLOAT, |
| 477 GL_FALSE, | 477 GL_FALSE, |
| 478 4 * sizeof(GLfloat), | 478 4 * sizeof(GLfloat), |
| 479 (void *)(2 * sizeof(GLfloat))); | 479 (void *)(2 * sizeof(GLfloat))); |
| 480 glEnableVertexAttribArray(_texcoord); | 480 glEnableVertexAttribArray(_texcoord); |
| 481 | 481 |
| 482 return YES; | 482 return YES; |
| 483 } | 483 } |
| 484 | 484 |
| 485 @end | 485 @end |
| OLD | NEW |