Subversion Repositories gelsvn

Rev

Rev 630 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 630 Rev 657
Line 122... Line 122...
122
        "		gl_FragDepth = 0.0;\n"
122
        "		gl_FragDepth = 0.0;\n"
123
        " 	else	\n"
123
        " 	else	\n"
124
        " 		gl_FragDepth = gl_FragCoord.z;\n"
124
        " 		gl_FragDepth = gl_FragCoord.z;\n"
125
        "	\n"
125
        "	\n"
126
        "	gl_FragColor.a = exp2(-sq_d*2.0);\n"
126
        "	gl_FragColor.a = exp2(-sq_d*2.0);\n"
127
        "	gl_FragColor.rgb = gl_Color.rgb;\n"
127
        "	gl_FragColor.rgb = vec3(1,0,0);\n"
128
        "}\n";
128
        "}\n";
129
 
129
 
130
    string line_vert = 
130
    string line_vert = 
131
        "uniform float THICKNESS;\n"
131
        "uniform float THICKNESS;\n"
132
        "uniform vec2 WIN_SCALE;\n"
132
        "uniform vec2 WIN_SCALE;\n"
Line 160... Line 160...
160
        "	gl_Position = (displace.x>0.0) ? p1 : p0;\n"
160
        "	gl_Position = (displace.x>0.0) ? p1 : p0;\n"
161
        "	vec2 offset = a * displace.x + a_h * displace.y;\n"
161
        "	vec2 offset = a * displace.x + a_h * displace.y;\n"
162
        "	gl_Position.xy += scale * gl_Position.w * offset;\n"
162
        "	gl_Position.xy += scale * gl_Position.w * offset;\n"
163
        "\n"
163
        "\n"
164
        "	_id = id.rgb;\n"
164
        "	_id = id.rgb;\n"
165
        "	gl_FrontColor = gl_Color;\n"
-
 
166
        "	gl_FrontSecondaryColor = gl_SecondaryColor;\n"
-
 
167
        "}\n";
165
        "}\n";
168
 
166
 
169
}
167
}
170
 
168
 
171
namespace GLGraphics
169
namespace GLGraphics
Line 419... Line 417...
419
        glEnable(GL_TEXTURE_RECTANGLE_ARB);
417
        glEnable(GL_TEXTURE_RECTANGLE_ARB);
420
        glBindTexture(GL_TEXTURE_RECTANGLE_ARB, idmap);
418
        glBindTexture(GL_TEXTURE_RECTANGLE_ARB, idmap);
421
        glDepthMask(GL_FALSE);
419
        glDepthMask(GL_FALSE);
422
        glBlendEquation(GL_MAX);
420
        glBlendEquation(GL_MAX);
423
        glUseProgram(line_prog);
421
        glUseProgram(line_prog);
424
        glColor3fv(color.get());
-
 
425
        glSecondaryColor3fv(clear_color.get());
-
 
426
 
422
 
427
        float lw;
423
        float lw;
428
        glGetFloatv(GL_LINE_WIDTH, &lw);
424
        glGetFloatv(GL_LINE_WIDTH, &lw);
429
        glLineWidth(ceil(2.0*(thickness+transition)));
425
        glLineWidth(ceil(2.0*(thickness+transition)));
430
 
426