Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Michael Ilseman via swift-users

> On Jan 4, 2016, at 7:11 PM, David Turnbull via swift-users 
>  wrote:
> 
> I've been working on a math library for SwiftGL. It's looking good. Vector2, 
> Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all 
> arithmetic. You can even swizzle just like GLSL.
> 
> var myVec = vec4(1, 2, 3, 4)
> myVec.ab = vec2(99, 98)
> print(myVec) //=> (1, 2, 98, 99)
> 

This is pretty cool!

> There's still a lot to do. I hope to have feature parity with GLSL done this 
> week. But it's ready to set free and get feedback.
> 

What all is mean by “feature parity” with GLSL, given that GLSL is for 
authoring shaders intended to be ran on device (texture units, interpolation, 
fuzzy floating point math semantics, etc) and your library presumably is 
running on host? Do you plan on synthesizing shaders (warning: this may be a 
little bit tricker than it seems)?

> https://github.com/AE9RB/SwiftGL 
> 
> And a couple questions. Is there any way to make import SwiftGL.Math work? 
> Note the dot. Also, is there anything reasonable I can do to improve the 
> compile time? 3.5 minutes for 2000 lines of code can't be right.
> 
> -David "Expression was too complex to be solved" Turnbull
> 
>  ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Stephen Canon via swift-users
Hey David —

FYI essentially all of this stuff is already present in the simd module 
(stdlib/public/SDK/simd/simd.swift.gyb or ‘import simd'), albeit without nice 
generics, and with some different stylistic choices because simd is at present 
a straight Swift port of a subset of the simd C/Obj-C/C++ library on OS X and 
iOS (the most important distinction is that the vector types are compatible 
with clang extended vectors in C languages).

Making the simd module more “swifty” is something that will need to happen 
eventually, and there’s a lot of other opportunities for other improvements, 
but you should be aware that it’s available.

– Steve

> On Jan 4, 2016, at 10:11 PM, David Turnbull via swift-users 
>  wrote:
> 
> I've been working on a math library for SwiftGL. It's looking good. Vector2, 
> Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all 
> arithmetic. You can even swizzle just like GLSL.
> 
> var myVec = vec4(1, 2, 3, 4)
> myVec.ab = vec2(99, 98)
> print(myVec) //=> (1, 2, 98, 99)
> 
> There's still a lot to do. I hope to have feature parity with GLSL done this 
> week. But it's ready to set free and get feedback.
> 
> https://github.com/AE9RB/SwiftGL 
> 
> And a couple questions. Is there any way to make import SwiftGL.Math work? 
> Note the dot. Also, is there anything reasonable I can do to improve the 
> compile time? 3.5 minutes for 2000 lines of code can't be right.
> 
> -David "Expression was too complex to be solved" Turnbull
> 
>  ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


[swift-users] An OpenGL math library in pure Swift

2016-01-04 Thread David Turnbull via swift-users
I've been working on a math library for SwiftGL. It's looking good.
Vector2, Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented
with all arithmetic. You can even swizzle just like GLSL.

var myVec = vec4(1, 2, 3, 4)

myVec.ab = vec2(99, 98)

print(myVec) //=> (1, 2, 98, 99)

There's still a lot to do. I hope to have feature parity with GLSL done
this week. But it's ready to set free and get feedback.

https://github.com/AE9RB/SwiftGL

And a couple questions. Is there any way to make import SwiftGL.Math work?
Note the dot. Also, is there anything reasonable I can do to improve the
compile time? 3.5 minutes for 2000 lines of code can't be right.

-David "Expression was too complex to be solved" Turnbull
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users