diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 14:48:38 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 14:48:38 +0100 |
commit | 165f66fe379a9f488a97689aff1c7cb1ec2858f6 (patch) | |
tree | a4584619c358fe47ab080dd580538535b5c7a4a1 /minilibx_opengl_20191021/mlx_opengl.m | |
parent | Added libft (diff) | |
download | 42-cub3d-165f66fe379a9f488a97689aff1c7cb1ec2858f6.tar.gz 42-cub3d-165f66fe379a9f488a97689aff1c7cb1ec2858f6.tar.bz2 42-cub3d-165f66fe379a9f488a97689aff1c7cb1ec2858f6.tar.xz 42-cub3d-165f66fe379a9f488a97689aff1c7cb1ec2858f6.tar.zst 42-cub3d-165f66fe379a9f488a97689aff1c7cb1ec2858f6.zip |
Deleted libx
Diffstat (limited to '')
-rw-r--r-- | minilibx_opengl_20191021/mlx_opengl.m | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/minilibx_opengl_20191021/mlx_opengl.m b/minilibx_opengl_20191021/mlx_opengl.m deleted file mode 100644 index 554d79b..0000000 --- a/minilibx_opengl_20191021/mlx_opengl.m +++ /dev/null @@ -1,57 +0,0 @@ -// mlx_opengl.m - -#import <Cocoa/Cocoa.h> -#import <OpenGL/gl3.h> -#import <AppKit/NSOpenGLView.h> - -#include <stdio.h> - -#include "mlx_int.h" -#include "mlx_new_window.h" - - - - - -NSOpenGLPixelFormatAttribute pfa_attrs_opengl[] = - { - NSOpenGLPFADepthSize, 32, - NSOpenGLPFADoubleBuffer, - NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core, - 0 - }; - - - -void *mlx_new_opengl_window(mlx_ptr_t *mlx_ptr, int size_x, int size_y, char *title) -{ - mlx_win_list_t *newwin; - NSString *str; - - if ((newwin = malloc(sizeof(*newwin))) == NULL) - return ((void *)0); - newwin->img_list = NULL; - newwin->next = mlx_ptr->win_list; - newwin->nb_flush = 0; - newwin->pixmgt = 0; - mlx_ptr->win_list = newwin; - - NSRect windowRect = NSMakeRect(100, 100, size_x, size_y); - str = [NSString stringWithCString:title encoding:NSASCIIStringEncoding]; - newwin->winid = [[MlxWin alloc] initWithRect:windowRect andTitle:str pfaAttrs:pfa_attrs_opengl]; - - return ((void *)newwin); -} - - -int mlx_opengl_swap_buffers(mlx_win_list_t *win_ptr) -{ - [(id)(win_ptr->winid) flushGLContext]; - return (0); -} - -int mlx_opengl_window_set_context(mlx_win_list_t *win_ptr) -{ - [(id)(win_ptr->winid) selectGLContext]; - return (0); -} |