improved safe.

This commit is contained in:
hyzboy 2024-03-16 00:41:20 +08:00
parent 35b7c9651f
commit 60ba3e4df2
6 changed files with 14 additions and 8 deletions

2
CMCore

@ -1 +1 @@
Subproject commit 2f93a1bb004cf0e99f51735dc2f65967a3ded1b8
Subproject commit 74caaea5669441eb27dae3265803e352c008d065

View File

@ -460,6 +460,7 @@ public:
{
camera=wc;
cur_time=0;
last_time=0;
}
const Vector2f &GetMouseCoord()const{return mouse_pos;}

View File

@ -38,14 +38,11 @@ void RenderCmdBuffer::SetFBO(Framebuffer *fb)
clear_values[cv_count-1].depthStencil.depth = 1.0f;
clear_values[cv_count-1].depthStencil.stencil = 0;
}
else
{
if(clear_values)
else if(clear_values)
{
hgl_free(clear_values);
clear_values=nullptr;
}
}
render_area.offset.x=0;
render_area.offset.y=0;

View File

@ -161,6 +161,8 @@ Texture2DArray *RenderResource::CreateTexture2DArray(const AnsiString &name,cons
if(ta)
Add(ta);
else
return nullptr;
#ifdef _DEBUG
DebugUtils *du=device->GetDebugUtils();

View File

@ -9,10 +9,14 @@ namespace hgl
default_source=fs;
if(fs)
{
fs->RefAcquire(this);
max_char_height=fs->GetCharHeight();
}
else
max_char_height=0;
}
FontSourceMulti::~FontSourceMulti()
{

View File

@ -120,6 +120,8 @@ namespace
public:
UBOParse()=default;
void Clear()
{
hgl_zero(ubo_data);