1
\$\begingroup\$

I know that WebGL is based on OpenGL ES 2.0 and that glBegin and glEnd have been removed and replaced with vertex buffer objects. I understand that VBOs are faster and use less code but is there a library or add-on for JavaScript / WebGL that re-implements these functions?

After more research, I have discovered that this functionality is called immediate mode.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

It's unclear what your rationale is for doing this. You might want to ask a new question about the problems you're running into that would inspire you to look for such a utility.

There is a library called LightGL that attempts to do what you're asking. This is just a simulation of immediate mode, since true immediate mode is not supported. It's not really very close to immediate mode either, but it's likely as close as you're going to get.

\$\endgroup\$
3
  • \$\begingroup\$ I was actually looking at light.js on GitHub when I saw your message. What does it mean when it says that it has no fixed function lighting? \$\endgroup\$
    – user25855
    Sep 24, 2013 at 13:26
  • \$\begingroup\$ As for why I am lookin into this, I built a simple 2d engine in LWJGL using immediate mode and I am looking to port it as easily as possible! \$\endgroup\$
    – user25855
    Sep 24, 2013 at 13:27
  • \$\begingroup\$ Fixed function lights are immediate mode lights (so you can only do shader level lights). I don't want to start a discussion here about it, you should ask your questions about it in chat if you want further information. If the questions warrant it, you might also ask new questions. \$\endgroup\$
    – House
    Sep 24, 2013 at 13:29

You must log in to answer this question.