Wednesday, July 24, 2013

OpenGL(R) 1.1 Release for Windows(R) 95

OpenGL(R) 1.1 Release for Windows(R) 95
---------------------------------------

1.  OpenGL Functionality Notes
2.  Redistributable components for Windows 95


1.  Functionality Notes
-----------------------

The OpenGL API is supported on a variety of graphics hardware; the
software in this release provides support for graphics hardware including
basic emulation on any video adapter that is supported with the operating
system, and accelerated graphics hardware that is supported by an OpenGL
mini-client driver (MCD) or an OpenGL installable client driver (ICD).
This release of OpenGL will run on all supported hardware under
Windows 95, including VGA and Super VGA 16 color mode displays.

The OpenGL runtime libraries for Windows 95 are not bundled with the
Windows 95 operating system currently, but application developers may freely
redistribute from this SDK along with their applications to other Windows 95
systems.  In addition, the runtime libraries have been bundled with the
Windows 95 operating system in the OEM system release 2, so OEM Windows 95
systems shipping later in 1996 will begin appearing with the OpenGL runtime
libraries included.

To achieve good shaded rendering with OpenGL applications, you should use a
color graphics mode with 256 or more colors.  Reasonable shading is
possible for most OpenGL applications with 256 colors.

The Windows NT 4.0 and Windows 95 releases of OpenGL includes new functionality
and performance enhancements.  These include:

1) A complete implementation of OpenGL 1.1.  OpenGL 1.1 contains several
functions, including vertex array, polygon offset, logic ops, and several new
functions for handling textures.  The vertex array and texture calls are
particularly significant, as they may enable order of magnitude performance
improvements in some applications.

2) Overlay planes extensions.  These Microsoft OpenGL extensions permit
applications to manage and render into overlay planes where supported
in the graphics hardware.  This permits applications to bring up dialog boxes
and other UI features without overwriting 3D renderings.

3) Extended metafile support.  Applications may encapsulate OpenGL calls and
data in GDI extended metafiles.  This, together with NT 4.0 print spooler
enhancements for remote metafile rendering, makes it possible to print OpenGL
graphics at high resolution on the print server.  This feature is limited to
the Windows NT release.

4) Microsoft extensions.  The Microsoft OpenGL implementation also supports
these performance extensions: GL_WIN_swap_hint, GL_EXT_bgra, and
GL_EXT_paletted_texture.  They improve the performance of some applications
significantly.

5) Performance.  The software renderer has been tuned for this release.
Performance tuning has been carried out for the front end of the OpenGL
pipeline as well as for rendering particular primitives, especially
anti-aliased lines and texturing.  Software rendering is generally 2-4x
faster.

6) OpenGL hardware acceleration.  This release of OpenGL supports a simpler
mini-client driver (MCD) model to accelerate 3D graphics operations.  In
particular, Windows NT 4.0 includes a Matrox Millennium mini-client driver
that accelerates OpenGL functions.  A corresponding driver for Windows 95
is expected to be available later this year.


2. Redistributable components for Windows 95
--------------------------------------------

The OpenGL redistributable components for Windows 95 are in the DLL
directory.  It contains the runtime dynamic-link libraries for OpenGL and
GLU.  We recommend either of two methods for redistributing these libraries
with your application on Windows 95 (for Windows NT, the libraries are
bundled with the operating system and should not be redistributed):

  1) In your setup program, install these libraries in the
     application directory along with your application.  This gives you
     greater control over the version of OpenGL that your application
     will link to (an issue if other applications install other versions
     of the library), but also gives you greater responsibility for
     updating your customers' libraries if and when that is required
     to address defects, add functionality, improve performance, etc.
  2) In your setup program, install these libraries in the windows
     system directory.  If you do this, you should use the Win32 setup
     API call VerInstallFile to help prevent installing an older version
     of the libraries over another application's installation of a more
     recent version of the libraries.

OpenGL is a registered trademark of Silicon Graphics, Inc.
Windows is a registered trademark of Microsoft Corporation.

Tuesday, July 23, 2013

OpenGL Configuring

OpenGL Configuring

Windows:
versions:
7 Enterprise
Vista x64 Enterprise Edition SP2 (Build 6002)
Vista Enterprise Edition SP2 (Build 6002)
XP Professional Edition SP3 5.1 (Build 2600)

Visual Studio 2012 version 11.0.51106.01 Update 1
.NET Framework version 4.5.50709

Visual Studio 2010 version 10.0.420219.1 SP1Rel
.NET Framework version 4.0.30319 SP1Rel

Visual Studio 2008 version 9.0.21022.8.RTM
.NET Framework version 3.5 SP1

    Installation/verification:

    OpenGL comes with the OS and Visual Studio 2012/2010/2008 installations, to verify:

        runtime libraries:
        C:\Windows\System32\{opengl,glu}32.dll
        on 64-bit Windows:
        C:\Windows\SysWOW64\{opengl,glu}32.dll

        header files:
        C:\Program Files\Microsoft SDKs\Windows\v7.1A\Include\gl\{GL,GLU}.h
        ["Program Files (x86)" for 64-bit Windows; VS2010: v7.0A, VS2008: v6.0A]

        linker library:
        C:\Program Files\Microsoft SDKs\Windows\v7.1A\Lib\OpenGL32.Lib
        ["Program Files (x86)" for 64-bit Windows; VS2010: v7.0A, VS2008: v6.0A]

    If GLUT is not installed, you can install it by downloading the glut zip file (v. 3.7.6) (web site) and copying its files as follows:

        runtime library:
        C:\Program Files\Microsoft Visual Studio *\VC\bin\glut32.dll
        ["Program Files (x86)" for 64-bit Windows; The '*' matches your version of VS: 11.0 for VS2012, 10.0 for VS2010, 9.0 for VS2008]

        header file:
        C:\Program Files\Microsoft Visual Studio *\VC\include\GL\glut.h
        ["Program Files (x86)" for 64-bit Windows; You have to create the "GL" directory]

        linker library:
        C:\Program Files\Microsoft Visual Studio *\VC\lib\glut32.lib
        ["Program Files (x86)" for 64-bit Windows]

    If you don't have a VC folder, try instead:

        runtime library:
        C:\Windows\system\glut32.dll

        header file:
        C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\GL\glut.h
        ["Program Files (x86)" for 64-bit Windows; VS2008: v6.0A]

        linker library:
        C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\glut32.lib
        ["Program Files (x86)" for 64-bit Windows; VS2008: v6.0A]

    Or you may choose to install freeglut for Windows.

    Later in your OpenGL source files, include the following line:

    #include <GL/glut.h>

    You don't need to include gl.h and glu.h, as they are already included in glut.h.
    For an example, see the provided sample source code.

    Command line make: see the instructions for Cygwin below.

    Visual Studio 2012/2010/2008 project (graphical step-by-step, all the screen shots are from VS2008, but are applicable to the newer versions):

        Create a new project:

            Select "File→New→Project" (Fig. 26)
            Choose a template for your new project:
            "Visual C++→Win32→Win32 Console Application", give the project a name, e.g., "sampleapp" and click "OK" (Fig. 27)
            On the "Welcome to the Win32 Application Wizard" page, click "Next >" (Fig. 28)
            On the "Application Setting" dialog box, under "Additional options" tick "Empty project", then click "Finish" (Fig. 29)

        Add source files:

        Right click on your project, for example, "sampleapp", on the third (second) line of the "Solution Explorer" pane on the right (left) to "Add→Existing Item" (Fig. 30),
        select your source and header file(s), for example, the provided sample.c, and click "Add"

        Add libraries:

            Right click on "sampleapp" again and select "Properties" to tell the linker which libraries need to be added (Fig. 31)
            On the "Property Pages", under "Configuration:" tell VS to add the additional libraries to "All Configurations" (Fig. 32)
            Select "Configuration Properties→Linker→Input" on the left pane, and enter:

            opengl32.lib;glu32.lib;glut32.lib;
            [VS2008: with spaces in place of the semicolons]

            as "Additional Dependencies" on the top of the right pane, hit RETURN and then click "Apply" (Fig. 33).

        Optional:

        To prevent your program from opening a console window, while still on the "Property Pages",
        select "Configuration Properties→Linker→Command Line" on the left pane, and enter:

        /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup

        as "Additional options" at the bottom of the right pane, then click "Apply" (Fig. 34)

        You may not want to disable the console window if you print out messages to the console (see next step).

        Close the "Property Pages" pane by clicking "Ok", then click on the play button on the second menu bar (   )
        to build and run the program. If you print out messages to the console, run the program using Ctl-F5 instead,
        to keep the cmd window from exiting after the program exits.

        To distribute your program, include glut32.dll with your distribution as it's most likely not installed on most Windows systems.

Saturday, July 20, 2013

OpenGL

What is OpenGL

As a software interface for graphics hardware OpenGL renders multidimensional objects into a frame-buffer. The Microsoft implementation of OpenGL for the Windows operating system is industry standard software for graphics with which programmers are create high-quality still and three-dimensional animation.

Applicable

OpenGL is built for compatibility across hardware and operating systems. This architecture makes it easy to port OpenGL programs from one system to another. While each operating system has unique requirements, the OpenGL code in many programs can be used as is.

Developer Audience

Designed for use by C/C++ programmers, OpenGL requires familiarity with the Windows GUI as well as message-driven architecture.

Run-time Requirements

OpenGL requires NT, Windows 2000 or 95/98. For more information on which operating systems are required for a particular function, see the Requirements section of the documentation for the function.


Friday, July 19, 2013

Write the algorithm for finding the maximum and minimum

  Write the algorithm for finding the maximum and minimum  and explin?


The problem is to find the maximum and minimum items in a set of ‘n’ elements. 
Though this problem may look so simple as to be contrived, it allows us to demonstrate
divide-and-comquer in simple setting. 
Algorithm straight MaxMin(a,n,max,min)
//set max to the maximum and min to the minimum of a[1:n]
{
max := min: = a[i];
for i = 2 to n do
{
if(a[i] >max) then max: = a[i];
if(a[i] >min) then min: = a[i];
}
}
Algorithm maxmin(I,j,max,min)
{
if( I = j) then max := min:=a[I];
else if(I=j-1) then
{
if(a[I]<a[j]) then
{
max := a[j];min := a[I];
}
else
{
max:=a[I];
min := a[j]; }}
else
{
mid := [(I+j)/2];
maxmin(I,mid,max,min);
maxmin(mid+1,j,max1,min1);
if(max<max1) then max := max1;
if(min>min1) then min:=min1;

}} 

Thursday, July 18, 2013

## Define minimum cost spanning tree. Draw the minimum cost spanning follow graph using prims algorithm .

##Define minimum cost spanning tree. Draw the minimum cost spanning  follow graph using prims algorithm  .

Ans:-Minimum Cost Spanning Tree:Let G=(V,E) be a connected graph where for all (u,v) in E there is a cost vector C[u,v].

·          A graph is connected if every pair of vertices is connected by a path.
A spanning tree for G is a free tree that connects all vertices in G.
·          A connected acyclic graph is also called a free tree.

The cost of the spanning tree is the sum of the cost of all edges in the tree. We usually want to find a spanning tree of minimum cost.

Saturday, July 6, 2013

Big O, Wmega and theta notation

                                               Big O,  Wmega and theta notation

Big oh
The function f(n) = O(g(n)) iff there exist positive constants C and no such that
f(n)≤  C * g(n) for all n, n ≥n0.

Omega
The function f(n) =Ω   (g(n)) iff there exist positive constant C and no such that
f(n) C * g(n) for all n, n ≥ n0.

Theta
The function f(n) =θ (g(n)) iff there exist positive constant C1, C2,  and no such that

C1 g(n)≤  f(n) ≤ C2 g(n) for all n, n ≥ n0. 

Wednesday, July 3, 2013

The time complexity of the algorithm

    The time complexity of the algorithm
      In computer science, the time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input[1]:226. The time complexity of an algorithm is commonly expressed using big O notation, which excludes coefficients and lower order terms. When expressed this way, the time complexity is said to be described asymptotically, i.e., as the input size goes to infinity. For example, if the time required by an algorithm on all inputs of size n is at most 5n3 + 3n, the asymptotic time complexity is O(n3).
Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform. Thus the amount of time taken and the number of elementary operations performed by the algorithm differ by at most a constant factor.

Since an algorithm's performance time may vary with different inputs of the same size, one commonly uses the worst-case time complexity of an algorithm, denoted as T(n), which is defined as the maximum amount of time taken on any input of size n. Time complexities are classified by the nature of the function T(n). For instance, an algorithm with T(n) = O(n) is called a linear time algorithm, and an algorithm with T(n) = O(2n) is said to be an exponential time algorithm.