RTCOpenGLDefines.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #import <Foundation/Foundation.h>
  11. #if TARGET_OS_IPHONE
  12. #define RTC_PIXEL_FORMAT GL_LUMINANCE
  13. #define SHADER_VERSION
  14. #define VERTEX_SHADER_IN "attribute"
  15. #define VERTEX_SHADER_OUT "varying"
  16. #define FRAGMENT_SHADER_IN "varying"
  17. #define FRAGMENT_SHADER_OUT
  18. #define FRAGMENT_SHADER_COLOR "gl_FragColor"
  19. #define FRAGMENT_SHADER_TEXTURE "texture2D"
  20. @class EAGLContext;
  21. typedef EAGLContext GlContextType;
  22. #else
  23. #define RTC_PIXEL_FORMAT GL_RED
  24. #define SHADER_VERSION "#version 150\n"
  25. #define VERTEX_SHADER_IN "in"
  26. #define VERTEX_SHADER_OUT "out"
  27. #define FRAGMENT_SHADER_IN "in"
  28. #define FRAGMENT_SHADER_OUT "out vec4 fragColor;\n"
  29. #define FRAGMENT_SHADER_COLOR "fragColor"
  30. #define FRAGMENT_SHADER_TEXTURE "texture"
  31. @class NSOpenGLContext;
  32. typedef NSOpenGLContext GlContextType;
  33. #endif