introduction to opengl
Download
Skip this Video
Download Presentation
Introduction to OpenGL

Loading in 2 Seconds...

play fullscreen
1 / 7

Introduction to OpenGL - PowerPoint PPT Presentation


  • 764 Views
  • Uploaded on

Introduction to OpenGL By NematAllah Ahmadyan About OpenGL Open Graphic Library is an open-source library for displaying 2D/3D shapes . a software interface to graphics hardware. implementation Mesa3D Linux mostly GLUT Linux, ported to Win32 Using GLUT under Win32

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Introduction to OpenGL' - Gabriel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to opengl

Introduction toOpenGL

By

NematAllah Ahmadyan

about opengl
About OpenGL
  • Open Graphic Library is an open-source library for displaying 2D/3D shapes.
  • a software interface to graphics hardware.
implementation
implementation
  • Mesa3D
    • Linux mostly
  • GLUT
    • Linux, ported to Win32
using glut under win32
Using GLUT under Win32
  • Obtain GLUT from web
    • http://192.48.159.181/resources/libraries/glut/glut_downloads.html
  • Some IDEs ( like Dev-Cpp ) comes with bundled OpenGL/Glut
  • #include
  • #include // handles windows
slide5
Create a Window

And add event handler

Calculate the moment

And motion,

No

Enable OpenGL

Calculate the

screen points

Finished?

Yes

Clear the device

Draw the shape(s)

Disable OpenGL

Exit

prototype
Prototype
  • LRESULT CALLBACK WndProc(HWND hWnd, UINT message,WPARAM wParam, LPARAM lParam);
  • void EnableOpenGL(HWND hWnd, HDC *hDC, HGLRC *hRC);
  • void DisableOpenGL(HWND hWnd, HDC hDC, HGLRC hRC);
  • void Simulate();
  • int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
ad