1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
//
// Prefix header for all source files of the 'textureGeneratorTestRig' target in the 'textureGeneratorTestRig' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import "OOMaths.h"
typedef struct RANROTSeed
{
uint32_t high,
low;
} RANROTSeed;
unsigned RanrotWithSeed(RANROTSeed *ioSeed);
float randfWithSeed(RANROTSeed *ioSeed);
@protocol OOAsyncWorkTask <NSObject>
@end
typedef enum
{
kOOTextureDataInvalid,
kOOTextureDataRGBA, // GL_RGBA, GL_UNSIGNED_INT_8_8_8_8 little-endian/GL_UNSIGNED_INT_8_8_8_8_REV big-endian.
kOOTextureDataGrayscale
} OOTextureDataFormat;
typedef float GLfloat;
typedef NSInteger OOInteger;
typedef NSUInteger OOUInteger;
typedef double OOTimeDelta;
@class OOTextureGenerator;
@interface OOTexture: NSObject
{
@private
OOTextureGenerator *_generator;
}
+ (id) textureWithGenerator:(OOTextureGenerator *)generator;
@property (retain) OOTextureGenerator *generator;
@end
// MockUniverse stands in for both Universe and MyOpenGLView.
@interface MockUniverse: NSObject
+ (MockUniverse *) sharedUniverse;
- (BOOL) reducedDetail;
- (MockUniverse *) gameView;
// General image-dumping methods.
- (void) dumpRGBAToFileNamed:(NSString *)name
bytes:(uint8_t *)bytes
width:(OOUInteger)width
height:(OOUInteger)height
rowBytes:(OOUInteger)rowBytes;
- (void) dumpRGBToFileNamed:(NSString *)name
bytes:(uint8_t *)bytes
width:(OOUInteger)width
height:(OOUInteger)height
rowBytes:(OOUInteger)rowBytes;
- (void) dumpGrayToFileNamed:(NSString *)name
bytes:(uint8_t *)bytes
width:(OOUInteger)width
height:(OOUInteger)height
rowBytes:(OOUInteger)rowBytes;
// Split alpha into separate file.
- (void) dumpRGBAToRGBFileNamed:(NSString *)rgbName
andGrayFileNamed:(NSString *)grayName
bytes:(uint8_t *)bytes
width:(OOUInteger)width
height:(OOUInteger)height
rowBytes:(OOUInteger)rowBytes;
@end
#define UNIVERSE [MockUniverse sharedUniverse]
#define DESTROY(x) do { id x_ = x; x = nil; [x_ release]; } while (0)
enum
{
// Values don't matter in test rig
kOOTextureMinFilterLinear, kOOTextureMagFilterLinear, kOOTextureRepeatS, kOOTextureNoShrink
};
void OOLog(NSString *msgClass, NSString *format, ...);
void NSLogShim(NSString *format, ...);
#define NSLog NSLogShim
// Texture generators have very simple colour needs.
@interface OOColor: NSObject
{
@private
float redComponent, greenComponent, blueComponent;
}
+ (OOColor *) colorWithRed:(float)r green:(float)g blue:(float)b;
@property float redComponent;
@property float greenComponent;
@property float blueComponent;
@end
#endif
|