Robotics C++ Physics II AP Physics B Electronics Java Astronomy Other Courses Summer Session  

Graphics and Simulations Manual

 

  Note for users of C++ Express Edition

 

Good On-Line Tutorial: http://www.lighthouse3d.com/tutorials/glut-tutorial/

 

OpenGL Part 1: Using GLUT

1. Introduction

3. State Management

5. Color

7. Blending, Fog

   9. Pixels, Bitmaps

11. Framebuffer

2. GLUT1

4a. Viewing  4b. GLUT 2

6. Light and Materials

8. Display Lists

10. Texture Mapping

Appendices

OpenGL Part 2: Using Win32

1. Pragma Directives

4. First Examples

7. Color, Light, Blend, Fog

10. Displaying Text

13. Translate, Roate, Scale

16. PointSize

 2: Windows Stuff

5. States and Primitives

8. Bitmaps, Images

11. Drawing Simple Lines

14. Lines using a Loop

 
   3. Why Windows?

6. Transforms, Matrices

9. Texture Mapping

12. glTranslate ()

 15. Line Thickness  

OpenGL PowerPoint Summaries

 

1. Course Summary

3. Drawing Primitives

5. Color

7. Blending and Fog

 9.   Bitmaps, Fonts

11. MilkShape

2: Introduction

4. Viewing

6. Lighting

8. Display Lists

 10. Texture Maping

12. DirectX

MilkShape3D

1. Introduction

2. Tutorial in Word

3. MilkShape 3D Help

DirectX

1. Game Development

2. The Windows API

3. DirectX Schematic

4. DirectX API

5. Direct3D

          

Videos

http://xoax.net/comp/cpp/opengl/index.php

http://www.videotutorialsrock.com/

 

Notes for use of C++ Express Edition

Step 1: Open C++ Console Applications and create a new project

 

Step 2: Link to the OpenGL libraries

 

¢  Under the Project menu select Project Properties (Alt+F7) at the bottom.

¢  Select Configuration Properties → Linker → Input from the navigation panel on the left.

¢  Select All Configurations from the Configuration drop-down box at the top of the dialog.

     This ensures you are changing the settings for both the Debug and Release configurations.

¢  Type “opengl32.lib glu32.lib” in Additional Dependencies and click OK.

 

Step 3: Insert and run the following code

 

#include "stdafx.h"

#include <GL/glut.h>

void mydisplay()

{

   glClear(GL_COLOR_BUFFER_BIT);

   glBegin(GL_POLYGON);       

   glVertex2f(-0.5, -0.5);       

   glVertex2f(-0.5, 0.5);       

   glVertex2f(0.5, 0.5);       

   glVertex2f(0.5, -0.5);   

   glEnd();

   glFlush();

}

int main(int argc, char** argv)

{

   glutCreateWindow("Simple");    

   glutDisplayFunc(mydisplay);   

   glutMainLoop();

}

Output