Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to do this painting by using the glut from opengl, but I can not figure out the solution I have tried a lot but I cant
Design an application that allows user to draw an any object as follows:
Based on pressing ‘P’ or ‘p’ object rendered in a point mode.
Based on pressing ‘L’ or ‘l’ object rendered in a line mode.
Based on pressing ‘G’ or ‘g’ object rendered in a polygon mode.
use the arrow keys to translate the object in a relative direction (up, right, down, and left).
use the mouse button to activate a menu the include the following:
- Transformation
scaling
rotation
- Object color
sample colors
- Background color
sample color
- Quit (to end execution of the program)

What I have tried:

http://textuploader.com/5boot

http://textuploader.com/5boo0

http://textuploader.com/5book
Posted
Updated 13-May-16 15:18pm

1 solution

I would start looking at things like http://www.mitchr.me/SS/exampleCode/glut.html[^] - he has some really good examples, ditto this example http://www.cs.ucsb.edu/~nurmi/cs60/project4/basic.cpp[^] & An introduction on OpenGL with 2D Graphics - OpenGL Tutorial[^]

Since you havnt posted code, no-one can really say how far off the mark you are with your own efforts - it also makes people suspicious that you havnt actually done anything, unfortunately - and we dont do homework/assignments for people - dont be afraid of posting your own code here, no matter how bad you think it is - sure there are people who love to criticise, but most people are here to help - some of the code I used to write way back when I'd be so embarrassed to post myself :-)

My advice is, start with 'hello word', add and extend functionality to it, and post back specific questions with code when you need detailed help.

ps .. if you do a search here on CP for c++ glut you also find some articles :-

GLUT Window Template[^]
The OpenGL and GLUT: A Powerful Graphics Library and Utility Kit[^]
 
Share this answer
 
v2
Comments
Member 12522496 14-May-16 15:08pm    
Mr Gareth J Lancaster
Who said I did not add any codes I've already posted three codes

it is at the end of the question

http://textuploader.com/5boot

http://textuploader.com/5boo0

http://textuploader.com/5book
Garth J Lancaster 14-May-16 21:41pm    
but you didnt post your code here on CP and I doubt anyone here is going to go to a site they dont know to look at your code there (call us suspicious) - there's plenty of space in the question box and 'what have I tried' to post the smallest section(s) of code that represent the problems/issues

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900