1 / 15

INTRODUÇÃO AO OPENGL

UNIVERSIDADE CATÓLICA DE PELOTAS. INTRODUÇÃO AO OPENGL. Por Anderson Afonso Cardozo. http://kledac.890m.com/apresentacao.zip. ROTEIRO. INTRODUÇÃO FUNCIONAMENTO CARACTERÍSTICAS BIBLIOTECA GLU BIBLIOTECA GLUT TIPOS DE DADOS EM OPENGL PADRONIZAÇÃO DE FUNÇÕES EXEMPLOS DE FUNÇÕES

louie
Download Presentation

INTRODUÇÃO AO OPENGL

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIVERSIDADE CATÓLICA DE PELOTAS INTRODUÇÃO AO OPENGL Por Anderson Afonso Cardozo http://kledac.890m.com/apresentacao.zip

  2. ROTEIRO • INTRODUÇÃO • FUNCIONAMENTO • CARACTERÍSTICAS • BIBLIOTECA GLU • BIBLIOTECA GLUT • TIPOS DE DADOS EM OPENGL • PADRONIZAÇÃO DE FUNÇÕES • EXEMPLOS DE FUNÇÕES • BIBLIOGRAFIA

  3. INTRODUÇÃO • Biblioteca gráfica • Rotinas de modelagem • Animações • Criada em 1992 pela Silicon Graphics • Gerenciada pelo Grupo ARB(Apple, Nvidia,SGI,SUN) • Independente de plataforma • Camada em Alto Nível de Funções Gráficas

  4. FUNCIONAMENTO • Máquina de Estados, com valores default • glEnable(GL_LIGHTING) • glDisable(GL_LIGHTING) • Pipeline de Renderização Armazenamento em memória dos comandos em opengl Processamento de dados geométricos e imagens Chamadas e funções da API OpenGL Operações de fragmento Rasterization Frame Buffer

  5. CARACTERÍSTICAS • Facilidade de Aprendizado • Criação de Janelas Gráficas • Gerenciamento de eventos como Mouse, Teclado... • Biblioteca GLUT(openGl toolkit), criação e manipulação de janelas independentes • Biblioteca GLU • Extremamente veloz

  6. BIBLIOTECA GLU • Instalada junto com a OpenGL • Projeção Ortográfica 2D • Especificação Câmera

  7. BIBLIOTECA GLUT • Toolkit Independente de plataforma • Gerencia eventos • Criação de menus pop-up • Muito Utilizada no aprendizado • Prefixo Padrão “glut”

  8. PADRONIZAÇÃO DE FUNÇÕES • <prefixoBiblioteca><ComandoRaiz><contadorArgumentosOpcional> <TipodeArgumentosOpcional> Exemplo: Void glColor3f(GLfloat red, GLfloat green, GLfloat blue) gl-> é o prefixo que representa a biblioteca Color -> Comando Raiz que identifica o objetivo da função 3 -> Contador para o número de argumentos que a função possui f -> Indica que os argumentos são valores de ponto flutuante

  9. TIPOS DE DADOS EM OPENGL

  10. EXEMPLO DE FUNÇÕES

  11. EXEMPLOS DE FUNÇÕES • void gluLookAt(GLdouble obsx, GLdouble obsy, GLdouble obsz, GLdouble alvox, GLdouble alvoy, GLdouble alvoz, GLdouble upx, GLdouble upy, GLdouble upz) • void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)

  12. EXEMPLOS DE FUNÇÕES • void glFrustum (GLdouble left , GLdouble right , GLdouble bottom , GLdouble top , GLdouble zNear , GLdouble zFar ); O comando glFrustum define uma matriz de projeção que deixa a câmera alinhada ao eixo z e com direção de projeção ortogonal ao plano de projeção (default do OpenGL). • void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) • void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)

  13. EXEMPLOS DE FUNÇÕES • tgaLoad (“TGAimage.tga”, &image, TGA FREE|TGA LOW QUALITY ); • voidglFogf (GLenumpname, GLfloat param) • voidglFogi (GLenumpname, GLfloat param) • voidglFogfv (GLenumpname, constGLfloat *params)

  14. EXEMPLOS DE FUNÇÕES • FOG • PROJEÇÃO

  15. BIBLIOGRAFIA • Cohen M. and Manssour I., OpenGL Uma Abordagem Pr´atica e Objetiva, 2006. • http://www.dcc.ufla.br/~bruno/aulas/cg/monte-mor/44.htm • http://www.falloutsoftware.com/tutorials/gl/gl0.htm • http://www.inf.pucrs.br/~manssour/OpenGL/Tutorial.html

More Related