1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
Matej Jan 0a8f07b872 Added Texture2D loading from Data.
git-svn-id: http://xni.googlecode.com/svn/XNI@13 ac433895-eea3-a490-d80a-17149a75e588
2010-09-01 14:55:24 +00:00

40 lines
1.6 KiB
Objective-C

//
// Texture2D.h
// XNI
//
// Created by Matej Jan on 1.9.10.
// Copyright 2010 Retronator. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Texture.h"
@interface Texture2D : Texture {
int height;
int width;
}
- (id) initWithGraphicsDevice:(GraphicsDevice*)theGraphicsDevice Width:(int)theWidth Height:(int)theHeight;
// - (id) initWithGraphicsDevice:(GraphicsDevice*)theGraphicsDevice Width:(int)theWidth Height:(int)theHeight MipMaps:(BOOL)generateMipMaps Format:(SurfaceFormat)theFormat;
@property (nonatomic, readonly) Rectangle *bounds;
@property (nonatomic, readonly) int height;
@property (nonatomic, readonly) int width;
+ (Texture2D*) fromData:(NSData*)textureData GraphicsDevice:(GraphicsDevice*)graphicsDevice;
//+ (Texture2D*) fromData:(NSData*)textureData GraphicsDevice:(GraphicsDevice*)graphicsDevice Width:(int)width Height:(int)height Zoom:(BOOL)zoom;
// - (void) getDataTo:(void *)data;
// - (void) getDataTo:(void *)data StartIndex:(int)startIndex ElementCount:(int)elementCount;
// - (void) getDataFromLevel:(int)level SourceRectangle:(Rectangle*)rect To:(void *)data StartIndex:(int)startIndex ElementCount:(int)elementCount;
- (void) setDataFrom:(void *)data;
// - (void) setDataFrom:(void *)data StartIndex:(int)startIndex ElementCount:(int)elementCount;
// - (void) setDataToLevel:(int)level SourceRectangle:(Rectangle*)rect From:(void *)data StartIndex:(int)startIndex ElementCount:(int)elementCount;
// - (void) saveAsJpeg:(NSData*)textureData Width:(int)width Height:(int)height;
// - (void) saveAsPng:(NSData*)textureData Width:(int)width Height:(int)height;
@end