Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (51 sloc) 1.752 kb
dc5be1c Initial check-in.
uli authored
1 //
2 // NSOpenGLContext+DrawingExtensions.h
3 // TheBigRedButton
4 //
5 // Created by Uli Kusterer on 02.09.07.
720b0e7 @uliwitness Added licensing information to the source files.
authored
6 // Copyright 2007 M. Uli Kusterer.
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would be
19 // appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not be
22 // misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
dc5be1c Initial check-in.
uli authored
26 //
27
28 #import <Cocoa/Cocoa.h>
29
30
31 // This is our equivalent to NSPoint:
32 typedef struct _UK3DPoint
33 {
34 float x; // Horizontal.
35 float y; // Vertical.
36 float z; // Depth.
37 } UK3DPoint;
38
39
40 // Quads are four-sided polygons. Since we're talking
41 // 3D, "top", "left", "bottom" and "right" don't make
42 // much sense, but the drawing order is the same, so
43 // all points are connected to their predecessors, and
44 // in addition to that, A is connected to D.
45 typedef struct _UK3DQuad
46 {
47 UK3DPoint a;
48 UK3DPoint b;
49 UK3DPoint c;
50 UK3DPoint d;
51 } UK3DQuad;
52
53
54 @interface NSOpenGLContext (UKDrawingExtensions)
55
56 -(void) fillQuad: (UK3DQuad)quad;
57 -(void) fillQuadReflection: (UK3DQuad)quad;
58 -(void) fillQuadShadow: (UK3DQuad)quad;
59
60 @end
Something went wrong with that request. Please try again.