src/video/uikit/SDL_uikitopenglview.h
author Ryan C. Gordon <icculus@icculus.org>
Tue, 25 Feb 2020 14:52:03 -0500
changeset 13553 78754c9488f6
parent 13422 fd6a12de91c7
permissions -rw-r--r--
cmake: Forgot to add this file to revision control.

Fixes Bugzilla #5003.
slouken@2765
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@13422
     3
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
slouken@2765
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@2765
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@2765
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@2765
    20
*/
slouken@2765
    21
slouken@13312
    22
#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
slouken@13312
    23
slouken@2765
    24
#import <UIKit/UIKit.h>
slouken@2765
    25
#import <OpenGLES/EAGL.h>
slime73@9810
    26
#import <OpenGLES/ES3/gl.h>
slime73@9532
    27
slouken@2765
    28
#import "SDL_uikitview.h"
slime73@9532
    29
#include "SDL_uikitvideo.h"
slime73@9532
    30
slime73@9501
    31
@interface SDL_uikitopenglview : SDL_uikitview
slouken@2765
    32
slime73@9532
    33
- (instancetype)initWithFrame:(CGRect)frame
slime73@9532
    34
                        scale:(CGFloat)scale
slime73@9532
    35
                retainBacking:(BOOL)retained
slime73@9532
    36
                        rBits:(int)rBits
slime73@9532
    37
                        gBits:(int)gBits
slime73@9532
    38
                        bBits:(int)bBits
slime73@9532
    39
                        aBits:(int)aBits
slime73@9532
    40
                    depthBits:(int)depthBits
slime73@9532
    41
                  stencilBits:(int)stencilBits
slime73@9532
    42
                         sRGB:(BOOL)sRGB
slime73@9810
    43
                 multisamples:(int)multisamples
slime73@9727
    44
                      context:(EAGLContext *)glcontext;
slouken@2765
    45
slime73@9727
    46
@property (nonatomic, readonly, weak) EAGLContext *context;
slime73@9501
    47
slime73@9501
    48
/* The width and height of the drawable in pixels (as opposed to points.) */
slime73@9501
    49
@property (nonatomic, readonly) int backingWidth;
slime73@9501
    50
@property (nonatomic, readonly) int backingHeight;
slime73@9501
    51
slime73@9514
    52
@property (nonatomic, readonly) GLuint drawableRenderbuffer;
slime73@9514
    53
@property (nonatomic, readonly) GLuint drawableFramebuffer;
slime73@9810
    54
@property (nonatomic, readonly) GLuint msaaResolveFramebuffer;
slime73@9514
    55
slime73@9501
    56
- (void)swapBuffers;
slime73@9501
    57
icculus@5527
    58
- (void)updateFrame;
icculus@5527
    59
slouken@2765
    60
@end
slouken@5133
    61
slouken@13312
    62
#endif // SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
slouken@13312
    63
slouken@5133
    64
/* vi: set ts=4 sw=4 expandtab: */