Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Minor example tweaks.#3

Merged
ajhager merged 1 commit intogopherjs:masterfrom
dmitshur:patch-2
Jul 13, 2014
Merged

Minor example tweaks.#3
ajhager merged 1 commit intogopherjs:masterfrom
dmitshur:patch-2

Conversation

@dmitshur
Copy link
Member

  • Improve error handling to display the error message via alert(). This is important as some browsers do not have WebGL enabled (by default), so some users will run into this problem.
  • Remove tag from HTML since it wasn't being used.

Improve error handling to display the error message via alert(). This is important as some browsers do not have WebGL enabled (by default), so some users will run into this problem.
Remove <head> tag from HTML since it wasn't being used.
ajhager pushed a commit that referenced this pull request Jul 13, 2014
@ajhager ajhager merged commit 58868bc into gopherjs:master Jul 13, 2014
@dmitshur dmitshur deleted the patch-2 branch July 13, 2014 23:07
@dmitshur
Copy link
Member Author

I have to admit, now that I finally got webgl to work via gopherjs, this is extremely exciting! :D

@ajhager
Copy link
Contributor

ajhager commented Jul 13, 2014

I am actually working on merging my gopherjs engine 'enj' with my desktop engine 'eng'. Should be able to compile to both using the same source. I'm looking forward to seeing what you come up with!

@dmitshur
Copy link
Member Author

That sounds great. I share the same goal of being able to write one set of Go code and compile it to both desktop/OpenGL and web/WebGL.

I will definitely be keeping an eye on your efforts.

The coolest part of WebGL is that you can effectively edit GL calls on the fly for a live coding experience. I find it really frustrating to have to change GL code, then recompile and rerun my project to see if a value of 0.84 or 0.85 looks nicer.

@dmitshur
Copy link
Member Author

Hey @ajhager, is there any simple "draw a triangle" WebGL example using this library that you're aware of? Something like https://github.com/errcw/glow/blob/master/examples/cube/cube.go, where it loads a vertex and fragment shaders and draws something visible on the screen.

Basically, I want something a little more advanced than a "gl.ClearColor" and less advanced than a full game engine.

If not, I'll just use enj-examples and enj to figure it out, but if you could point me to something that exists, that'd be great.

@ajhager
Copy link
Contributor

ajhager commented Jul 15, 2014

Yeah, I will come up with a simple example.

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

Successfully merging this pull request may close these issues.

2 participants