Adding ViroKit. Needs AWSCore :(

This commit is contained in:
John Lyon-Smith
2018-03-27 17:46:15 -07:00
parent 2ab15e7dc1
commit 02e06dface
844 changed files with 86921 additions and 21 deletions

View File

@@ -0,0 +1,45 @@
//
// VROImageiOS.h
// ViroRenderer
//
// Created by Raj Advani on 11/3/16.
// Copyright © 2016 Viro Media. All rights reserved.
//
#ifndef VROImageiOS_h
#define VROImageiOS_h
#import "VROImage.h"
#import <UIKit/UIKit.h>
class VROImageiOS : public VROImage {
public:
/*
Construct a new VROImage from the given UIImage. The data will
be extracted from the UIImage into a format compatible with the
given target internal format.
*/
VROImageiOS(UIImage *image, VROTextureInternalFormat format);
virtual ~VROImageiOS();
int getWidth() const {
return _width;
}
int getHeight() const {
return _height;
}
unsigned char *getData(size_t *length);
private:
bool hasAlpha(UIImage *image);
int _width, _height;
int _dataLength;
unsigned char *_data;
};
#endif /* VROImageiOS_h */