![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/notsatvrn/xgl
XGL is a cross-platform binding to OpenGL for Go, exposing an OpenGL ES-like API.
The API is very similar to OpenGL ES, with a few important changes.
GetBoundFramebuffer
function.GetShaderiv
to store integer values from a parameter in an array, or GetShaderi
to return only one.Gen
functions are renamed to Create
.
GenBuffers
becomes CreateBuffers
.CreateBuffer
.GetVertexAttribPointerv
or ShaderBinary
functions.
GetVertexAttribPointerv
requires a complicated implementation and wont be used by most programs.ShaderBinary
is impossible to implement for WebGL. Other platforms can support ShaderBinary
, but its usage is considered a security risk anyways, and we want to provide a consistent API on all platforms. No platform-specific functions.Below is a table showing the versions of XGL and the minimum required GL versions for each platform.
XGL | OpenGL (Desktop) | OpenGL ES (Mobile) | WebGL (Browser) |
---|---|---|---|
2.0 | 2.1 | 2.0 | 1.0 |
Support for OpenGL ES 3.0 and 3.1 is planned.
OpenGL ES 3.2 is not planned, due to WebGL not supporting it yet.
go get -u github.com/notsatvrn/xgl/...
GOARCH=js go get -u -d github.com/notsatvrn/xgl/...
These bindings implement a glfw.ContextWatcher interface.
Recommended usage is with github.com/notsatvrn/glfw
package, which accepts a ContextWatcher in its Init, and takes on the responsibility of notifying it when context is made current or detached.
if err := glfw.Init(gl.ContextWatcher); err != nil {
// Handle error.
}
defer glfw.Terminate()
If you're not using a ContextWatcher-aware glfw library, you must call methods of gl.ContextWatcher yourself whenever you make a context current or detached.
window.MakeContextCurrent()
gl.ContextWatcher.OnMakeCurrent(nil)
glfw.DetachCurrentContext()
gl.ContextWatcher.OnDetach()
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.