PDA

View Full Version : How to map the file of jpg or bmp directly on the quads?



Daniel_lu
12-05-2002, 09:03 PM
I have tried to convert the file of jpg or bmp to the two dimensional array. But I do not know how to convert the units of the array whose type might be "double" to the "GLubyte" type

MickeyMouse
12-06-2002, 12:34 AM
Hi!
Why not to look at the redbook? http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/
Chapter 9. Texture Mapping, Example 9-1 : Texture-Mapped Checkerboard: checker.c http://www.opengl.org/discussion_boards/ubb/smile.gif