Example #1
0
void init(void)
{
	// Load shaders and use the resulting shader program
	spMain.createProgram();
	shShaders[0].loadShader("simple2.vs", GL_VERTEX_SHADER);
	shShaders[1].loadShader("simple2.fs", GL_FRAGMENT_SHADER);
	spMain.attachShaderToProgram(&shShaders[0]);
	spMain.attachShaderToProgram(&shShaders[1]);
	spMain.linkProgram();
	spMain.useProgram();

	setData();

	glClearColor(1.0, 1.0, 1.0, 1.0); // white background
}