Results 1 to 2 of 2

Thread: OpenGL doubts

  1. #1
    Newbie Newbie
    Join Date
    Nov 2012
    Posts
    1

    OpenGL doubts

    Hi everyone, i'm posting here hoping to solve a problem.

    I'm trying, using an example from the redbook, to create
    the nurbs of a cylinder.
    I have all the parameters (knots, cntrlpoints, weights)
    but i'm not sure how to pass them in the code.
    I've a couple of doubts regarding the definitions given in the redbook:

    void gluNurbsSurface (GLUnurbsObj *nobj, GLint uknot_count,
    GLfloat *uknot, GLint vknot_count, GLfloat *vknot,
    GLint u_stride, GLint v_stride, GLfloat *ctlarray,
    GLint uorder, GLint vorder, GLenum type);

    - what are u_stride and v_stride? The book wasn't really clear.

    - are uorder and vorder the degrees of the curves?

    - do i have to use GL_MAP2_VERTEX_4 because i have {x,y,z,w} in my control points?

  2. #2
    V-man
    Guest
    It has been a long while since I have used GLU NURBS. I think u_stride is the stride in the u direction (u_order * vertex_size).
    If you have 4 control points and each is XYZ, then your u_stride is 4 * 3.
    If you are using XYZW, in your case it would be 4 * 4.

    I think u_order was degree+1 in the u direction. If you have 4 control points in the u direction, it would be u_order = 4.

Similar Threads

  1. doubts about opengl context
    By ale211734 in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 04-01-2015, 01:45 AM
  2. FBO doubts
    By kil4h in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-13-2010, 01:03 PM
  3. Doubts about VBO
    By dCelsius in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 03-05-2010, 08:32 PM
  4. Doubts : Is my graphics card ok for OpenGL??
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-16-2005, 08:00 AM
  5. some doubts...
    By Sam in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 10-09-2000, 09:19 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