Exemple #1
0
int main(int argc, char* argv[])
{
	glusInitFunc(init);

	glusReshapeFunc(reshape);

	glusUpdateFunc(update);

	glusTerminateFunc(terminate);

	glusPrepareContext(4, 3, GLUS_FORWARD_COMPATIBLE_BIT);

	// Again, makes programming for this example easier.
	glusPrepareNoResize(GLUS_TRUE);

	if (!glusCreateWindow("GLUS Example Window", WIDTH, HEIGHT, 0, 0, GLUS_FALSE))
	{
		printf("Could not create window!\n");
		return -1;
	}

	glusRun();

	return 0;
}
Exemple #2
0
int main(int argc, char* argv[])
{
	glusInitFunc(init);

	glusReshapeFunc(reshape);

	glusKeyFunc(key);

	glusUpdateFunc(update);

	glusTerminateFunc(terminate);

	glusPrepareContext(4, 1, GLUS_FORWARD_COMPATIBLE_BIT);

	// No resizing for convenience. If resizing is allowed, dynamically resize the SSAO and Blur frame buffer as well.
	glusPrepareNoResize(GLUS_TRUE);

	if (!glusCreateWindow("GLUS Example Window", TEXTURE_WIDTH, TEXTURE_HEIGHT, 24, 0, GLUS_FALSE))
	{
		printf("Could not create window!\n");
		return -1;
	}

    // Print out the keys
    printf("Keys:\n");
    printf("s = Toggle SSAO on/off\n");

	glusRun();

	return 0;
}
Exemple #3
0
/**
 * Main entry point.
 */
int main(int argc, char* argv[])
{
	glusInitFunc(init);

	glusReshapeFunc(reshape);

	glusUpdateFunc(update);

	glusTerminateFunc(terminate);

	glusPrepareContext(3, 2, GLUS_FORWARD_COMPATIBLE_BIT);

	// To keep the program simple, no resize of the window.
	glusPrepareNoResize(GLUS_TRUE);

	if (!glusCreateWindow("GLUS Example Window", WIDTH, HEIGHT, 0, 0, GLUS_FALSE))
	{
		printf("Could not create window!\n");
		return -1;
	}

	glusRun();

	return 0;
}
Exemple #4
0
int main(int argc, char* argv[])
{
	glusInitFunc(init);

	glusReshapeFunc(reshape);

	glusKeyFunc(key);

	glusUpdateFunc(update);

	glusTerminateFunc(terminate);

	glusPrepareContext(4, 1, GLUS_FORWARD_COMPATIBLE_BIT);

	// No resize, as it makes code simpler.
	glusPrepareNoResize(GLUS_TRUE);

	// No MSAA here, as we render to an off screen MSAA buffer.

	if (!glusCreateWindow("GLUS Example Window", SCREEN_WIDTH, SCREEN_HEIGHT, 24, 0, GLUS_FALSE))
	{
		printf("Could not create window!\n");
		return -1;
	}

    // Print out the keys
    printf("Keys:\n");
    printf("1       = Decrease roughness\n");
    printf("2       = Increase roughness\n");
    printf("3       = Decrease R0\n");
    printf("4       = Increase R0\n");
    printf("5       = Decrease Red\n");
    printf("6       = Increase Red\n");
    printf("7       = Decrease Green\n");
    printf("8       = Increase Green\n");
    printf("9       = Decrease Blue\n");
    printf("0       = Increase Blue\n");
    printf("\n");

	glusRun();

	return 0;
}
Exemple #5
0
int main(int argc, char* argv[])
{
	glusInitFunc(init);

	glusReshapeFunc(reshape);

	glusUpdateFunc(update);

	glusTerminateFunc(terminate);

	glusPrepareContext(4, 1, GLUS_FORWARD_COMPATIBLE_BIT);

	glusPrepareNoResize(GLUS_TRUE);

	if (!glusCreateWindow("GLUS Example Window", TEXTURE_WIDTH, TEXTURE_HEIGHT, 24, 0, GLUS_FALSE))
	{
		printf("Could not create window!\n");
		return -1;
	}

	glusRun();

	return 0;
}