Results 1 to 3 of 3

Thread: Help make a cylinder WebGL

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    1

    Help make a cylinder WebGL

    hello I am French student currently carrying out our project of molecule modeling in 3D WebGL we need a method to display a cylinder.
    Thank you enlighten us on this issue.

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    207

    Re: Help make a cylinder WebGL

    WebGL doesn't have functions for generating cylinders - or any other specific geometric shape for that matter. You have to generate the vertices yourself...either in a modelling program (blender or 3DStudio or whatever) - or you generate the vertices using math. Probably, you'll want to do it with math.

    I suggest you start with one of the simple WebGL demos:

    https://cvs.khronos.org/svn/repos/re...inningBox.html

    ...if you look at the code carefully, you'll see that it calls a JavaScript function called "makeBox" to make the cube. That code is in a library here:

    https://cvs.khronos.org/svn/repos/re...ources/J3DI.js

    There is also a "makeSphere" function. With a little creativity, I think you can figure out how to make a cylinder.

  3. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    22

    Re: Help make a cylinder WebGL


Similar Threads

  1. how to make glTexImage2D faster?
    By freesui1984 in forum OpenGL ES general technical discussions
    Replies: 3
    Last Post: 09-15-2009, 08:39 AM
  2. Hello, how to make game multiplayerable?
    By lavendersg in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 06-03-2005, 05:56 AM

Posting Permissions

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