From 3fb5154dc9483cc7c5b68f39589dbd4d17695c88 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 5 Oct 2019 14:17:59 +0200 Subject: [PATCH] - make it work again. --- source/glbackend/glbackend.cpp | 7 +++++-- wadsrc/static/demolition/shaders/glsl/glsurface.vp | 14 +++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index cb286424a..6c3728916 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -80,6 +80,7 @@ void GLInstance::LoadPolymostShader() polymostShader = new PolymostShader(); if (!polymostShader->Load("PolymostShader", (const char*)Vert.Data(), (const char*)Frag.Data())) { + wm_msgbox("Fatal Error", "Shader compilation failed"); exit(1); } SetPolymostShader(); @@ -97,15 +98,16 @@ void GLInstance::LoadVPXShader() vpxShader = new FShader(); if (!vpxShader->Load("VPXShader", (const char*)Vert.Data(), (const char*)Frag.Data())) { + wm_msgbox("Fatal Error", "Shader compilation failed"); exit(1); } } void GLInstance::LoadSurfaceShader() { - auto fr1 = GetBaseResource("demolition/shaders/glsl/surface.vp"); + auto fr1 = GetBaseResource("demolition/shaders/glsl/glsurface.vp"); TArray Vert = fr1.Read(); - fr1 = GetBaseResource("demolition/shaders/glsl/surface.fp"); + fr1 = GetBaseResource("demolition/shaders/glsl/glsurface.fp"); TArray Frag = fr1.Read(); // Zero-terminate both strings. Vert.Push(0); @@ -113,6 +115,7 @@ void GLInstance::LoadSurfaceShader() surfaceShader = new SurfaceShader(); if (!surfaceShader->Load("SurfaceShader", (const char*)Vert.Data(), (const char*)Frag.Data())) { + wm_msgbox("Fatal Error", "Shader compilation failed"); exit(1); } } diff --git a/wadsrc/static/demolition/shaders/glsl/glsurface.vp b/wadsrc/static/demolition/shaders/glsl/glsurface.vp index 525720632..ddea2ef5c 100644 --- a/wadsrc/static/demolition/shaders/glsl/glsurface.vp +++ b/wadsrc/static/demolition/shaders/glsl/glsurface.vp @@ -1 +1,13 @@ -#version 110 attribute vec4 i_vertPos; attribute vec2 i_texCoord; varying vec2 v_texCoord; void main() { gl_Position = i_vertPos; v_texCoord = i_texCoord; } +#version 110 + +attribute vec4 i_vertPos; +attribute vec2 i_texCoord; + +varying vec2 v_texCoord; + +void main() +{ + gl_Position = i_vertPos; + v_texCoord = i_texCoord; +} +