Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/Source/FillMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import OpenGLES
import COpenGL
#endif

import Foundation

public enum FillMode {
case stretch
Expand Down
8 changes: 4 additions & 4 deletions framework/Source/OpenGLRendering.swift
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ extension String {
}

func withGLChar(_ operation:(UnsafePointer<GLchar>) -> ()) {
if let value = self.cString(using:String.Encoding.utf8) {
operation(UnsafePointer<GLchar>(value))
} else {
fatalError("Could not convert this string to UTF8: \(self)")
let cString = self.utf8CString
cString.withUnsafeBytes { ptr -> Void in
let bind = ptr.bindMemory(to: CChar.self)
operation(bind.baseAddress!)
}
}
}
Expand Down