Skip to content

Commit af4ecd6

Browse files
committed
1673b39: gameLibs/textureGen: updated to compile for non-windows
1 parent 1f4fcf9 commit af4ecd6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

prog/gameLibs/textureGen/texturePSGenShader.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ class CachedShader // todo: replace with shared_ptr
136136
{
137137
G_ASSERT(refCount == 0);
138138
String outErr;
139+
#if _TARGET_PC_WIN
139140
shader = d3d::create_pixel_shader_hlsl(shader_text, len, "main_ps", "ps_5_0", &outErr);
141+
#else
142+
shader = BAD_FSHADER, outErr = "hlsl n/a";
143+
G_UNUSED(shader_text), G_UNUSED(len);
144+
#endif
140145
if (!outErr.empty())
141146
logger.log(shader != BAD_FSHADER ? LOGLEVEL_WARN : LOGLEVEL_ERR, outErr);
142147
refCount = 1;
@@ -736,7 +741,11 @@ static void init_cached_vprog(VprogCached &vprog, const char *shader)
736741
make_sha1_string(shader, len, sha1);
737742
if (memcmp(vprog.sha1, sha1, sizeof(sha1)) == 0)
738743
return;
744+
#if _TARGET_PC_WIN
739745
vprog.vprog = d3d::create_vertex_shader_hlsl(shader, len, "main_vs", "vs_5_0");
746+
#else
747+
vprog.vprog = BAD_FSHADER;
748+
#endif
740749
memcpy(vprog.sha1, sha1, sizeof(sha1));
741750
}
742751

0 commit comments

Comments
 (0)