What language should I learn to prepare for WebGL?

I am thinking about making a 3D game with WebGL (just for conceptual purposes, for now), but all I have never done anything in 3D and have only programmed in PHP for the most part. From what I understand, WebGL is Javascript, which I use heavily in all of my projects, but it is also my understanding that it is very different from regular JavaScript. If I wanted to get a head start to begin trying to figure out how to make 3D applications with WebGL, would there be a certain language that would help me to grasp how to do that better?

It’s a binding to OpenGL, so maybe you should start by learning OpenGL. For that, you’ll be using C/C++. You don’t generally write 3D graphics in anything else as performance is an issue.

Thanks for the response. I was sort of thinking it might be C or C++. Does it really matter which one? I bought a book on C++ at one point, but it was really basic stuff (nothing graphic-wise) and I never got very far because I started something else. I assume just straight up getting a book on OpenGL would be my best bet then?

If performance is an issue with other languages, would there be possible concerns with using WebGL as opposed to a plugin like Google’s O3D?

It depends on what style of programming you intend to use. If you want to use procedure oriented programming then you’d use C and if you want object oriented programming you’d use C++.

Basically C is a subset of C++ with C++ adding the necessary extra syntax to allow it to be used for OOP.

I would forget C/C++, it’s all the same and if you’re more familiar with javascript, webGL will be easier to pick up then all the openGL stuff and the completely new syntax of C/C++. Plus, since you can already use JS in the nightlies it’s a little unnecessary. However you will need to know your way around GLSL in order to use webGL. There is an excellent website learning webGL (just google).

I’ve always had issues with OOP. I had to take “Intro to Programming” my freshman year in college, which was a Java class and the 2nd half of the semester was all OOP. Since all I’ve ever done was procedural with PHP, it gave me problems trying to wrap my head around it.

Thanks, I’ll check out GLSL.