locked
OpenGL NURBS surface RRS feed

  • Question

  • Hi guys I am making Nurb Surface but i am not getting any output...
     
        GLfloat ctlpoints[3][2][4] ;
        GLUnurbsObj *theNurb = gluNewNurbsRenderer() ;
        int u, v ;    
        ctlpoints[0][0][0] = -50.000 ;
        ctlpoints[0][0][1] = -100.000 ;
        ctlpoints[0][0][2] = -4.5474735088646402e-013 ;
        ctlpoints[0][0][3] = 1.0000000000000000 ;
      
        ctlpoints[1][0][0] = -46.423834544262945 ;
        ctlpoints[1][0][1] = -1.1937117960769661e-012 ;
        ctlpoints[1][0][2] = 37.139067635410356 ;
        ctlpoints[1][0][3] = 0.92847669088525897 ;

        ctlpoints[2][0][0] = -50.000000000000000 ;
        ctlpoints[2][0][1] = 99.999999999998906 ;
        ctlpoints[2][0][2] = 4.1211478674085801e-013 ;
        ctlpoints[2][0][3] = 1.0000000000000000 ;
     
        ctlpoints[0][1][0] = 50.000000000000000 ;
        ctlpoints[0][1][1] = -100.00000000000099 ;
        ctlpoints[0][1][2] = -4.5474735088646402e-013 ; 
        ctlpoints[0][1][3] = 1.0000000000000000 ;
     
        ctlpoints[1][1][0] = 46.423834544262945 ; 
        ctlpoints[1][1][1] = -1.1937117960769661e-012 ;
        ctlpoints[1][1][2] = 37.139067635410356 ;
        ctlpoints[1][1][3] = 0.92847669088525897 ;

        ctlpoints[2][1][0] = 50.000000000000000 ; 
        ctlpoints[2][1][1] = 99.999999999998906 ;
        ctlpoints[2][1][2] = 4.1211478674085801e-013 ;
        ctlpoints[2][1][3] = 1.0000000000000000 ;

        GLfloat uknots[4] = {0.0, 0.0, 1.0, 1.0}; 
        GLfloat vknots[2]  = { 0.0,1.0} ;
        gluBeginSurface( theNurb ) ;          
        gluNurbsSurface( theNurb,4,uknots,2,vknots,3,3,&ctlpoints[0][0][0],1,1,GL_MAP2_VERTEX_4 ) ;
        gluEndSurface(theNurb) ;

    • Moved by lucy-liu Thursday, February 24, 2011 8:07 AM it is not related to vc (From:Visual C++ General)
    Friday, February 18, 2011 6:17 AM

All replies

  • Try http://www.opengl.org/discussion_boards/

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, February 18, 2011 10:30 PM
  • Hi rahul,

    In Visual C++ General Forum, we discuss general questions about Visual C++ , including the development environment, libraries, setup, debugger, samples, and documentation.

    For your future concerns, please post it to OpenGL forum suggested by Sheng.

    Thank you for your understanding.

     

    Best regards,

    Lucy


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 21, 2011 4:23 AM