improved codes.
This commit is contained in:
parent
4e144072e4
commit
2f00aa8e1e
2
CMCore
2
CMCore
@ -1 +1 @@
|
|||||||
Subproject commit 072153aa9135d7de413cc9d63e3019e9853d7045
|
Subproject commit 416e96c16923dede9dba5a483e1fe239116e8679
|
@ -78,7 +78,7 @@ private:
|
|||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InitVBO()
|
bool InitVBOAndRenderList()
|
||||||
{
|
{
|
||||||
RenderablePrimitiveCreater rpc(db,VERTEX_COUNT);
|
RenderablePrimitiveCreater rpc(db,VERTEX_COUNT);
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
if(!InitMaterial())
|
if(!InitMaterial())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!InitVBO())
|
if(!InitVBOAndRenderList())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
BuildCommandBuffer(render_list);
|
BuildCommandBuffer(render_list);
|
||||||
|
@ -21,10 +21,10 @@ constexpr uint32_t SCREEN_HEIGHT=256;
|
|||||||
|
|
||||||
constexpr float position_data[4]=
|
constexpr float position_data[4]=
|
||||||
{
|
{
|
||||||
-1, //left
|
0, //left
|
||||||
-1, //top
|
0, //top
|
||||||
1, //right
|
1, //right
|
||||||
1 //bottom;
|
1 //bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr float tex_coord_data[4]=
|
constexpr float tex_coord_data[4]=
|
||||||
@ -49,7 +49,7 @@ private:
|
|||||||
{
|
{
|
||||||
mtl::Material2DCreateConfig cfg(device->GetDeviceAttribute(),"RectTexture2D");
|
mtl::Material2DCreateConfig cfg(device->GetDeviceAttribute(),"RectTexture2D");
|
||||||
|
|
||||||
cfg.coordinate_system=CoordinateSystem2D::NDC;
|
cfg.coordinate_system=CoordinateSystem2D::ZeroToOne;
|
||||||
cfg.local_to_world=false;
|
cfg.local_to_world=false;
|
||||||
|
|
||||||
AutoDelete<mtl::MaterialCreateInfo> mci=mtl::CreateRectTexture2D(&cfg);
|
AutoDelete<mtl::MaterialCreateInfo> mci=mtl::CreateRectTexture2D(&cfg);
|
||||||
|
2
res
2
res
@ -1 +1 @@
|
|||||||
Subproject commit dcb47143e5ff4e070bec7db33d35b15b7f0f82f7
|
Subproject commit 008dbd5353e6afe7add287333cbda1b5c5fffdec
|
@ -17,7 +17,7 @@ vec4 GetPosition2D()
|
|||||||
R"(
|
R"(
|
||||||
vec4 GetPosition2D()
|
vec4 GetPosition2D()
|
||||||
{
|
{
|
||||||
return vec4(Position.xy*2-1,Position.zw*2-1);
|
return Position*2-1;
|
||||||
}
|
}
|
||||||
)",
|
)",
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user