浏览代码

Reviewed UWP branch integration

pull/442/head
Ray 7 年前
父节点
当前提交
8e0a277f7c
共有 12 个文件被更改,包括 15 次插入58 次删除
  1. +0
    -0
      src/external/ANGLE/EGL/egl.h
  2. +0
    -0
      src/external/ANGLE/EGL/eglext.h
  3. +0
    -0
      src/external/ANGLE/EGL/eglplatform.h
  4. +0
    -0
      src/external/ANGLE/GLES2/gl2.h
  5. +0
    -0
      src/external/ANGLE/GLES2/gl2ext.h
  6. +0
    -0
      src/external/ANGLE/GLES2/gl2platform.h
  7. +0
    -0
      src/external/ANGLE/GLES3/gl3.h
  8. +0
    -0
      src/external/ANGLE/GLES3/gl3ext.h
  9. +0
    -0
      src/external/ANGLE/GLES3/gl3platform.h
  10. +0
    -0
      src/external/ANGLE/KHR/khrplatform.h
  11. +0
    -0
      src/external/ANGLE/angle_windowsstore.h
  12. +15
    -58
      src/rlgl.c

src/external/include/ANGLE/EGL/egl.h → src/external/ANGLE/EGL/egl.h 查看文件


src/external/include/ANGLE/EGL/eglext.h → src/external/ANGLE/EGL/eglext.h 查看文件


src/external/include/ANGLE/EGL/eglplatform.h → src/external/ANGLE/EGL/eglplatform.h 查看文件


src/external/include/ANGLE/GLES2/gl2.h → src/external/ANGLE/GLES2/gl2.h 查看文件


src/external/include/ANGLE/GLES2/gl2ext.h → src/external/ANGLE/GLES2/gl2ext.h 查看文件


src/external/include/ANGLE/GLES2/gl2platform.h → src/external/ANGLE/GLES2/gl2platform.h 查看文件


src/external/include/ANGLE/GLES3/gl3.h → src/external/ANGLE/GLES3/gl3.h 查看文件


src/external/include/ANGLE/GLES3/gl3ext.h → src/external/ANGLE/GLES3/gl3ext.h 查看文件


src/external/include/ANGLE/GLES3/gl3platform.h → src/external/ANGLE/GLES3/gl3platform.h 查看文件


src/external/include/ANGLE/KHR/khrplatform.h → src/external/ANGLE/KHR/khrplatform.h 查看文件


src/external/include/ANGLE/angle_windowsstore.h → src/external/ANGLE/angle_windowsstore.h 查看文件


+ 15
- 58
src/rlgl.c 查看文件

@ -1166,7 +1166,7 @@ void rlglInit(int width, int height)
if(strcmp(extList[i], (const char *)"GL_EXT_debug_marker") == 0) debugMarkerSupported = true;
}
#ifdef _MSC_VER
#if defined(_MSC_VER)
//free(extList);
#endif
@ -2407,10 +2407,6 @@ Shader LoadShader(char *vsFileName, char *fsFileName)
for (int i = 0; i < MAX_SHADER_LOCATIONS; i++) shader.locs[i] = -1;
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Shaders loading from external text file
char *vShaderStr = LoadText(vsFileName);
char *fShaderStr = LoadText(fsFileName);
unsigned int vertexShaderId = defaultVShaderId;
unsigned int fragmentShaderId = defaultFShaderId;
@ -3181,82 +3177,46 @@ void EndVrDrawing(void)
// Compile custom shader and return shader id
static unsigned int CompileShader(const char *shaderStr, int type)
{
unsigned int program = 0;
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
GLuint vertexShader;
GLuint fragmentShader;
vertexShader = glCreateShader(GL_VERTEX_SHADER);
fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
const char *pvs = vShaderStr;
const char *pfs = fShaderStr;
glShaderSource(vertexShader, 1, &pvs, NULL);
glShaderSource(fragmentShader, 1, &pfs, NULL);
unsigned int shader = glCreateShader(type);
glShaderSource(shader, 1, &shaderStr, NULL);
GLint success = 0;
glCompileShader(vertexShader);
glGetShaderiv(vertexShader, GL_COMPILE_STATUS, &success);
glCompileShader(shader);
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if (success != GL_TRUE)
{
TraceLog(LOG_WARNING, "[VSHDR ID %i] Failed to compile vertex shader...", vertexShader);
TraceLog(LOG_WARNING, "[SHDR ID %i] Failed to compile shader...", shader);
int maxLength = 0;
int length;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
glGetShaderiv(vertexShader, GL_INFO_LOG_LENGTH, &maxLength);
#ifdef _MSC_VER
#if defined(_MSC_VER)
char *log = malloc(maxLength);
#else
char log[maxLength];
#endif
glGetShaderInfoLog(vertexShader, maxLength, &length, log);
glGetShaderInfoLog(shader, maxLength, &length, log);
TraceLog(LOG_INFO, "%s", log);
#ifdef _MSC_VER
#if defined(_MSC_VER)
free(log);
#endif
}
else TraceLog(LOG_INFO, "[VSHDR ID %i] Vertex shader compiled successfully", vertexShader);
else TraceLog(LOG_INFO, "[SHDR ID %i] Shader compiled successfully", shader);
glCompileShader(fragmentShader);
return shader;
}
// Load custom shader strings and return program id
static unsigned int LoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId)
{
unsigned int program = 0;
if (success != GL_TRUE)
{
TraceLog(LOG_WARNING, "[FSHDR ID %i] Failed to compile fragment shader...", fragmentShader);
int maxLength = 0;
int length;
glGetShaderiv(fragmentShader, GL_INFO_LOG_LENGTH, &maxLength);
#ifdef _MSC_VER
char *log = malloc(maxLength);
#else
char log[maxLength];
#endif
glGetShaderInfoLog(fragmentShader, maxLength, &length, log);
TraceLog(LOG_INFO, "%s", log);
#ifdef _MSC_VER
free(log);
#endif
}
else TraceLog(LOG_INFO, "[FSHDR ID %i] Fragment shader compiled successfully", fragmentShader);
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
GLint success = 0;
program = glCreateProgram();
glAttachShader(program, vShaderId);
@ -3304,9 +3264,6 @@ static unsigned int LoadShaderProgram(unsigned int vShaderId, unsigned int fShad
program = 0;
}
else TraceLog(LOG_INFO, "[SHDR ID %i] Shader program loaded successfully", program);
glDeleteShader(vertexShader);
glDeleteShader(fragmentShader);
#endif
return program;
}

正在加载...
取消
保存