Find Jobs
Hire Freelancers

470263 Introduction to OpenGL

N/A

Completed
Posted over 13 years ago

N/A

Paid on delivery
I have attached a word document explaining all of the details. Also I am using Microsoft Visual 2005 This is what needs to be done, Modify the OpenGL application as follows: • Put your name in the title bar of the application with the following lines of code after the ShowWindow call in WinMain (in [login to view URL]) : char str[32]; sprintf(str, "%s", "your name goes here"); SetWindowText(HDialog, str); Be sure to include the header file for the sprintf function at the top of [login to view URL], if not included: #include <stdio.h> • Change the OpenGL window's background color to light blue or grey by changing the call to the glClearColor function in CGfxOpenGL.cpp. i.e. change the following line of code near the beginning of bool CGfxOpenGL::Init() : glClearColor(0.0, 0.5, 0.0, 0.0); //green background • Change the color of the sphere to red using glColor3f(1, 0, 0); just before the sphere is drawn. It is done before the sphere is made because the glColor3f command presets the color state, before drawing. Note: The sphere of radius 1 centered at the origin (0,0,0) is then drawn with the function gluSphere(quadric, 1.0f, 20, 20). It has 20 slices (similar to lines of longitude) and 20 stacks (similar to lines of latitude) when drawn. • Add a second, different colored sphere to the scene. Place this second sphere in a different location by calling glTranslatef(15, 0, 0); before drawing the sphere with gluSphere. It is done before the sphere is made because the glTranslatef command moves the drawing state, before drawing. Thus, this last part has a total of three commands: change the color using glColor3f, then translate the scene using glTranslatef, and then draw the new sphere using gluSphere. Build and run the modified project. The output should look something like this:
Project ID: 2216164

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I have it done already :) very easy. Please contact me!
$23 USD in 0 day
5.0 (11 reviews)
2.9
2.9

About the client

Flag of UNITED STATES
Chicago, United States
4.7
26
Member since Jan 30, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.