10.07.2015 Views

Texturas - Unisinos

Texturas - Unisinos

Texturas - Unisinos

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Objetos de texturaPrimeiro passo consiste indicar uma quantidade de objetos de textura:glGenTexture(GLsizei n, GLuint *textures);n – é o tamanho do array de texturas*textures – é o array de identificadores.Para trocar o estado de textura atual:glBindTexture(Glenum target, GLuint texture)target – GL_TEXTURE_1D, GL_TEXTURE_2D ou GL_TEXTURE_3Dtexture – é o identificador do objeto de textura.Para remover objetos de textura:glDeleteTextures(GLsizei n, GLuint *textures);Os dados relativos aos objetos de textura devem ser carregados nainicialização do programa e, cada etapa de redesenho, deve-se fazer atroca de estados entre os objetos, conforme a necessidade.Ver exemplo TUNNEL do livro [3]. O exemplo demonstra o uso demipmaps e mútiplas texturas04/12/2011 Leandro Tonietto 42quarta-feira, 26 de setembro de 12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!