MGOpenGLConfig.h 820 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // MGOpenGLConfig.h
  3. // LandMask
  4. //
  5. // Created by 张英堂 on 16/8/17.
  6. // Copyright © 2016年 megvii. All rights reserved.
  7. //
  8. #ifndef MGOpenGLConfig_h
  9. #define MGOpenGLConfig_h
  10. #import <CoreMedia/CoreMedia.h>
  11. #import <CoreVideo/CoreVideo.h>
  12. #import <UIKit/UIKit.h>
  13. #import <Availability.h>
  14. enum {
  15. ATTRIB_VERTEX,
  16. ATTRIB_TEXTUREPOSITON,
  17. NUM_ATTRIBUTES
  18. };
  19. typedef struct {
  20. float Position[3];
  21. float TexCoord[2];
  22. } Vertex;
  23. static const GLfloat squareVertices[] = {
  24. -1.0f, -1.0f, // bottom left
  25. 1.0f, -1.0f, // bottom right
  26. -1.0f, 1.0f, // top left
  27. 1.0f, 1.0f, // top right
  28. };
  29. static const float textureVertices[] = {
  30. 0.0f, 0.0f, // bottom left
  31. 1.0f, 0.0f, // bottom right
  32. 0.0f, 1.0f, // top left
  33. 1.0f, 1.0f, // top right
  34. };
  35. #endif /* MGOpenGLConfig_h */