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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_TEXTURE
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_TEXTURE
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
6 #include <SDL.h>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
12 typedef struct texture_list {
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
13 int t_w;
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
14 int t_h;
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
15 uint32 *pixels_orig;
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
16 uint32 *pixels;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 943
diff changeset
20 int texture_id;
860
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
21
63a08f3a468a Still on the way
yutaka@localhost.localdomain
parents: 539
diff changeset
22 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 943
diff changeset
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
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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