opengl added to engine
This commit is contained in:
parent
d8378484a7
commit
706a519452
31 changed files with 490 additions and 68 deletions
|
|
@ -18,10 +18,9 @@ void ARC_Window_Create(ARC_Window **window, ARC_WindowInfo *info){
|
|||
return;
|
||||
}
|
||||
|
||||
*window = (ARC_Window *)malloc(sizeof(ARC_Window));
|
||||
(*window)->window = SDL_CreateWindow((const char *)info->title, info->x, info->y, info->w, info->h, info->flags);
|
||||
*window = (ARC_Window *)SDL_CreateWindow((const char *)info->title, info->x, info->y, info->w, info->h, info->flags);
|
||||
|
||||
if(!(*window)->window){
|
||||
if(!*window){
|
||||
arc_errno = ARC_ERRNO_NULL;
|
||||
ARC_DEBUG_LOG(arc_errno, "SDL_CreateWindow(%s, %d, %d, %d, %d, %x);", info->title, info->x, info->y, info->w, info->h, info->flags);
|
||||
free(window);
|
||||
|
|
@ -29,8 +28,7 @@ void ARC_Window_Create(ARC_Window **window, ARC_WindowInfo *info){
|
|||
}
|
||||
|
||||
void ARC_Window_Destroy(ARC_Window *window){
|
||||
SDL_DestroyWindow((SDL_Window *) window->window);
|
||||
free(window);
|
||||
SDL_DestroyWindow((SDL_Window *) window);
|
||||
}
|
||||
|
||||
#endif //ARC_SDL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue