WebGL for node.js

1,855 views
Skip to first unread message

Brian McKenna

unread,
Jun 9, 2010, 6:38:32 AM6/9/10
to nodejs
Hi everyone,

I've started a WebGL implementation using node.js, SDL and DevIL. It's
on GitHub here:

http://github.com/pufuwozu/node-webgl

I'm planning on creating some cool projects using WebGL in the future
and I thought it would be great if I could use the same code on the
desktop. I'm excited to hear what people think of the project.

Thanks,
Brian McKenna

Marak Squires

unread,
Jun 9, 2010, 12:05:38 PM6/9/10
to nod...@googlegroups.com
Whats the difference between opengl and webgl?


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.


Elijah Insua

unread,
Jun 9, 2010, 12:22:52 PM6/9/10
to nod...@googlegroups.com
On Wed, Jun 9, 2010 at 12:05 PM, Marak Squires <marak....@gmail.com> wrote:
Whats the difference between opengl and webgl?


node-ogl provides you direct api access to opengl, where as webgl is a subset / wrapper for opengl (mostly for use in a dom + browser). 
 


On Wed, Jun 9, 2010 at 6:38 AM, Brian McKenna <puffn...@gmail.com> wrote:
Hi everyone,

I've started a WebGL implementation using node.js, SDL and DevIL. It's
on GitHub here:

http://github.com/pufuwozu/node-webgl

I'm planning on creating some cool projects using WebGL in the future
and I thought it would be great if I could use the same code on the
desktop. I'm excited to hear what people think of the project.

I think this is interesting, It might be worth splitting out SDL into another project as it provides a much larger subset of functionality than what is needed for getting an ogl context.

I'd like to chat with you about using node-ogl as well.. I think with the majority of the API wrapped already, writing a webgl wrapper on top of it *might* make things easier.  I'd like to hear your opinions on this.

And for fun, last weekend I landed texture mapping (http://github.com/tmpvar/node-ogl/raw/master/example/nehe/lesson6.png) and other functions that take pointers as arguments.

-- Elijah

Brian McKenna

unread,
Jun 9, 2010, 9:33:04 PM6/9/10
to nod...@googlegroups.com
> On Wed, Jun 9, 2010 at 12:05 PM, Marak Squires <marak....@gmail.com>
> wrote:
>>
>> Whats the difference between opengl and webgl?
>> http://github.com/tmpvar/node-ogl

I started working on this project very slowly about a month ago. At
the time I searched around for node.js OpenGL bindings but it looks
like they weren't around then. It's a shame that I duplicated some of
that effort.

On 10 June 2010 02:22, Elijah Insua <tmp...@gmail.com> wrote:
> I think this is interesting, It might be worth splitting out SDL into
> another project as it provides a much larger subset of functionality than
> what is needed for getting an ogl context.
> I'd like to chat with you about using node-ogl as well.. I think with the
> majority of the API wrapped already, writing a webgl wrapper on top of it
> *might* make things easier.  I'd like to hear your opinions on this.
> And for fun, last weekend I landed texture mapping
> (http://github.com/tmpvar/node-ogl/raw/master/example/nehe/lesson6.png) and
> other functions that take pointers as arguments.
> -- Elijah

I'll get in contact sometime soon. I'm really interested in building
on top of node-ogl - thanks for the good work! I just need to come up
with a way to build on top of it nicely.

I'm about to add node-ogl to http://wiki.github.com/ry/node/modules -
hope you don't mind.

Thanks,
Brian McKenna

Louis Santillan

unread,
Jun 10, 2010, 12:58:49 AM6/10/10
to nod...@googlegroups.com
Not node specific, OpenGL 2.1+ (w/some Glut, Glu, and ES) for v8
(http://github.com/philogb/v8-gl).

-L

Elijah Insua

unread,
Jun 10, 2010, 1:00:38 AM6/10/10
to nod...@googlegroups.com
I'll get in contact sometime soon. I'm really interested in building
on top of node-ogl - thanks for the good work! I just need to come up
with a way to build on top of it nicely.

Agreed, I'm still trying to get various platform independent windowing libraries to work. so far I've had minimal luck. the linux version (only one currently working) is using a stupid simple wrapper around glfw's window creation.  Unfortunately I haven't been able to get it working under osx, but I'm continuing to battle with it nightly.
 
The problem with these libraries is they try to be the end all, by providing input/sound/image loading/video/etc.  I simply want a window + window events + opengl context.  In all reality, I may end up coding this up myself.

I'm about to add node-ogl to http://wiki.github.com/ry/node/modules -
hope you don't mind.

Nope, I wanted to have a bit more done before really announcing this, but I really don't mind either way (it's at a pretty decent point right now.. on linux).

-- Elijah 

Elijah Insua

unread,
Jun 10, 2010, 1:06:41 AM6/10/10
to nod...@googlegroups.com
On Thu, Jun 10, 2010 at 12:58 AM, Louis Santillan <lpsa...@gmail.com> wrote:
Not node specific, OpenGL 2.1+ (w/some Glut, Glu, and ES) for v8
(http://github.com/philogb/v8-gl).

When I saw this, It looked like it was no longer being actively developed or maintained.  I can't remember where I saw that, but looking at it now perhaps it will aid in solving some of my cross platform issues (I'd like to use glut as it removes a dependency from node-ogl)

-- Elijah

Stephen Belanger

unread,
Jun 10, 2010, 1:07:17 AM6/10/10
to nod...@googlegroups.com
I have a fork of that that I started working on adding audio support. When I get some more time I'll finish it off and start working on some other cool stuff like networking. I'm hoping to eventually make it a competitive alternative to pygame. :)

Elijah Insua

unread,
Jun 10, 2010, 1:12:33 AM6/10/10
to nod...@googlegroups.com
On Thu, Jun 10, 2010 at 1:07 AM, Stephen Belanger <cyruz...@gmail.com> wrote:
I have a fork of that that I started working on adding audio support. When I get some more time I'll finish it off and start working on some other cool stuff like networking. I'm hoping to eventually make it a competitive alternative to pygame. :)

Very cool!  If I can offer my opinion, I think all of these libraries should be kept as separate as possible.  For instance, I would hate to have to setup a window if all I want to do is play a sound or track movement of a mouse/joystick.

my 2 cents

-- Elijah
 

Stephen Belanger

unread,
Jun 10, 2010, 1:13:07 AM6/10/10
to nod...@googlegroups.com
It's still works fine, albeit a little iffy on the compiling side, since V8 has changed somewhat since the last release. My fork of it pulls the specific revision of V8 that it needs, so mine might be a little easier to compile. If you have any issues compiling either, I can help you out. It was a pain for me, since the support for non-mac systems was a bit incomplete--I had to add some of my own stuff to make it work on my linux system.

--

Stephen Belanger

unread,
Jun 10, 2010, 1:17:15 AM6/10/10
to nod...@googlegroups.com
That's the eventual plan. I want to organize it in such a way that when you compile it you can select to exclude features. IE: --disable-sdl --disable-openal --disable-alut --disable-networking

Each library gets it's own global object, so at the moment there is GL, Glu, Glut and Al. It'd actually be pretty easy to just make a few changes to the makefile to make it compile without a specific part of that at the moment.

--

Stephen Belanger

unread,
Jun 10, 2010, 1:19:08 AM6/10/10
to nod...@googlegroups.com
Oh, and you shouldn't actually need to setup a window presently, but there is no looping mechanism aside from the one built into OpenGL, so it would just start, run the script once and end as it is now.

cybwraith

unread,
Mar 31, 2011, 3:54:31 PM3/31/11
to nod...@googlegroups.com
Marak Squires <marak.squires@...> writes:

>
>
> Whats the difference between opengl and webgl?
>
>

> http://github.com/tmpvar/node-oglOn Wed, Jun 9, 2010 at 6:38 AM, Brian McKenna


This is pretty cool i think. Similar use (and more useful, really) to what I
made here: http://code.google.com/p/wtfgame/

vicapow

unread,
Apr 1, 2011, 12:05:28 AM4/1/11
to nodejs
OpenGL is a standard programming toolkit written in C that allows
programs to write code that utilizes the GPU particularly for 3D
graphics.
WebGL exposes OpenGL to web programmers though a javascript wrapper. A
nodeJS implementation would expose openGL for node applications. but
you could have googled that

On Mar 31, 3:54 pm, cybwraith <cyberneticwra...@gmail.com> wrote:
> Marak Squires <marak.squires@...> writes:
>
> > Whats the difference between opengl and webgl?
>
> >http://github.com/tmpvar/node-oglOnWed, Jun 9, 2010 at 6:38 AM, Brian McKenna
> <puffnfr...@gmail.com> wrote:Hi everyone,
> > I've started a WebGL implementation using node.js, SDL and DevIL. It's
> > on GitHub here:http://github.com/pufuwozu/node-webgl
> > I'm planning on creating some cool projects using WebGL in the future
> > and I thought it would be great if I could use the same code on the
> > desktop. I'm excited to hear what people think of the project.
> > Thanks,
> > Brian McKenna
> > --
> > You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> > To post to this group, send email to
>
> nod...@googlegroups.com.> To unsubscribe from this group, send email to
>
> nodejs+un...@googlegroups.com.
>
> > For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.

Stephen Belanger

unread,
Apr 1, 2011, 12:27:49 AM4/1/11
to nod...@googlegroups.com
WebGL is OpenGL ES, not OpenGL. There aren't many differences, but enough that we should avoid misleading readers that aren't in the know about that stuff. ;)
Reply all
Reply to author
Forward
0 new messages