Results 1 to 4 of 4

Thread: How to design drawing tool using opengl??

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    How to design drawing tool using opengl??

    There is a sample in MSDN of Visual C++ which named "Drawcli",I want to use opengl make the same resule,it is 2D.I think when I design a drawing tool such as line,rectangle,or polygon,I must know the cursor's position of mouse,I'm searching for a long time but without any result,please help me!!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: How to design drawing tool using opengl??

    You can use glut, simple mouse routines that you can use to get mouse position.

    I wrote a simple drawing program using glut, if you drop me an e-mail I can e-mail it to you.

    Originally posted by applehaha:
    There is a sample in MSDN of Visual C++ which named "Drawcli",I want to use opengl make the same resule,it is 2D.I think when I design a drawing tool such as line,rectangle,or polygon,I must know the cursor's position of mouse,I'm searching for a long time but without any result,please help me!!

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    Re: How to design drawing tool using opengl??

    My E-mail is dangchunqiu@163.com.

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    11

    Re: How to design drawing tool using opengl??

    Originally posted by nexusone:
    You can use glut, simple mouse routines that you can use to get mouse position.

    I wrote a simple drawing program using glut, if you drop me an e-mail I can e-mail it to you.

    Your program is very useful, but after compiling in my program, it warns that ¡°glutMouseFunc' : cannot convert parameter 1 from 'void (int,int,int,int)' to 'void (__cdecl *)(int,int,int,int)'¡±.In my program, I use functions not only from the ¡°glut¡± library, but also use ¡°gl¡± functions for initializing, using ¡°glutMouseFunc¡± and ¡°glutMotionFunc¡± only for the drawing tool. Is there something wrong? That is to say, whether I can use other functions for initializing without glut function? And I have another two questions, the first, whether ¡°glut¡± based on the message-response mechanism? I have read a text which says ¡°GLUT dose not support menu bar type function¡±, so I fear I can¡¯t use it in my program, because what I want to do is a drawing tool, I need a menu bar interface, which can be used applying to the user at will. The second , the common opengl programs what I saw are based on SDI in Visual C++, but once use ¡°glut¡± function, it seems that there must has a ¡°main¡± function and without the concept of ¡°class¡± , can you explain it to me? Thank you very much!!

Similar Threads

  1. Debugging tool for opengl
    By debinair in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-17-2013, 05:08 AM
  2. any tool for opengl es
    By freesui1984 in forum OpenGL ES
    Replies: 2
    Last Post: 09-18-2008, 06:45 PM
  3. Tool for creating OpenGL GUI?
    By Zico1978 in forum OpenGL: General
    Replies: 0
    Last Post: 09-19-2005, 09:29 AM
  4. Replies: 0
    Last Post: 11-03-2004, 09:54 AM
  5. design/implementation of an OpenGL gui?
    By wazoo in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-26-2004, 09: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
  •  
Proudly hosted by Digital Ocean