annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_TEXTURE
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_TEXTURE
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
6 #include <SDL.h>
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
12 typedef struct texture_list {
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
13 int t_w;
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
14 int t_h;
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
15 uint32 *pixels_orig;
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
16 uint32 *pixels;
283
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
21
649e4cb84683 Still on the way
yutaka@localhost.localdomain
parents: 507
diff changeset
22 } texture_list, *texture_list_ptr ; // 20 + pad(12) = 32
283
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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
55ea4465b1a2 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
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