Pages not yet Finished

Most Recently Completed: SDL Basics

Section Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nibh ex, tincidunt nec libero ac, auctor porttitor nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at consectetur urna. Ut sit amet tincidunt tortor, at egestas arcu. Curabitur nec pellentesque risus. Sed quis ipsum dictum, consectetur tellus vitae, consectetur libero. Curabitur non ullamcorper felis, at eleifend eros. Vivamus a lobortis risus. Vestibulum aliquam massa vitae auctor ultrices.

#include <SDL.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
	// Initialize SDL
	if (SDL_Init(SDL_INIT_VIDEO) != 0) {
		printf("SDL could not initialize: Error %s\n", SDL_GetError());
		return 1;
	}

	// SDL Window setup
	SDL_Window* window = SDL_CreateWindow("SDL2 Tutorial",
		SDL_WINDOWPOS_UNDEFINED,
		SDL_WINDOWPOS_UNDEFINED,
		640, 480, 0);

	if (window == nullptr) {
		printf("Unable to create window. Error %s\n", SDL_GetError());
		return 1;
	}

	// Wait for 2,000 miliseconds (2 seconds)
	SDL_Delay(2000);

	// Destroy the window and shutdown the program
	SDL_DestroyWindow(window);
	SDL_Quit();

	return 0;
}

Subsection Heading

// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
	printf("SDL could not initialize: Error %s\n", SDL_GetError());
	return 1;
}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nibh ex, tincidunt nec libero ac, auctor porttitor nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at consectetur urna. Ut sit amet tincidunt tortor, at egestas arcu. Curabitur nec pellentesque risus. Sed quis ipsum dictum, consectetur tellus vitae, consectetur libero. Curabitur non ullamcorper felis, at eleifend eros. Vivamus a lobortis risus. Vestibulum aliquam massa vitae auctor ultrices.

!
Note - Template
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nibh ex, tincidunt nec libero ac, auctor porttitor nunc.