BLF/OpenGL: draw text with new immediate mode
Part of T49043
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
|
||||
// TODO(merwin):
|
||||
// - uniform color, not per vertex
|
||||
// - generic attrib inputs (2D pos, tex coord)
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
#if __VERSION__ == 120
|
||||
flat varying vec4 color;
|
||||
noperspective varying vec2 texcoord;
|
||||
attribute vec2 pos;
|
||||
attribute vec2 texCoord;
|
||||
attribute vec4 color;
|
||||
flat varying vec4 color_flat;
|
||||
noperspective varying vec2 texCoord_interp;
|
||||
#else
|
||||
flat out vec4 color;
|
||||
noperspective out vec2 texcoord;
|
||||
in vec2 pos;
|
||||
in vec2 texCoord;
|
||||
in vec4 color;
|
||||
flat out vec4 color_flat;
|
||||
noperspective out vec2 texCoord_interp;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
|
||||
|
||||
color = gl_Color;
|
||||
texcoord = gl_MultiTexCoord0.st;
|
||||
color_flat = color;
|
||||
texCoord_interp = texCoord;
|
||||
}
|
||||
|
Reference in New Issue
Block a user