annotate Renderer/Engine/ps3fb/cp_fb.h @ 0:04e28d8d3c6f

first commit
author Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
date Mon, 08 Nov 2010 01:23:25 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // cp_fb.h
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Copyright (c) 2006, Mike Acton <macton@cellperformance.com>
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 //
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // documentation files (the "Software"), to deal in the Software without restriction, including without
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 // limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 // conditions:
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 //
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // The above copyright notice and this permission notice shall be included in all copies or substantial
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 // portions of the Software.
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 //
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 // EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 // OR OTHER DEALINGS IN THE SOFTWARE.
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 #ifndef CP_FB_H
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 #define CP_FB_H
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 #if defined(__cplusplus)
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 extern "C"
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 {
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #endif
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 typedef struct cp_fb cp_fb;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 struct cp_fb
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 {
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 uint32_t w;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 uint32_t h;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 uint32_t stride;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 uintptr_t start_addr;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 uintptr_t draw_addr[2];
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 uint32_t size;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 int fd;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 };
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 int cp_fb_open( cp_fb* const restrict fb );
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 void cp_fb_close( const cp_fb* const restrict fb );
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 void cp_fb_wait_vsync( cp_fb* const restrict fb );
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 void cp_fb_flip( cp_fb* const restrict fb, unsigned long field_ndx );
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 #if defined(__cplusplus)
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 }
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 #endif
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 #endif /* CP_FB_H */
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51