comparison Renderer/Engine/texture.h @ 943:ba1a6a328468

Rendering Engine compile on SPU.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 31 Jul 2010 18:43:05 +0900
parents b2f7d2ad3804
children
comparison
equal deleted inserted replaced
942:b2f7d2ad3804 943:ba1a6a328468
1 #ifndef INCLUDED_TEXTURE 1 #ifndef INCLUDED_TEXTURE
2 #define INCLUDED_TEXTURE 2 #define INCLUDED_TEXTURE
3
4 #if !defined(__SPU__)
3 5
4 #include <SDL.h> 6 #include <SDL.h>
5 #include <SDL_opengl.h> 7 #include <SDL_opengl.h>
6 8
7 extern int power_of_two(int input); 9 extern int power_of_two(int input);
8 extern GLuint SDL_GL_LoadTexture(SDL_Surface *surface); 10 extern GLuint SDL_GL_LoadTexture(SDL_Surface *surface);
9
10 11
11 typedef struct texture_list { 12 typedef struct texture_list {
12 int t_w; 13 int t_w;
13 int t_h; 14 int t_h;
14 uint32 *pixels_orig; 15 uint32 *pixels_orig;
18 GLuint gl_tex; 19 GLuint gl_tex;
19 int pad[1]; // 12 20 int pad[1]; // 12
20 21
21 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32 22 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32
22 23
24 #else
25
26 typedef struct texture_list {
27 int t_w;
28 int t_h;
29 uint32 *pixels_orig;
30 uint32 *pixels;
31 int scale_max;
32 void *texture_image;
33 void *gl_tex;
34 int pad[1]; // 12
35
36 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32
37
23 #endif 38 #endif
39
40 #endif