Comments (6)
I've changed the GL wrapper and it seems to work OK.
I don't know if the problem is on GLFW or GL side but I will investigate it further.
Maybe you can open a ticket to gogl project and link here?
package main import ( glfw "github.com/tapir/glfw3-go" "github.com/go-gl/gl" //"runtime" ) func main() { //runtime.LockOSThread() if !glfw.Init() { println("glfw init failure") } defer glfw.Terminate() //glfw.SetErrorCallback(func(err int, desc string) { panic(desc) }) window := glfw.CreateWindow(500, 500, "egles", nil, nil) defer window.Destroy() window.MakeContextCurrent() for { if window.ShouldClose() { break } width, height := window.GetSize() ratio := float64(width) / float64(height) //println(window.GetParameter(glfw.ClientApi)) gl.Viewport(0, 0, width, height) gl.Clear(gl.COLOR_BUFFER_BIT) gl.MatrixMode(gl.PROJECTION) gl.LoadIdentity() gl.Ortho(-ratio, ratio, -1.0, 1.0, 1.0, -1.0) gl.MatrixMode(gl.MODELVIEW) gl.LoadIdentity() gl.Rotatef(float32(glfw.GetTime()*50), 0, 0, 1.0) gl.Begin(gl.TRIANGLES) gl.Color3f(1.0, 0.0, 0.0) gl.Vertex3f(-0.6, -0.4, 0.0) gl.Color3f(0.0, 1.0, 0.0) gl.Vertex3f(0.6, -0.4, 0.0) gl.Color3f(0.0, 0.0, 1.0) gl.Vertex3f(0.0, 0.6, 0.0) gl.End() window.SwapBuffers() glfw.PollEvents() } }
from glfw.
I can confirm go-gl/gl works (though its kinda irritating to build right now). No idea why gogl doesnt work but for my specific use case it wont really matter anyways considering im using egl/gles.
from glfw.
You mean because of "glew" dependency?
Does go-gl/gl support gles or not?
from glfw.
Nope go-gl/gl only works with opengl.
Ive been working on EGL/GLES wrappers in my project egles(http://github.com/mortdeus/egles). The only setback is that mesa's egl implementation only supports xlib.h's display, window and pixmap types as of right now. If mesa had builtin support for xcb, we could just use burntsushi's xgb bindings to pass in as an EGLDisplay. Unfortunately it doesnt which would require wrapping xlib with cgo and thats just horrible.
Thats pretty much why im looking into glfw3.
from glfw.
Maybe you can use opengl 3.2 core profile until this issue figured out? AFAIK It's almost a strict superset of esgl.
from glfw.
http://play.golang.org/p/03RkIRH0qV
this seems to work ok as well (uses chsc/gogl) so I'm closing this bug.
from glfw.
Related Issues (20)
- X-POST from Fyne NSGL failed to find suitable pixel format
- GLFW: An uncaught error has occurred: APIUnavailable: GLX: No GLXFBConfigs returned HOT 1
- Crash during Init() when using race detector
- Unable to start applications inside toolbox HOT 1
- v3.3/glfw: _GNU_SOURCE is defined twice, emits a warning HOT 4
- v3.3/glfw: port `GLFW_CONTEXT_NO_ERROR` HOT 1
- Axis not recognized with Street Fighter "Mad Catz" Fightpad.
- v3.3/glfw: Warnings when building using -tags wayland HOT 2
- unaligned pointer(s) for architecture arm64 HOT 7
- v3.3/glfw: warning: 'GLAPIENTRY' macro redefined HOT 2
- I can't run the case project properly HOT 2
- -
- No error handling in v3.3 HOT 5
- Old module name in README installation instructions HOT 3
- IME support HOT 6
- Build fail on macOS ventura 13.2.1 HOT 3
- How to use in windows? HOT 2
- v3.4 and supporting GLFW_MOUSE_PASSTHROUGH HOT 7
- Converting to execution character set: Illegal byte sequence
- can not build on macos 13.3.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glfw.