71 lines
1.1 KiB
C++
71 lines
1.1 KiB
C++
|
#include "lib_SDL_common.h"
|
||
|
#include "lib_GL_common.h"
|
||
|
|
||
|
#include "object.h"
|
||
|
#include "cube.h"
|
||
|
#include "quad.h"
|
||
|
|
||
|
#include <SDL.h>
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
int Window_Height;
|
||
|
int Window_Width;
|
||
|
SDL_GLContext GLContext;
|
||
|
SDL_Window *Window;
|
||
|
|
||
|
common_SDL_Init ();
|
||
|
common_SDL_CreateWindow (&Window);
|
||
|
common_GL_Init (Window, &GLContext, 1);
|
||
|
SDL_GetWindowSize (Window, &Window_Width, &Window_Height);
|
||
|
|
||
|
try {
|
||
|
SDL_Log ("Object o;");
|
||
|
Object o;
|
||
|
SDL_Log ("Cube c;");
|
||
|
Cube c;
|
||
|
SDL_Log ("Quad q;");
|
||
|
Quad q;
|
||
|
}
|
||
|
catch (int e)
|
||
|
{
|
||
|
printf ("%d\n", e);
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
SDL_Log ("Object (1);");
|
||
|
Object o = Object (1);
|
||
|
SDL_Log ("Cube (1);");
|
||
|
Cube c = Cube (1);
|
||
|
SDL_Log ("Quad (1);");
|
||
|
Quad q = Quad (1);
|
||
|
}
|
||
|
catch (int e)
|
||
|
{
|
||
|
printf ("%d\n", e);
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
SDL_Log ("Object o;");
|
||
|
Object o;
|
||
|
SDL_Log ("Cube c;");
|
||
|
Cube c;
|
||
|
SDL_Log ("Quad q;");
|
||
|
Quad q;
|
||
|
SDL_Log ("Object (1);");
|
||
|
o = Object (1);
|
||
|
SDL_Log ("Cube (1);");
|
||
|
c = Cube (1);
|
||
|
SDL_Log ("Quad (1);");
|
||
|
q = Quad (1);
|
||
|
}
|
||
|
catch (int e)
|
||
|
{
|
||
|
printf ("%d\n", e);
|
||
|
}
|
||
|
|
||
|
SDL_GL_DeleteContext (GLContext);
|
||
|
SDL_DestroyWindow (Window);
|
||
|
common_SDL_Quit ();
|
||
|
}
|