本文共 1525 字,大约阅读时间需要 5 分钟。
OpenGL????OpenGL????????????????3D???????????????????????????????????????????????????????????????
?????C??????????????????????????????????????????????????
#include#include #include #include #include #include #include #pragma once#define _CRT_SECURE_NO_WARNINGS#define WIN32_LEAN_AND_MEAN#define GLFW_NO_GLU#include #include #include #include #include #include #include #include #define GLFW_INCLUDE_GLCOREARB 1GLuint CreateShaderProgram();GLuint LoadShader(const char *shader_path, GLenum shader_type);void LinkShader(GLuint shader_program, ...);bool compileShader(GLuint &shader_id, const char *path);static const GLchar *getFileData(const char *path);static const int MAX_LOG_LEN = 16 * 1024;static void _log(const char *format, va_list args);void log(const char *format, ...);bool LoadTessellationShader(GLuint shader_program, const char *tes_shader_path);void LinkShader(GLuint shader_pragram, ...);GLuint CreateShaderProgram();
LoadShader????????????????????glCreateShader??????????compileShader?????????????GPU?????????LinkShader???????????????????????CreateShaderProgram?????????????LoadShader??????????????????LinkShader?????????????????OutputDebugStringW?????????log???????????????????????????????????????OpenGL??????????????????????????????????????????3D????????????
转载地址:http://izpfk.baihongyu.com/