drawing of line in openGL with mouse functions.

  • raju rambha
    Likes 0

    Problem Description

    Hi, firstly very much impressed with your work which is very heipful to begginers and thanks a lot.heart

    I want to draw a real time 2D image which is done let it be polygon. But now I want to draw a line connecting the two sides of polygon where the connecting line end points will be given by mouse button. Difficulty is that when I click a mouse button (press), line has to start and it should end when the button releases as same as selecting a line option in power point. your tutorial on cursor functions is almost near but I could not make use of it beceause I am a begginer. This may be easy task for you. Please help me. Thank you sir.

  • Sonar Systems admin
    Likes 0

    Do you want the line to only be drawn after the second click or to be dragged in real time after the first click?


    This reply has been verified.
  • raju rambha
    Likes 0

    actually I am plotting data of 2D room. now I have to connect the wall with mouse. so that when I first clicks the mouse button line should start at that point and keeps on drawing the path of cursor. when I release the mouse button the line should be fixed. where pressing and relesing button should be end points. and also I want to give a name to the line or to display the distance. How to do that?

    As of now I able to draw the line but how to display some text near line on that glut window?

    thank you

  • Sonar Systems admin
    Likes 0

Login to reply