render_data.h
上传用户:gzqinmao
上传日期:2022-07-13
资源大小:472k
文件大小:1k
源码类别:

OpenGL

开发平台:

Visual C++

  1. #include "Vector4.h"
  2. #include "Matrix4x4.h"
  3. struct Vertex_VC
  4. {
  5. float m_Position[3];
  6. // R,G,B,A in OpenGL
  7. // B,G,R,A in Direct3D 9
  8. // Direct3D 10可以是两种其中之1, 看设置而定.
  9. unsigned char m_RGBA[4];
  10. };
  11. // 金字塔形的8条边线
  12. extern Vertex_VC g_pyramid_vertices[5];
  13. // 
  14. extern unsigned short g_pyramid_trianglefan_indices[6];
  15. extern unsigned short g_pyramid_trianglelist_indices[12];
  16. extern Vertex_VC g_road_vertices[4];
  17. extern unsigned short g_road_trianglestrip_indices[4];
  18. // 地图
  19. extern char g_map[8][8];
  20. // 镜头位置
  21. extern Vector4 g_eye; 
  22. // 镜头对准的点
  23. extern Vector4 g_lookat; 
  24. // 镜头正上方的方向
  25. extern Vector4 g_up; 
  26. //
  27. extern Matrix4x4 g_object_matrix;