ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/material.C
(Generate patch)

Comparing libgender/material.C (file contents):
Revision 1.4 by root, Sun Oct 10 20:22:33 2004 UTC vs.
Revision 1.5 by root, Sat Oct 16 23:23:21 2004 UTC

30 cgGLDisableProfile (vsh_profile); 30 cgGLDisableProfile (vsh_profile);
31 cgGLDisableProfile (fsh_profile); 31 cgGLDisableProfile (fsh_profile);
32} 32}
33 33
34 34
35GLuint texture::load_texture (SDL_Surface *surface, GLfloat *texcoord) 35GLuint texture::load_texture (SDL_Surface *surface, GLfloat *tex2oord)
36{ 36{
37 GLuint textur; 37 GLuint textur;
38 int w, h; 38 int w, h;
39 SDL_Surface *image; 39 SDL_Surface *image;
40 SDL_Rect area; 40 SDL_Rect area;
44 /* Use the surface width and height expanded to powers of 2 */ 44 /* Use the surface width and height expanded to powers of 2 */
45 //w = power_of_two (surface->w); 45 //w = power_of_two (surface->w);
46 //h = power_of_two (surface->h); 46 //h = power_of_two (surface->h);
47 w = power_of_two (surface->w); 47 w = power_of_two (surface->w);
48 h = power_of_two (surface->h); 48 h = power_of_two (surface->h);
49 texcoord[0] = 0.0f; /* Min X */ 49 tex2oord[0] = 0.0f; /* Min X */
50 texcoord[1] = 0.0f; /* Min Y */ 50 tex2oord[1] = 0.0f; /* Min Y */
51 texcoord[2] = (GLfloat) surface->w / w; /* Max X */ 51 tex2oord[2] = (GLfloat) surface->w / w; /* Max X */
52 texcoord[3] = (GLfloat) surface->h / h; /* Max Y */ 52 tex2oord[3] = (GLfloat) surface->h / h; /* Max Y */
53 53
54 image = SDL_CreateRGBSurface (SDL_SWSURFACE, w, h, 32, 54 image = SDL_CreateRGBSurface (SDL_SWSURFACE, w, h, 32,
55#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */ 55#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
56 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 56 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
57#else 57#else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines