ogl: support glsl120

This commit is contained in:
degasus
2013-04-08 14:50:58 +02:00
parent 3897e1959e
commit 4c40e70b8a
8 changed files with 92 additions and 56 deletions

View File

@ -598,9 +598,9 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
if (ApiType == API_OPENGL)
{
WRITE(p, "out float4 ocol0;\n");
WRITE(p, "COLOROUT(ocol0)\n");
if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
WRITE(p, "out float4 ocol1;\n");
WRITE(p, "COLOROUT(ocol1)\n");
if (per_pixel_depth)
WRITE(p, "#define depth gl_FragDepth\n");

View File

@ -105,8 +105,8 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
if (ApiType == API_OPENGL)
{
WRITE(p, " out float4 ocol0;\n");
WRITE(p, " in float2 uv0;\n");
WRITE(p, " COLOROUT(ocol0)\n");
WRITE(p, " VARYIN float2 uv0;\n");
WRITE(p, "void main()\n");
}
else
@ -187,7 +187,7 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType)
if (ApiType == API_OPENGL)
{
WRITE(p, " out float4 ocol0;\n");
WRITE(p, " in float2 uv0;\n");
WRITE(p, " VARYIN float2 uv0;\n");
WRITE(p, "void main()\n");
}
else