From bba5a660a3bb0165d669079c12b6f29caaf1c7e0 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 1 Jun 2024 12:07:34 +0800 Subject: [PATCH] fixed PlaneGrid3D sample --- example/Gizmo/PlaneGrid3D.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/example/Gizmo/PlaneGrid3D.cpp b/example/Gizmo/PlaneGrid3D.cpp index 6532f974..8c45f22a 100644 --- a/example/Gizmo/PlaneGrid3D.cpp +++ b/example/Gizmo/PlaneGrid3D.cpp @@ -61,7 +61,9 @@ private: pgci.lum=0.75; pgci.sub_lum=1.0; - prim_plane_grid=CreatePlaneGrid(db,material->GetDefaultVIL(),&pgci); + PrimitiveCreater pc(device,material->GetDefaultVIL()); + + prim_plane_grid=CreatePlaneGrid(&pc,&pgci); return prim_plane_grid; } @@ -98,6 +100,11 @@ private: public: + ~TestApp() + { + SAFE_CLEAR(prim_plane_grid); + } + bool Init(uint width,uint height) override { if(!SceneAppFramework::Init(width,height))