This mirrors the previous refactor of the TextRenderer. All calls to draw_rect and draw_triangle now buffer vertex data (position and color). A begin()/flush() system is introduced to manage batching.
		
			
				
	
	
		
			13 lines
		
	
	
		
			237 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			237 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
#version 330 core
 | 
						|
layout (location = 0) in vec2 aPos;
 | 
						|
layout (location = 1) in vec3 aColor;
 | 
						|
 | 
						|
uniform mat4 projection;
 | 
						|
 | 
						|
out vec3 ourColor;
 | 
						|
 | 
						|
void main() {
 | 
						|
  gl_Position = projection * vec4(aPos.x, aPos.y, 0.0, 1.0);
 | 
						|
  ourColor = aColor;
 | 
						|
}
 |