goxjs / gl

Go cross-platform OpenGL bindings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: add basic examples.

joeblew99 opened this issue · comments

any chance on getting some basic examples, to have a base to work from ?

i am quite excited about this project and eager to see how well opengl and webgl can work together.

Sure, I will put together a basic example that will run on OS X, Linux, Windows, and in browser sometime within next few days.

Thanks for checking it out!

That would be great.

I will try to test it on all.

I am thinking a decent open gl and webgl runtime metrics is needed. When I ran the basic examples for go mobile on a nexus 6 I was getting 30 to 40 fps.

Until I get this done, you can take a look at a very simple triangle (moving via mouse) example:

https://github.com/shurcooL/play/blob/master/113/main.go

You should be able to run on OS X, Linux, Windows and in browser right now after just:

go get -u github.com/shurcooL/play/113

image

There are also larger examples with terrain rendering and textures in 114, 115 subfolders.

Thanks man

I got go mobile running on android but not chrome and nacl yet. It seems that the ART garbage collection that go mobile targets is ahead of the back ARC Welder.
Thats my suspision. Need todig a bit.

Its quite astounding that we can target webgl or opengl (via nacl)

What prevents it from running on windows?

@treeform, I'm not seeing Windows mentioned in this issue at all. What are you referring to?

goxjs/gl and goxjs/glfw do support Windows fully.

Edit: I see that I mentioned OS X, Linux, but not Windows. I guess that was an accidental omission. Windows is supported as of ab8907b (see #1).

This is done now. You can find some examples here:

https://github.com/goxjs/example#readme