All pastes #458464 Raw Edit

Someone

public text v1 · immutable
#458464 ·published 2007-04-25 22:08 UTC
rendered paste body
{
	GLuint texture[1];
	glClearColor(0, 0, 0, 0);
	glClear(GL_COLOR_BUFFER_BIT);
	
	glGenTextures(1, &texture[0]);
	glBindTexture(GL_TEXTURE_2D, texture[0]);
	glTexImage2D(GL_TEXTURE_2D, 0, 3, 300, 225,
				0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
	/* Draw our quad and load a black texture */
	glBegin(GL_QUADS);
		glTexCoord2f(0.0f, 0.0f); glVertex2f(-1.0f,-1.0f);
		glTexCoord2f(0.0f, 0.0f); glVertex2f( 1.0f,-1.0f);
		glTexCoord2f(1.0f, 1.0f); glVertex2f( 1.0f, 1.0f);
		glTexCoord2f(0.0f, 1.0f); glVertex2f(-1.0f, 1.0f);
	glEnd();

	glFlush();
}