Exemplo n.º 1
0
		in vec2 vert;
		uniform vec2 scale;

		void main() {
			gl_Position = vec4(vert / scale, 0.0, 1.0);
		}
	'''),
    GL.NewGeometryShader('''
		#version 330 core

		layout(points) in;
		layout(line_strip, max_vertices = 17) out;

		uniform vec2 scale;

		void main() {
			for (int i = 0; i <= 16; ++i) {
				float a = 3.14159265 * 2.0 * ((i * 6) / 16.0);
				vec2 move = vec2(cos(a) * 0.1, sin(a) * 0.1) / scale;
				gl_Position = gl_in[0].gl_Position + vec4(move, 0.0, 1.0);
				EmitVertex();
			}
			EndPrimitive();
		}
	'''),
    GL.NewFragmentShader('''
		#version 330 core

		out vec4 color;

		void main() {
			color = vec4(0.05, 0.05, 0.05, 1.0);
Exemplo n.º 2
0
exit()

GL.DisableBlend()
GL.DisableCullFace()
GL.DisableDepthTest()
GL.DisableMultisample()

GL.EnableBlend()
GL.EnableCullFace()
GL.EnableDepthTest()
GL.EnableMultisample()

GL.NewAdvancedVertexArray()
GL.NewFragmentShader()
GL.NewFramebuffer()
GL.NewGeometryShader()
GL.NewIndexBuffer()
GL.NewProgram()
GL.NewTessControlShader()
GL.NewTessEvaluationShader()
GL.NewTexture()
GL.NewUniformBuffer()
GL.NewVertexArray()
GL.NewVertexBuffer()
GL.NewVertexShader()

GL.ReadPixel()
GL.ReadPixels()

GL.ReadDepthPixel()
GL.ReadDepthPixels()