1 /* 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #import <Foundation/Foundation.h> 12 13 #if TARGET_OS_IPHONE 14 #define RTC_PIXEL_FORMAT GL_LUMINANCE 15 #define SHADER_VERSION 16 #define VERTEX_SHADER_IN "attribute" 17 #define VERTEX_SHADER_OUT "varying" 18 #define FRAGMENT_SHADER_IN "varying" 19 #define FRAGMENT_SHADER_OUT 20 #define FRAGMENT_SHADER_COLOR "gl_FragColor" 21 #define FRAGMENT_SHADER_TEXTURE "texture2D" 22 23 @class EAGLContext; 24 typedef EAGLContext GlContextType; 25 #else 26 #define RTC_PIXEL_FORMAT GL_RED 27 #define SHADER_VERSION "#version 150\n" 28 #define VERTEX_SHADER_IN "in" 29 #define VERTEX_SHADER_OUT "out" 30 #define FRAGMENT_SHADER_IN "in" 31 #define FRAGMENT_SHADER_OUT "out vec4 fragColor;\n" 32 #define FRAGMENT_SHADER_COLOR "fragColor" 33 #define FRAGMENT_SHADER_TEXTURE "texture" 34 35 @class NSOpenGLContext; 36 typedef NSOpenGLContext GlContextType; 37 #endif 38