This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc -arch i386 -Wno-write-strings -O3 -c src/soil/image_DXT.c -o build/src/soil/image_DXT.c.o | |
gcc -arch i386 -Wno-write-strings -O3 -c src/soil/image_helper.c -o build/src/soil/image_helper.c.o | |
gcc -arch i386 -Wno-write-strings -O3 -c src/soil/SOIL.c -o build/src/soil/SOIL.c.o | |
gcc -arch i386 -Wno-write-strings -O3 -c src/soil/stb_image_aug.c -o build/src/soil/stb_image_aug.c.o | |
ar cr build/libSOIL.a build/src/soil/image_DXT.c.o build/src/soil/image_helper.c.o build/src/soil/SOIL.c.o build/src/soil/stb_image_aug.c.o | |
ranlib build/libSOIL.a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float button_left = 250; | |
float button_right = 423; | |
float button_top = 26; | |
float button_bottom = 78; | |
if (event_coords.x >= button_left && event_coords.x <= button_right && event_coords.y >= button_top && event_coords.y <= button_bottom) { | |
..button was tapped.. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "PDL.h" | |
#include "SDL.h" | |
#include "GL_ES.h" | |
int main(int argc, char* argv[]) { | |
PDL_Init(0); | |
PDL_Quit(); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDL_Init(SDL_INIT_VIDEO); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); | |
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen = SDL_SetVideoMode(320, 480, 32, SDL_OPENGL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); | |
glMatrixMode(GL_PROJECTION); | |
glOrthof(0.0f, 320.0f, 480.0f, 0.0f, -1.0f, 1.0f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glMatrixMode(GL_MODELVIEW); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PDL_Quit(); | |
SDL_Quit(); | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool in_loop = true; | |
do { | |
} while (in_loop); |