Skip to content

Commit 04489f4

Browse files
committed
Hack for broken GLSL shaders
1 parent f8adcd5 commit 04489f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Layers/xrRenderPC_GL/glResourceManager_Resources.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ SVS* CResourceManager::_CreateVS (LPCSTR _name)
197197
// TODO: OGL: HACK: Implement all shaders. Remove this for PS
198198
if (!file)
199199
{
200+
fallback:
200201
string1024 tmp;
201202
xr_sprintf (tmp, "OGL: %s is missing. Replace with stub_default.vs", cname);
202203
Msg (tmp);
@@ -217,6 +218,12 @@ SVS* CResourceManager::_CreateVS (LPCSTR _name)
217218

218219
VERIFY(SUCCEEDED(_hr));
219220

221+
if (!SUCCEEDED(_hr))
222+
{
223+
Log("Can't create shader, replacing it with stub..");
224+
goto fallback;
225+
}
226+
220227
// Parse constant, texture, sampler binding
221228
if (SUCCEEDED(_hr))
222229
{

0 commit comments

Comments
 (0)