SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Non-Member
    Join Date
    May 2006
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 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?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    Non-Member
    Join Date
    May 2006
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    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?

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jls33fsls View Post
    I was sort of thinking it might be C or C++. Does it really matter which one?
    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.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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).

  6. #6
    Non-Member
    Join Date
    May 2006
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •