You.i Engine
YiGraphicsComponentsGNM.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_GRAPHICS_COMPONENTS_GNM_H_
3 #define _YI_GRAPHICS_COMPONENTS_GNM_H_
4 
5 #include "framework/YiPredef.h"
6 #include "YiGraphics.h"
7 #include "YiGraphicsComponents.h"
8 
9 #include <kernel.h>
10 
11 namespace sce
12 {
13  namespace Gnmx
14  {
15  class GfxContext;
16  }
17 }
18 
28 {
29 public:
31 
33 
39  void *GarlicAlloc(uint32_t nSize, uint32_t nAlignment);
40 
46  void *GarlicAlloc(sce::Gnm::SizeAlign sizeAlign);
47 
51  void GarlicFree(void *pMemory);
52 
57  void *OnionAlloc(uint32_t nSize, uint32_t nAlignment);
58 
63  void *OnionAlloc(sce::Gnm::SizeAlign sizeAlign);
64 
68  void OnionFree(void *pMemory);
69 
70 public:
72  {
73  DisplayBuffer();
74 
75  sce::Gnm::RenderTarget renderTarget;
76  sce::Gnm::DepthRenderTarget depthTarget;
77  volatile uint64_t *pLabel;
78  uint32_t expectedLabel;
79  };
80 
81  struct VideoInfo
82  {
83  VideoInfo();
84 
85  int32_t handle;
86  uint64_t *pLabel;
87  uint32_t flip_index;
88  SceKernelEqueue eq;
89  };
90 
91  struct RenderStates
92  {
93  sce::Gnm::BlendControl blendState;
94  sce::Gnm::DepthStencilControl depthState;
95  sce::Gnm::PrimitiveSetup primitiveState;
96  };
97 
98  struct FrameBuffer
99  {
100  FrameBuffer();
101 
102  uint32_t numBuffers;
103 
105 
106  sce::Gnm::RenderTarget renderTarget;
107  sce::Gnm::Texture renderTargetTexture;
108  };
109 
114 
121 
126 
130  uint32_t frameCount;
131 
136 
140  volatile uint64_t *labels;
141 
145  sce::Gnmx::GfxContext gfxc;
146 };
147 
152 #endif // _YI_GRAPHICS_COMPONENTS_GNM_H_
sce::Gnm::BlendControl blendState
Definition: YiGraphicsComponentsGNM.h:93
Definition: YiGraphicsComponents.h:20
sce::Gnm::DepthRenderTarget depthTarget
Definition: YiGraphicsComponentsGNM.h:76
DisplayBuffer * buffers
Definition: YiGraphicsComponentsGNM.h:135
uint32_t frameCount
Definition: YiGraphicsComponentsGNM.h:130
SceKernelEqueue eq
Definition: YiGraphicsComponentsGNM.h:88
volatile uint64_t * pLabel
Definition: YiGraphicsComponentsGNM.h:77
Definition: YiGraphicsComponentsGNM.h:81
RenderStates renderStates
Definition: YiGraphicsComponentsGNM.h:125
sce::Gnm::PrimitiveSetup primitiveState
Definition: YiGraphicsComponentsGNM.h:95
Definition: YiGNMTextureObject.h:8
const DisplayBuffer * pBackBuffer
Definition: YiGraphicsComponentsGNM.h:104
Definition: YiGraphicsComponentsGNM.h:91
uint64_t * pLabel
Definition: YiGraphicsComponentsGNM.h:86
uint32_t expectedLabel
Definition: YiGraphicsComponentsGNM.h:78
sce::Gnm::RenderTarget renderTarget
Definition: YiGraphicsComponentsGNM.h:75
Definition: YiGraphicsComponentsGNM.h:27
VideoInfo videoInfo
Definition: YiGraphicsComponentsGNM.h:113
sce::Gnm::DepthStencilControl depthState
Definition: YiGraphicsComponentsGNM.h:94
Definition: YiGraphicsComponentsGNM.h:71
virtual ~CYIGraphicsComponentsGNM()
Definition: YiGraphicsComponentsGNM.h:32
sce::Gnm::Texture renderTargetTexture
Definition: YiGraphicsComponentsGNM.h:107
sce::Gnm::RenderTarget renderTarget
Definition: YiGraphicsComponentsGNM.h:106
Definition: YiGraphicsComponentsGNM.h:98
FrameBuffer frameBuffer
Definition: YiGraphicsComponentsGNM.h:120
uint32_t numBuffers
Definition: YiGraphicsComponentsGNM.h:102
volatile uint64_t * labels
Definition: YiGraphicsComponentsGNM.h:140
int32_t handle
Definition: YiGraphicsComponentsGNM.h:85
sce::Gnmx::GfxContext gfxc
Definition: YiGraphicsComponentsGNM.h:145
uint32_t flip_index
Definition: YiGraphicsComponentsGNM.h:87