Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ** Help!: Drawing objects with OpenGL(similar to the "Paint" program under windows)

** Help!: Drawing objects with OpenGL(similar to the "Paint" program under windows)

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicshelpquestiongame-dev
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Lai
    wrote on last edited by
    #1

    Hi everyone, I'm new to programming in C++ and have the following problem: I would like to Drawing lines (and other objects, ie squares, circles, etc) with OpenGL(like the Paint program in windows)with a MFC application. I've created a MFC application that is linked to OpenGL. How do I created functions like the ones we see in the "Paint" program found in windows accesories? For example, if I click on the menu which as a "draw lines" function and after clicking on that, I would like to use the mouse to draw lines, (line starts when the mouse is clicked and dragged. Then the line stops when mouse is released). I'm having great difficulty doing this and if anyone can help it would be greatly appreciated. Thank you in advance! Steve

    C M B 3 Replies Last reply
    0
    • S Steve Lai

      Hi everyone, I'm new to programming in C++ and have the following problem: I would like to Drawing lines (and other objects, ie squares, circles, etc) with OpenGL(like the Paint program in windows)with a MFC application. I've created a MFC application that is linked to OpenGL. How do I created functions like the ones we see in the "Paint" program found in windows accesories? For example, if I click on the menu which as a "draw lines" function and after clicking on that, I would like to use the mouse to draw lines, (line starts when the mouse is clicked and dragged. Then the line stops when mouse is released). I'm having great difficulty doing this and if anyone can help it would be greatly appreciated. Thank you in advance! Steve

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why do you want to use OpenGL for a 2D paint system ? You should go to nehe.gamedev.org ( or .com, I can't remember ) for OpenGL tutorials that will probably help. You should also buy the Red and Blue books if you're remotely serious about it. Christian As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet. Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.

      1 Reply Last reply
      0
      • S Steve Lai

        Hi everyone, I'm new to programming in C++ and have the following problem: I would like to Drawing lines (and other objects, ie squares, circles, etc) with OpenGL(like the Paint program in windows)with a MFC application. I've created a MFC application that is linked to OpenGL. How do I created functions like the ones we see in the "Paint" program found in windows accesories? For example, if I click on the menu which as a "draw lines" function and after clicking on that, I would like to use the mouse to draw lines, (line starts when the mouse is clicked and dragged. Then the line stops when mouse is released). I'm having great difficulty doing this and if anyone can help it would be greatly appreciated. Thank you in advance! Steve

        M Offline
        M Offline
        Mr Freeze
        wrote on last edited by
        #3

        Have a look at http://www.opengl.org/discussion\_boards/cgi\_directory/Ultimate.cgi?action=intro&BypassCookie=true which is an excellent forum about OpenGL programming. Have also a look at http://nehe.gamedev.net/ where you can find tons of very well explained tutorials :)

        1 Reply Last reply
        0
        • S Steve Lai

          Hi everyone, I'm new to programming in C++ and have the following problem: I would like to Drawing lines (and other objects, ie squares, circles, etc) with OpenGL(like the Paint program in windows)with a MFC application. I've created a MFC application that is linked to OpenGL. How do I created functions like the ones we see in the "Paint" program found in windows accesories? For example, if I click on the menu which as a "draw lines" function and after clicking on that, I would like to use the mouse to draw lines, (line starts when the mouse is clicked and dragged. Then the line stops when mouse is released). I'm having great difficulty doing this and if anyone can help it would be greatly appreciated. Thank you in advance! Steve

          B Offline
          B Offline
          Bernhard
          wrote on last edited by
          #4

          For me it looks like you just want to draw simple objects.. (2d - graphics..) and for that you don't need opengl.. the good 'ole gdi would be enough for that.. there are some examples for drawing in gdi on this page.. another way would be to follow the scibble example of the msdn.. but if i did understand you wrong, sorry.. bernhard stolen sig#15: "The content of this post is not necessarily the opinion of my yadda yadda yadda."

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups