CGREPORT
CGREPORT
CHAPTER 1
INTRODUCTION
1.1 OPENGL
OpenGL is the abbreviation for Open Graphics Library. It is a software interface
for graphics hardware. This interface consists of several hundred functions that allow you,
a graphics programmer, to specify the objects and operations needed to produce high-
quality color images of two-dimensional and three-dimensional objects. Many of these
functions are actually simple variations of each other, so in reality there are about 120
substantially different functions. The main purpose of OpenGL is to render two-
dimensional and three-dimensional objects into the frame buffer. These objects are
defined as sequences of vertices (that define geometric objects) or pixels (that define
images).OpenGL performs several processes on this data to convert it to pixels to form
the final desired image in the frame buffer.
1.2 HISTORY
As a result, SGI released the OpenGL standard In the 1980s, developing software
that could function with a wide range of graphics hardware was a real challenge. Software
developers wrote custom interfaces and drivers for each piece of hardware. This was
expensive and resulted in much duplication of effort. By the early 1990s, Silicon Graphics
(SGI) was a leader in 3D graphics for workstations. Their IRIS GL API was considered
the state of the art and became the de facto industry standard, overshadowing the open
standards-based PHIGS. This was because IRIS GL was considered easier to use, and
because it supported immediate mode rendering. By contrast, PHIGS was considered
difficult to use and outdated in terms of functionality. SGI's competitors (including Sun
Microsystems, Hewlett-Packard and IBM) were also able to bring to market 3D hardware,
supported by extensions made to the PHIGS standard. This in turn caused SGI market
share to weaken as more 3D graphics hardware suppliers entered the market. In an effort
to influence the market, SGI decided to turn the Iris GL API into an open standard. SGI
considered that the Iris GL API itself wasn't suitable for opening due to licensing and
patent issues. Also, the Iris GL had API functions that were not relevant to 3D graphics.
For example, it included a windowing, keyboard and mouse API, in part because it was
developed before the X Window System and Sun's NEWS systems were developed
Stable
OpenGL implementations have been available for more than seven years on a
wide variety of platforms. Additions to the specification are well controlled, and proposed
updates are announced in time for developers to adopt changes. Backward compatibility
requirements ensure that existing applications do not become obsolete.
Evolving
Scalable
Easy to use
the application developer from having to design for specific hardware features.
Display list
Rather than having all commands proceed immediately through the pipeline, you
can choose to accumulate some of them in a display list for processing later.
Evaluator
OpenGL processes geometric primitives - points, line segments, and polygons all
of which are described by vertices. Vertices are transformed, and primitives are clipped to
the viewport in preparation for rasterization.
Rasterization
Per-fragment operations
These are the final operations performed on the data before it is stored as pixels in
the frame buffer Per-fragment operations include conditional updates to the frame buffer
based on incoming and previously stored z values.
Pixel operation
Input data can be in the form of pixels rather than vertices. Such data which might
describe an image for texture mapping skips the first stage of processing and instead
processed as pixels in the pixel operation stage.
Texture memory
The result of pixel operation stage is either stored as texture memory for use in
rasterization stage or rasterized and resulting fragment merged into the frame buffer just
as they were generated from the geometric data.
GL – Graphics Library
Functions in the main GL (or OpenGL in Windows) library have names that begin
with the letters gl and are stored in a library usually referred to as GL (or OpenGL in
Windows).
This library uses only GL functions but contain code for creating common objects
and simplifying viewing. All functions in GLU can be created from the core GL library
but application programmers prefer not to write the code repeatedly. The GLU library is
available in all OpenGL implementations; functions in the GLU library begins with the
letters glut.
To interface with the window system and to get input from external devices into
our programs we need at least one more library. For the X window System, this library is
called GLX, for Windows, it is wgl, and for the Macintosh, it is agl. Rather than using a
different library for each system, we use a readily available library called the OpenGL
Utility Toolkit (GLUT).
Primitive function
The primitive functions define the low-level objects or atomic entities that our
system can display.
Attribute functions
Viewing functions
The viewing functions allow us to specify various views, although APIs differ in
7 Dept of CSE , Yenepoya Institute Of Technology
CLASSIC CLOCK USING OPENGL
Transformation functions
One of the characteristics of a good API is that it provides the user with a set of
transformations functions such as rotation, translation and scaling
Input functions
For interactive applications, an API must provide a set of input functions, to allow
users to deal with the diverse forms of input that characterize modern graphics systems.
We need functions to deal with devices such as keyboards, mice and data tablets.
Control functions
Query functions
CHAPTER 2
REQUIREMENT ANALYSIS
PROJECT REQUIREMENT:
It contains 3 needles one for hour, one for minute, and one for seconds.
Large needle represents minute, small needle represent hour and thin needle represents
seconds.
The package which we have designed is a one which requires many graphics packages.
Most of the functions which are needed to design the package are found in Turbo C compiler
with a graphics package .The package requires simple in-built functions found in <GL/glut.h>
library. This header file, in addition to the usual header files is needed for the working of the
project. For running the program, any basic PC running compatible version of Microsoft Visual
Studio is sufficient.
This program should use memory as less as possible, dynamic memory allocation is
preferable to accomplish this task. There is no error message produced in this program.
Requirement analysis phase deals with user requirements, which is to fulfill the user’s
requirement that is known during the problem definition phase. To carry out a requirement
analysis, analysts must develop an understanding of the problem domain. The choice of
appropriate software for the smooth implementation of the project is accomplished by this.
4. Graphics – 2GB
CHAPTER 3
SYSTEM DESIGN
3.1 INITIALIZATION
Initialize to interact with the Windows.
Initialize the display mode that is double buffer and RGB color system.
Initialize window position and window size.
Initialize and create the window to display the output.
3.2 DESIGN
print_screen
Input parameters:
None
Function description:
Draw_clock
Input parameters:
None
Function description:
TimeEvent
Input parameter:
Function description:
CHAPTER 4
IMPLEMENTATION
4.1 OVERVIEW
This project is a demonstration of “Bus Stop Simulation”. We have taken
the help of built-in functions present in the header file. To provide the
functionality to our project we have written sub-functions. These functions
provide us with an efficient way to design the project. In this chapter, we are
describing the functionality of our project using these functions.
4.2 STRUCTURE
CHAPTER 5
TESING
Automation testing, which is also known as Test Automation, is when the tester
writes scripts and uses another software to test the product. This process involves automation of
a manual process. Automation Testing is used to re-run the test scenarios
that were performed manually, quickly, and repeatedly.
This type of testing is performed by developers before the setup is handed over
testing team to formally execute the test cases. Unit testing is performed by the respective
developers on the individual units of source code assigned areas. The developers use test
data that is different from the test data of the quality assurance team. The goal of unit testing
is to isolate each part of the program and show that individual parts are correct in terms of
requirements and functionality.
System testing tests the system as a whole. Once all the components are integrated, the
application as a whole is tested rigorously to see that it meets the specified Quality
Standards. This type of testing is performed by a specialized testing team.
Whenever a change in a software application is made, it is quite possible that other areas
within the application have been affected by this change. Regression testing is performed
to verify that a fixed bug hasn't resulted in another functionality or business rule violation.
The intent of regression testing is to ensure that a change, such as a bug fix should not result
in another fault being uncovered in the application.
This is arguably the most important type of testing, as it is conducted by the Quality
Assurance Team who will gauge whether the application meets the intended specifications
and satisfies the client’s requirement. The QA team will have a set of pre-written scenarios
and test cases that will be used to test the application. By performing acceptance tests on
an application, the testing team will deduce how the application will perform in production.
There are also legal and contractual requirements for acceptance of the system.
This test is the first stage of testing and will be performed amongst the teams
(developer and QA teams). Unit testing, integration testing and system testing when
combined together is known as alpha testing. During this phase, the following aspects will
be tested in the application:
Spelling Mistakes
Broken Links
Cloudy Directions
The Application will be tested on machines with the lowest specification to test
loading times and any latency problems.
This test is performed after alpha testing has been successfully performed. In beta
testing, a sample of the intended audience tests the application. Beta testing is also known
as pre-release testing. Beta test versions of software are ideally distributed to a wide
audience on the Web, partly to give the program a "real-world" test and partly to provide a
preview of the next release. In this phase, the audience will be testing the following:
Users will install, run the application and send their feedback to the project team
Typographical errors, confusing application flow, and even crashes.
Getting the feedback, the project team can fix the problems before releasing the
software to the actual users.
5.3.4 NON-FUNCTIONAL TESTING
This section is based upon testing an application from its non-functional attributes. Non
functional testing involves testing a software from the requirements which are
nonfunctional in nature but important such as performance, security, user interface, etc.
Some of the important and commonly used non-functional
Load Testing
Performance Testing
Stress Testing
SNAPSHOT
CONCLUSION
SUMMARY:
This project shows the graphical representation of a working analogue clock.
The objective of this program is to implement simple and basic functions of OpenGL.
Computer graphics plays a major role in today’s world where visualization takes the
upper hand as compared to textual interaction. This is largely true as we can see user
interface becoming more and more attractive all thanks to major leaps in the fields of
computer graphics. The project is implemented using graphics OpenGL package
provided by C.
SCOPE OF IMPROVEMENT :
Though the package that is designed here does not include complex OpenGL
package, we intend to improve this by including extra features like lighting effects,
Changing the background color adding alarams. We do this with an aim to attract more
people to use our package.
BIBLIOGRAPHY
The books and the other sources we referred while doing this project are as
follows:
REFERENCES:
ONLINE REFERENCES:
www.codecolony.de/opengl
www.3dcodingtutorial.com
www.openGL.org
www.nehe.com
APPENDIX