renamed to FullScreenTriangle instead of FullScreenRect.
This commit is contained in:
parent
1a18fdd77c
commit
2a28872309
@ -28,7 +28,7 @@ CreateProject(00.triangle first_triangle.cpp)
|
||||
CreateProject(01.two_triangle two_triangle.cpp)
|
||||
CreateProject(02.FragCoord FragCoordTest.cpp)
|
||||
CreateProject(03.indices_rect indices_rect.cpp)
|
||||
CreateProject(04.FullScreenRect FullScreenRect.cpp)
|
||||
CreateProject(04.FullScreenTriangle FullScreenTriangle.cpp)
|
||||
|
||||
CreateProject(05.TextureFormat TextureFormat.cpp)
|
||||
CreateProject(06.texture_rect texture_rect.cpp)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// 全屏矩形
|
||||
// 该范例用于演示使用索引画一个矩形,但是不传递顶点信息。
|
||||
// 全屏三角形
|
||||
// 该范例用于演示使用索引画一个覆盖全屏的三角形,但是不传递任何顶点信息,顶点坐标在vertex shader中通过gl_VertexIndex计算出来。
|
||||
|
||||
#include"VulkanAppFramework.h"
|
||||
#include<hgl/math/Math.h>
|
||||
@ -10,8 +10,6 @@ using namespace hgl::graph;
|
||||
constexpr uint32_t SCREEN_WIDTH=256;
|
||||
constexpr uint32_t SCREEN_HEIGHT=256;
|
||||
|
||||
static Vector4f color(1,1,1,1);
|
||||
|
||||
class TestApp:public VulkanApplicationFramework
|
||||
{
|
||||
private:
|
||||
@ -30,14 +28,14 @@ private:
|
||||
|
||||
BindCameraUBO(material_instance);
|
||||
|
||||
pipeline=CreatePipeline(material_instance,InlinePipeline::Solid2D,Prim::Fan);
|
||||
pipeline=CreatePipeline(material_instance,InlinePipeline::Solid2D,Prim::Triangles);
|
||||
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
bool InitVBO()
|
||||
{
|
||||
auto render_obj=db->CreateRenderable(4);
|
||||
auto render_obj=db->CreateRenderable(3);
|
||||
if(!render_obj)return(false);
|
||||
|
||||
renderable_instance=db->CreateRenderableInstance(render_obj,material_instance,pipeline);
|
Loading…
x
Reference in New Issue
Block a user