Mercurial > hg > Game > Cerium
annotate Renderer/Engine/texture.h @ 1127:c4287bf771a0 draft
CreatePolygonFromSceneGraph can work on Mac OSX.
author | Yutaka_Kinjyo |
---|---|
date | Sun, 13 Feb 2011 23:27:22 +0900 |
parents | 294bc9364bee |
children | a8bffdb5d2e3 |
rev | line source |
---|---|
283 | 1 #ifndef INCLUDED_TEXTURE |
2 #define INCLUDED_TEXTURE | |
3 | |
943
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
4 #if !defined(__SPU__) |
6dca1f2fb3b9
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
fada580e4604
remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
860
diff
changeset
|
8 |
942
27df980045b5
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); |
27df980045b5
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); |
27df980045b5
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
27df980045b5
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; |
27df980045b5
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; |
1050 | 20 int texture_id; |
860 | 21 |
22 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32 | |
283 | 23 |
943
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
24 #else |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
25 |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
26 typedef struct texture_list { |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
27 int t_w; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
28 int t_h; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
29 uint32 *pixels_orig; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
30 uint32 *pixels; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
31 int scale_max; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
32 void *texture_image; |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
33 void *gl_tex; |
1050 | 34 int texture_id; |
943
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
35 |
6dca1f2fb3b9
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 |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
37 |
283 | 38 #endif |
943
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
39 |
6dca1f2fb3b9
Rendering Engine compile on SPU.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
942
diff
changeset
|
40 #endif |