Last change
on this file since 5220 was
5220,
checked in by jack, 16 years ago
|
anugavis: Started work on simple height quantities.
|
File size:
822 bytes
|
Rev | Line | |
---|
[5214] | 1 | #include <SDL.h> |
---|
| 2 | #include "anugavis.h" |
---|
[5217] | 3 | #include "error.h" |
---|
| 4 | #include "globals.h" |
---|
[5214] | 5 | |
---|
[5220] | 6 | int AnugaVis_Init(int width, int height, const char *swwFilePath){ |
---|
[5217] | 7 | if((SDL_Init(SDL_INIT_VIDEO) == -1) || |
---|
| 8 | (SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5) == -1) || |
---|
| 9 | (SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5) == -1) || |
---|
| 10 | (SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5) == -1) || |
---|
| 11 | (SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16) == -1) || |
---|
| 12 | (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1) == -1) || |
---|
[5220] | 13 | ((anugavis.screen = |
---|
| 14 | SDL_SetVideoMode(width, height, 16, SDL_OPENGL)) == NULL)){ |
---|
[5217] | 15 | AnugaVis_SDLError(); |
---|
[5215] | 16 | return -1; |
---|
| 17 | } |
---|
[5220] | 18 | anugavis.heights = NULL; |
---|
| 19 | return 0; |
---|
[5214] | 20 | } |
---|
| 21 | |
---|
| 22 | void AnugaVis_DeInit(void){ |
---|
[5220] | 23 | while(anugavis.heights != NULL) |
---|
| 24 | AnugaVis_UndefineHeightQuantity(anugavis.heights->name); |
---|
[5214] | 25 | SDL_Quit(); |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.