Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOShaderUniformMethodType.h
Go to the documentation of this file.
1/*
2
3OOShaderUniformMethodType.h
4
5Type code declarations and OpenStep implementation agnostic method type
6matching for uniform bindings.
7
8
9Copyright (C) 2007-2013 Jens Ayton
10
11Permission is hereby granted, free of charge, to any person obtaining a copy
12of this software and associated documentation files (the "Software"), to deal
13in the Software without restriction, including without limitation the rights
14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15copies of the Software, and to permit persons to whom the Software is
16furnished to do so, subject to the following conditions:
17
18The above copyright notice and this permission notice shall be included in all
19copies or substantial portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27SOFTWARE.
28
29*/
30
32
33#if OO_SHADERS || !defined(NDEBUG)
34
35#import "OOMaths.h"
36#import "OOHPVector.h"
37
38
39typedef enum
40{
41 kOOShaderUniformTypeInvalid, // Not valid for bindings or constants
42
43 kOOShaderUniformTypeChar, // Binding only
47 kOOShaderUniformTypeInt, // Binding or constant
49 kOOShaderUniformTypeLong, // Binding only
53 kOOShaderUniformTypeFloat, // Binding or constant
55 kOOShaderUniformTypeVector, // Binding or constant
57 kOOShaderUniformTypeQuaternion, // Binding or constant
58 kOOShaderUniformTypeMatrix, // Binding or constant
61
62 kOOShaderUniformTypeCount // Not valid for bindings or constants
64
65
67
68long long OOCallIntegerMethod(id object, SEL selector, IMP method, OOShaderUniformType type);
69double OOCallFloatMethod(id object, SEL selector, IMP method, OOShaderUniformType type);
70
71
72typedef char (*CharReturnMsgSend)(id, SEL);
73typedef unsigned char (*UnsignedCharReturnMsgSend)(id, SEL);
74typedef short (*ShortReturnMsgSend)(id, SEL);
75typedef unsigned short (*UnsignedShortReturnMsgSend)(id, SEL);
76typedef int (*IntReturnMsgSend)(id, SEL);
77typedef unsigned int (*UnsignedIntReturnMsgSend)(id, SEL);
78typedef long (*LongReturnMsgSend)(id, SEL);
79typedef unsigned long (*UnsignedLongReturnMsgSend)(id, SEL);
80typedef long long (*LongLongReturnMsgSend)(id, SEL);
81typedef unsigned long long (*UnsignedLongLongReturnMsgSend)(id, SEL);
82typedef float (*FloatReturnMsgSend)(id, SEL);
83typedef double (*DoubleReturnMsgSend)(id, SEL);
84typedef Vector (*VectorReturnMsgSend)(id, SEL);
85typedef HPVector (*HPVectorReturnMsgSend)(id, SEL);
86typedef Quaternion (*QuaternionReturnMsgSend)(id, SEL);
87typedef OOMatrix (*MatrixReturnMsgSend)(id, SEL);
88typedef NSPoint (*PointReturnMsgSend)(id, SEL);
89typedef id (*ObjectReturnMsgSend)(id, SEL);
90
91#endif // OO_SHADERS
int(* IntReturnMsgSend)(id, SEL)
unsigned int(* UnsignedIntReturnMsgSend)(id, SEL)
long long OOCallIntegerMethod(id object, SEL selector, IMP method, OOShaderUniformType type)
double(* DoubleReturnMsgSend)(id, SEL)
char(* CharReturnMsgSend)(id, SEL)
long long(* LongLongReturnMsgSend)(id, SEL)
short(* ShortReturnMsgSend)(id, SEL)
unsigned char(* UnsignedCharReturnMsgSend)(id, SEL)
unsigned long(* UnsignedLongReturnMsgSend)(id, SEL)
HPVector(* HPVectorReturnMsgSend)(id, SEL)
id(* ObjectReturnMsgSend)(id, SEL)
OOShaderUniformType OOShaderUniformTypeFromMethodSignature(NSMethodSignature *signature)
double OOCallFloatMethod(id object, SEL selector, IMP method, OOShaderUniformType type)
Vector(* VectorReturnMsgSend)(id, SEL)
unsigned short(* UnsignedShortReturnMsgSend)(id, SEL)
@ kOOShaderUniformTypeCount
@ kOOShaderUniformTypeQuaternion
@ kOOShaderUniformTypeMatrix
@ kOOShaderUniformTypeVector
@ kOOShaderUniformTypeLong
@ kOOShaderUniformTypeUnsignedChar
@ kOOShaderUniformTypeShort
@ kOOShaderUniformTypePoint
@ kOOShaderUniformTypeUnsignedLong
@ kOOShaderUniformTypeFloat
@ kOOShaderUniformTypeUnsignedInt
@ kOOShaderUniformTypeUnsignedShort
@ kOOShaderUniformTypeLongLong
@ kOOShaderUniformTypeUnsignedLongLong
@ kOOShaderUniformTypeDouble
@ kOOShaderUniformTypeObject
@ kOOShaderUniformTypeHPVector
@ kOOShaderUniformTypeInt
@ kOOShaderUniformTypeChar
@ kOOShaderUniformTypeInvalid
Quaternion(* QuaternionReturnMsgSend)(id, SEL)
float(* FloatReturnMsgSend)(id, SEL)
unsigned long long(* UnsignedLongLongReturnMsgSend)(id, SEL)
NSPoint(* PointReturnMsgSend)(id, SEL)
long(* LongReturnMsgSend)(id, SEL)
OOMatrix(* MatrixReturnMsgSend)(id, SEL)
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque