Mercurial > hg > Members > kono > Cerium
annotate Renderer/Engine/texture.h @ 1048:40cde8c1a6cd default tip
add ScaleXY (not for allExecute...)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 06:22:15 +0900 |
parents | ba1a6a328468 |
children |
rev | line source |
---|---|
283 | 1 #ifndef INCLUDED_TEXTURE |
2 #define INCLUDED_TEXTURE | |
3 | |
943
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
4 #if !defined(__SPU__) |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
5 |
283 | 6 #include <SDL.h> |
7 #include <SDL_opengl.h> | |
927
651251d56f36
remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
860
diff
changeset
|
8 |
942
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
9 extern int power_of_two(int input); |
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
10 extern GLuint SDL_GL_LoadTexture(SDL_Surface *surface); |
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
11 |
860 | 12 typedef struct texture_list { |
13 int t_w; | |
14 int t_h; | |
15 uint32 *pixels_orig; | |
16 uint32 *pixels; | |
283 | 17 int scale_max; |
942
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
18 SDL_Surface *texture_image; |
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
19 GLuint gl_tex; |
b2f7d2ad3804
FB mode is working again on Mac OS X.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
927
diff
changeset
|
20 int pad[1]; // 12 |
860 | 21 |
22 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32 | |
283 | 23 |
943
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
24 #else |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
25 |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
26 typedef struct texture_list { |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
27 int t_w; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
28 int t_h; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
29 uint32 *pixels_orig; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
30 uint32 *pixels; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
31 int scale_max; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
32 void *texture_image; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
33 void *gl_tex; |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
34 int pad[1]; // 12 |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
35 |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
36 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32 |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
37 |
283 | 38 #endif |
943
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
39 |
ba1a6a328468
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
40 #endif |