Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glsl code getting interpreted as a format directive #246

Open
Piroshky opened this issue May 12, 2021 · 0 comments
Open

glsl code getting interpreted as a format directive #246

Piroshky opened this issue May 12, 2021 · 0 comments

Comments

@Piroshky
Copy link

Piroshky commented May 12, 2021

The glsl code emitted for lognand is return (~(A & B));. Unfortunately "~(" has semantic meaning to #'format so this causes an error when glsl-chunk-from-compiled calls glsl-line, which in turn calls format.
I fixed this by changing #'glsl-line to the following:

(defun glsl-line (control-string &rest args)
  (declare (type string control-string))
  (%make-glsl-line :string-part (if args (apply #'format nil control-string args) control-string)))

All I did was wrap the format call in an if statement that checks if there are args to pass to format.
If there isn't then format isn't needed anyways. I didn't make this a pull request as it seems like a
bit of a bodge and doesn't address the underlying issue. But I figure'd I'd document it in case
someone needs it short term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant