Results 1 to 3 of 3

Thread: Showing axis in WebGL

  1. #1
    Member Contributor
    Join Date
    Sep 2010
    Posts
    78

    Showing axis in WebGL

    Hi,

    I want to show the input box and allow users to input the rotation value and translation value to update the model. However, I think users does not know where is X, Y, Z axis. Is it possible to show the X, Y, Z axis in WebGL and how to show them correctly? Is there any existing functions?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,672

    Re: Showing axis in WebGL

    There is no "glShowAxis" function. And how could there be? OpenGL doesn't have a concept of "model". And WebGL, which is shader-based, has no concept of "space" or "axes" or anything of the like.

    If you want to draw axes, then you must draw axes. And if you want these axes to align with a particular model's orientation, then you must do the math to align them with that model's orientation (which usually consists of using that model's orientation when rendering the axes).

  3. #3
    Member Contributor
    Join Date
    Sep 2010
    Posts
    78

    Re: Showing axis in WebGL

    Oh, do you mean I need to create some buffers to store the axis vertex, color and draw them using line, create some textures to show the x, y, z axis labels?

Similar Threads

  1. Replies: 0
    Last Post: 04-30-2018, 09:49 AM
  2. How to rotate objects around global axis not local axis
    By silvermeteor in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-04-2017, 11:10 AM
  3. 3d object showing through another
    By DarkOne in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-13-2012, 04:21 PM
  4. Axis and Angle to Axis and prepndicular Vector
    By Maku in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-29-2001, 08:44 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
  •  
Proudly hosted by Digital Ocean