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

glow generates invalid code for OpenGL 2.0 #37

Closed
emidoots opened this issue Aug 15, 2014 · 4 comments
Closed

glow generates invalid code for OpenGL 2.0 #37

emidoots opened this issue Aug 15, 2014 · 4 comments

Comments

@emidoots
Copy link
Member

Generate the OpenGL 2.0 wrappers using:
glow generate -api=gl -profile=core -version=2.0 -xml=xml/

Build them and you will get something like:

$ go install tmp/gl-core/...
# tmp/gl-core/2.0/gl
gl-core/2.0/gl/package.go:8220:5: expected declaration, found 'IDENT' store
gl-core/2.0/gl/package.go:10370:24: rune literal not terminated
gl-core/2.0/gl/package.go:10375:26: rune literal not terminated
gl-core/2.0/gl/package.go:11057:24: rune literal not terminated
gl-core/2.0/gl/package.go:11062:26: rune literal not terminated

Further inspection shows that the PackageFunction's Doc strings sometimes (not often) contain newline characters in them. For instance:

// creates and initializes a buffer object's data
    store
func BufferData(target uint32, size int, data unsafe.Pointer, usage uint32) {
  C.glowBufferData(gpBufferData, (C.GLenum)(target), (C.GLsizeiptr)(size), data, (C.GLenum)(usage))
}
@errcw
Copy link
Member

errcw commented Aug 15, 2014

I encountered the same issue updating the packages for OpenGL 4.5. I have a fix pending for #33 which will also resolve this issue. ETA this weekend I can resolve the last issues with that PR.

@emidoots
Copy link
Member Author

Ah! Okay. I won't submit a pull request for this one then.

errcw added a commit that referenced this issue Aug 16, 2014
Add OpenGL 4.5 support.

Fix #33, #37.
@errcw
Copy link
Member

errcw commented Aug 16, 2014

As promised, this issue should now be fixed.

@errcw errcw closed this as completed Aug 16, 2014
@emidoots
Copy link
Member Author

Indeed it is. Thank you for the very prompt responses!

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

2 participants