PDA

View Full Version : simple paint



stratus
02-20-2002, 04:50 AM
Could you point me to a simple paint program coded with opengl. I would like to get some ideas. Thanks!

nexusone
02-20-2002, 05:16 AM
When you say paint program, do you mean like Paint shop pro, or more of a 3D drawing program like TrueSpace?

OpenGL is designed to create 3D scenes, not designed for a bitmap application. But it could be done.

You can draw like programs that using vector based tools with lines and 2D trangles and polygons for squares and multi sided objects.



Originally posted by stratus:
Could you point me to a simple paint program coded with opengl. I would like to get some ideas. Thanks!

stratus
02-20-2002, 05:37 AM
I want code for a simple, homespun version of something like MSPaint. But, much simpler. If I have a viewport for controls like line, rectangle, and circle, and another viewport to draw on, that would be excellent. There's got to be some code around for that somewhere. I am not experienced enough to begin it on my own. Thanks for your help.


Originally posted by nexusone:
When you say paint program, do you mean like Paint shop pro, or more of a 3D drawing program like TrueSpace?

OpenGL is designed to create 3D scenes, not designed for a bitmap application. But it could be done.

You can draw like programs that using vector based tools with lines and 2D trangles and polygons for squares and multi sided objects.

nexusone
02-20-2002, 07:49 AM
If you have the MSVC++, they have a good example of a simple bitmap drawing program using direct draw on the CD.
As stated in my last message OpenGL is not realy suited for a Bitmap drawing appilcations. It is more suited for CAD/CAM and vector based drawing.

You do know the diffrence between bitmap and vector based drawing? If not will be happy to explain it to you.


If you are set on a Opengl based drawing program.
You will find some good examples here: http://nehe.gamedev.net


Originally posted by stratus:
I want code for a simple, homespun version of something like MSPaint. But, much simpler. If I have a viewport for controls like line, rectangle, and circle, and another viewport to draw on, that would be excellent. There's got to be some code around for that somewhere. I am not experienced enough to begin it on my own. Thanks for your help.

02-20-2002, 09:53 AM
Yeah! I've allways wondered what the differens between bitmap and vector graphics was.

Laz
02-20-2002, 10:50 AM
Originally posted by Person:
Yeah! I've allways wondered what the differens between bitmap and vector graphics was.

Bitmaps are stored by pixel positions. when you resize a bitmap, you notice they get really pixelly if made bigger, because it just re-calculates the pixel position.

Vector graphics are figured mathematically. When you resize it, it re-does the math and puts the graphic on the screen. It doesn't use pixels, i guess. Thats the best way I can explain it. I'm sure someone has a better more acurate explanation.