Commit graph

54 commits

Author SHA1 Message Date
660f7290a0 [TheGreatCube] Start and stop the rendering loop in view lifecycle 2015-11-15 08:54:15 -08:00
eddb49a4a8 [Renderer] Fiddling with RenderingSurface; added OpenGL and GLKit to the linked frameworks 2015-11-15 08:53:46 -08:00
cb22821fc5 [Renderer] Move around OpenGLView setup to allow calling start() and stop() 2015-11-15 08:29:07 -08:00
c14a4fcd24 [Renderer] No need to nil out the renderer property 2015-11-15 08:18:22 -08:00
02b9d4d7d8 [TheGreatCube] Set the viewport of the view 2015-11-14 23:58:08 -08:00
c1fbf7bf95 [TheGreatCube] Implement a FrameRenderer
It doesn't really do anything yet...
2015-11-14 23:47:57 -08:00
f8ec516b2f [Renderer] Override prepareOpenGL to do some more setup
Set the clear color and some depth buffer stuff. Eventually I want to move this
to the delegate, but not totally sure how yet.
2015-11-14 23:46:47 -08:00
cae145e0c1 [Renderer] Add RenderingSurface protocol
The OpenGLView implements RenderingSurface and passes itself in the newly
updated renderOntoSurface(_:atTime:) call.
2015-11-14 23:46:37 -08:00
0338f7360d Create group for framework projects 2015-11-14 23:23:14 -08:00
207765654f [Renderer] Move OpenGLView to OpenGL directory 2015-11-14 23:21:55 -08:00
e11620c8aa [TheGreatCube] Simple storyboard with an OpenGLView 2015-11-14 23:17:34 -08:00
2abf63e6fc [Renderer] Convert CV stuff to callback
Use callback instead of handler because the latter is apparently broken?
Fix a few issues I found by trying to build a simple app with it.
2015-11-14 23:17:15 -08:00
7f27ca7bc6 [TheGreatCube] A port of my HelloGLTriangle project to Swift and my libraries 2015-11-14 22:17:24 -08:00
bca8180f52 [Renderer] Define a FrameRenderer
This protocol is a delegate of the view/window/whatever that is running the
animation timer. When its renderAtTime() method is called, the rendering surface
should be fully prepared for drawing commands.
2015-11-14 22:15:12 -08:00
7e55045d10 [Renderer] Lots of clean up for OpenGLView.renderAtTime()
Lock and unlock and make current the view's context.
Do some weak error handling.
2015-11-14 22:13:56 -08:00
79ddf9ee54 [Renderer] Use a guard instead of an if 2015-11-14 09:58:38 -08:00
c9f24e095b [Renderer] Delete and rebuild the Renderer project
It's just easier this way...
2015-11-13 22:45:17 -08:00
6fc2cd0a10 [Renderer] Rename OpenGLRenderer source directory to OpenGL 2015-11-13 22:41:47 -08:00
1485060712 [Renderer] Rename top-level directory 2015-11-13 22:40:54 -08:00
4d7c798b41 [Renderer] Rename OpenGLRenderer -> Renderer in Xcode 2015-11-13 22:40:10 -08:00
93da94e384 [OpenGLRenderer] Rough outline of an NSOpenGLView subclass
Handles setting up the displayLink and starting it when added/removed from a
superview. It is up to subclasses (or delegates -- I haven't decided which yet)
to add the appropriate behavior.
2015-11-13 08:31:54 -08:00
a1270d4ea5 [Math] MARKs for general health 2015-11-12 23:23:24 -08:00
d536e8f04b [Math] Make Vector3 and Vector4 CustomStringConvertable 2015-11-12 23:23:24 -08:00
77b0bf7014 [Math] Make vectors AlmostEquatable 2015-11-12 23:23:24 -08:00
cd8bd144f6 [Math] Fix Matrix-Vector multiplication 2015-11-12 23:23:24 -08:00
23bbdac76a [Math] Some basic Vector tests 2015-11-12 23:23:24 -08:00
58dfb3f787 [Math] ==~ operator applies to any <AlmostEquatable, EquatableWithinEpsilon> 2015-11-12 23:23:24 -08:00
1d1e5134d8 [Math] Add test that Matrix init throws for invalid values array 2015-11-12 23:22:42 -08:00
94b12cc2ba [Math] Create Types.swift 2015-11-06 08:15:23 -08:00
204606d256 [Math] Some operator tests 2015-11-01 20:40:37 -08:00
541e7c38ef [Math] Move the multiplication to the * operator
*= must be done with a temporary variable first to avoid stepping on the other elements.
2015-11-01 20:40:27 -08:00
65823610c1 [Math] Fix my negation operator 2015-11-01 20:39:39 -08:00
fcd68b8f86 [Math] Marks for Matrix tests 2015-11-01 20:15:38 -08:00
f6740cae06 [Math] Add translation, scale, and rotation about single axis constructors for Matrix4 2015-11-01 20:15:13 -08:00
95560b8a8a [Math] for loops for checking Matrix values 2015-11-01 19:40:20 -08:00
48e531efbf [Math] Refactor the tests a bit
Use non-optional m, and pre-set the values array.
2015-11-01 19:40:00 -08:00
0778e62fd0 [Math] Make Matrix subscript setters mutable
I think this avoids making unnecessary copies of the matrix when setting data values.
2015-11-01 19:39:01 -08:00
acd879465c [Math] Working out some tests for matrices 2015-11-01 13:12:17 -08:00
90e9b96468 [Math] Bump the precedence of cross product to 151 -- it should be done first 2015-11-01 07:32:17 -08:00
bf9a4ba138 [Math] Remove some dead code 2015-11-01 07:31:11 -08:00
c6203f1af8 [Math] Fix up the matrices 2015-10-31 18:18:41 -07:00
62570392b0 [Math] Tweakin' the Vectors a bit
- count is a static var
2015-10-31 18:18:14 -07:00
662e95bcca [COLLADA] Endless fighting with Swift and COLLADA blahhhhhh 2015-10-31 12:52:12 -07:00
9be3a41bdf Formatting 2015-10-29 11:45:55 -07:00
e6df8499e5 Move some stuff around... 2015-10-29 11:01:39 -07:00
d1bd19a356 Move vector stuff to its own Swift file and finish 'em up! 2015-10-29 10:56:31 -07:00
e7e53ba73c Rename Matrices.swift -> Matrix.swift 2015-10-29 07:51:36 -07:00
3e1a1fc9b6 [Math] Vertex4 2015-10-29 07:51:07 -07:00
2b1e3648f4 [Math] Sort out Vector3, make it conform to Vector protocol 2015-10-28 20:56:21 -07:00
84f7d6bc2c Add empty COLLADA target/project to the workspace 2015-10-28 20:38:46 -07:00