pureswift / sdl Goto Github PK
View Code? Open in Web Editor NEWSwift library for SDL2
License: MIT License
Swift library for SDL2
License: MIT License
Hi,
Would it be possible to add a release tag to the repo, as it can't currently be imported as a dependency without one.
Thanks
Hi, how can I build the demo app? When I try to build it using swift build
I get
Compile Swift Module 'SDLDemo' (1 sources)
~/Downloads/SDL/Sources/SDLDemo/main.swift:5:21: error: use of unresolved identifier 'SDLRenderDrivers'
let renderDrivers = SDLRenderDrivers()
^~~~~~~~~~~~~~~~
~/Downloads/SDL/Sources/SDLDemo/main.swift:22:50: error: cannot use optional chaining on non-optional value of type '() throws -> SDLDisplayMode'
let framesPerSecond = UInt(window.displayMode?.refresh_rate ?? 60)
~~~~~~~~~~~~~~~~~~^
~/Downloads/SDL/Sources/SDLDemo/main.swift:68:32: error: use of unresolved identifier 'Surface'
let imageSurface = Surface(rgb: textureSize, depth: 32)!
^~~~~~~
SDL.SDLSurface:1:20: note: did you mean 'SDLSurface'?
final public class SDLSurface {
^
CSDL2.SDL_Surface:1:15: note: did you mean 'SDL_Surface'?
public struct SDL_Surface {
^
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/damiaan/Downloads/SDL/.build/debug.yaml main output:
I am using Swift toolchain:
Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.2.0
Thanks for the library. I'm totally new to this and your lib is the first I got working.
After #8, when running swift run
I get errors of this kind:
error: value of type 'Int' has no member 'rawValue' static let argb8888 = SDLPixelFormat.Format(rawValue: UInt32(SDL_PIXELFORMAT_ARGB8888.rawValue))
So I went to back to a version before this pull was merged and it worked.
MacOS 10.15.1
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.