Skip to content

Commit

Permalink
Use correct OPTION string for vertex/fragment programs in nv2 profile.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Jun 19, 2008
1 parent f44ebd2 commit 28d6cb0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mojoshader.c
Expand Up @@ -3685,10 +3685,17 @@ static void emit_ARB1_opcode_dsss(Context *ctx, const char *opcode)
static void emit_ARB1_start(Context *ctx, const char *profilestr)
{
const char *shader_str = NULL;
const char *shader_full_str = NULL;
if (shader_is_vertex(ctx))
{
shader_str = "vp";
shader_full_str = "vertex";
} // if
else if (shader_is_pixel(ctx))
{
shader_str = "fp";
shader_full_str = "fragment";
} // else if
else
{
failf(ctx, "Shader type %u unsupported in this profile.",
Expand All @@ -3705,7 +3712,7 @@ static void emit_ARB1_start(Context *ctx, const char *profilestr)
{
ctx->support_nv2 = 1;
output_line(ctx, "!!ARB%s1.0", shader_str);
output_line(ctx, "OPTION NV_vertex_program2;");
output_line(ctx, "OPTION NV_%s_program2;", shader_full_str);
} // else if

else
Expand Down

0 comments on commit 28d6cb0

Please sign in to comment.