gdk: Move GLSL shaders into GResource
Having the shaders inlined as C strings makes them harder to edit and maintain.
This commit is contained in:
		
							
								
								
									
										9
									
								
								gdk/resources/glsl/gl2-texture-2d.fs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								gdk/resources/glsl/gl2-texture-2d.fs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| #version 130 | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| uniform sampler2D map; | ||||
|  | ||||
| void main() { | ||||
|   gl_FragColor = texture2D (map, vUv); | ||||
| } | ||||
							
								
								
									
										13
									
								
								gdk/resources/glsl/gl2-texture-2d.vs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								gdk/resources/glsl/gl2-texture-2d.vs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| #version 130 | ||||
|  | ||||
| uniform sampler2D map; | ||||
|  | ||||
| attribute vec2 position; | ||||
| attribute vec2 uv; | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| void main() { | ||||
|   gl_Position = vec4(position, 0, 1); | ||||
|   vUv = uv; | ||||
| } | ||||
							
								
								
									
										9
									
								
								gdk/resources/glsl/gl2-texture-rect.fs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								gdk/resources/glsl/gl2-texture-rect.fs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| #version 130 | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| uniform sampler2DRect map; | ||||
|  | ||||
| void main() { | ||||
|   gl_FragColor = texture2DRect (map, vUv); | ||||
| } | ||||
							
								
								
									
										13
									
								
								gdk/resources/glsl/gl2-texture-rect.vs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								gdk/resources/glsl/gl2-texture-rect.vs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| #version 130 | ||||
|  | ||||
| uniform sampler2DRect map; | ||||
|  | ||||
| attribute vec2 position; | ||||
| attribute vec2 uv; | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| void main() { | ||||
|   gl_Position = vec4(position, 0, 1); | ||||
|   vUv = uv; | ||||
| } | ||||
							
								
								
									
										11
									
								
								gdk/resources/glsl/gl3-texture-2d.fs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								gdk/resources/glsl/gl3-texture-2d.fs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| #version 150 | ||||
|  | ||||
| in vec2 vUv; | ||||
|  | ||||
| out vec4 vertexColor; | ||||
|  | ||||
| uniform sampler2D map; | ||||
|  | ||||
| void main() { | ||||
|   vertexColor = texture2D (map, vUv); | ||||
| } | ||||
							
								
								
									
										13
									
								
								gdk/resources/glsl/gl3-texture-2d.vs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								gdk/resources/glsl/gl3-texture-2d.vs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| #version 150 | ||||
|  | ||||
| uniform sampler2D map; | ||||
|  | ||||
| in vec2 position; | ||||
| in vec2 uv; | ||||
|  | ||||
| out vec2 vUv; | ||||
|  | ||||
| void main() { | ||||
|   gl_Position = vec4(position, 0, 1); | ||||
|   vUv = uv; | ||||
| } | ||||
							
								
								
									
										9
									
								
								gdk/resources/glsl/gl3-texture-rect.fs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								gdk/resources/glsl/gl3-texture-rect.fs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| #version 150 | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| uniform sampler2DRect map; | ||||
|  | ||||
| void main() { | ||||
|   gl_FragColor = texture2DRect (map, vUv); | ||||
| } | ||||
							
								
								
									
										13
									
								
								gdk/resources/glsl/gl3-texture-rect.vs.glsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								gdk/resources/glsl/gl3-texture-rect.vs.glsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| #version 150 | ||||
|  | ||||
| uniform sampler2DRect map; | ||||
|  | ||||
| attribute vec2 position; | ||||
| attribute vec2 uv; | ||||
|  | ||||
| varying vec2 vUv; | ||||
|  | ||||
| void main() { | ||||
|   gl_Position = vec4(position, 0, 1); | ||||
|   vUv = uv; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Emmanuele Bassi
					Emmanuele Bassi