Git Product home page Git Product logo

swiftvvd's People

Contributors

hongtae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftvvd's Issues

Linux trying to use CoreGraphics

I'm new to this repo. Looks like either: some stuff is compiling for linux that shouldn't be, or some things that should compile are using Mac-specific types

❯ swift build
Building for debugging...
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:36:19: error: cannot find type 'CGPoint' in scope
    var location: CGPoint
                  ^~~~~~~
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:57:65: error: cannot find type 'CGPoint' in scope
    override func began(deviceID: Int, buttonID: Int, location: CGPoint) {
                                                                ^~~~~~~
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:57:19: error: method does not override any method from its superclass
    override func began(deviceID: Int, buttonID: Int, location: CGPoint) {
    ~~~~~~~~      ^
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:68:65: error: cannot find type 'CGPoint' in scope
    override func moved(deviceID: Int, buttonID: Int, location: CGPoint) {
                                                                ^~~~~~~
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:68:19: error: method does not override any method from its superclass
    override func moved(deviceID: Int, buttonID: Int, location: CGPoint) {
    ~~~~~~~~      ^
/home/arckex/SwiftVVD/Sources/DKGUI/Views/Gesture/ButtonGesture.swift:41:26: error: cannot infer contextual base in reference to member 'zero'
        self.location = .zero
                        ~^~~~

Swift playground

Around 6 months ago, I asked if this would be available on iPad via swift playgrounds, and was responded with @Hongtae saying that there is no plans currently, but you may add it in the future. As I stated at the beginning, it has been 6 months. I wanted to get an update on where the swift playground version currently is at. Not planned, planned, started, forgot, etc. I hope/expect your quick reply!

iOS

How do you open this on swift playgrounds for iPadOS? I don’t have a computer but I really wanna try this, it seem cool!

Can't load default.vert

I cloned repository with LFS, opened package in Xcode 15.2, run TestApp1 and got runtime error:
[DKGame:debug:E8944C00] Notification: name = NSApplicationWillFinishLaunchingNotification, object = Optional(<NSApplication: 0x12861ba50>), userInfo = nil [DKGame:error:E8944C00] SPIRV-Cross: Invalid SPIRV format. [DKGame:error:E8944C00] Shader.compile() error: "Invalid SPIRV format.", spvc_result(rawValue: -1) [DKGame:error:E8944C00] URL(file:///Users/fedor/Library/Developer/Xcode/DerivedData/SwiftVVD-ayyxphwodmnkithitdfowuberhio/Build/Products/Debug/DKGame_DKGUI.bundle/Contents/Resources/SPIRV/default.vert.spv) error: LoadError(message: "Failed to load shader: default.vert") DKGUI/GraphicsContext+Pipeline.swift:452: Fatal error: GraphicsPipelineStates.sharedInstance(commandQueue:) Error: LoadError(message: "Failed to load shader: default.vert")

I've tried on MacBook Pro with M1 and Sonoma 14.5

strncpy_s not available on Linux

Not sure what is best solution, but here's one. Maybe windows needs that too? IDK

//
//  File: VulkanUnsafePointer.swift
//  Author: Hongtae Kim ([email protected])
//
//  Copyright (c) 2022-2023 Hongtae Kim. All rights reserved.
//

#if ENABLE_VULKAN
import Foundation
import Vulkan

#if os(Linux)
import Glibc

func strncpy_s(_ dest: UnsafeMutablePointer<CChar>, _ destSize: Int, _ src: UnsafePointer<CChar>, _ count: Int) -> Int {
    // Check if the destination size is zero or less
    if destSize <= 0 {
        return -1 // Invalid destination size
    }

    // Ensure that we do not copy more than the destination can hold
    let copyCount = min(count, destSize - 1)

    // Perform the copy
    strncpy(dest, src, copyCount)

    // Ensure null termination
    dest[copyCount] = 0

    // If the source string is longer than the destination buffer, return an error
    if count >= destSize {
        return -1 // Indicate truncation error
    }

    return 0 // Indicate success
}
#endif

Build fails on Sonoma 14.1.2 intel mac

Swift info

swift --version
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: x86_64-apple-macosx14.0

Output of swift build

swift build
warning: 'vulkan': ignoring declared target(s) 'Vulkan' in the system package
warning: 'vulkan': system packages are deprecated; use system library targets instead
Building for debugging...
error: unknown argument: '-fprofile-instr-generate'
[0/7] Compiling SPIRV-Cross-static spirv_msl.cpp

Not sure how to get around this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.