3D editor stable with path tracer

This commit is contained in:
IlyaShurupov 2024-06-18 19:36:47 +03:00
parent 19706ed738
commit e8001cd95b
11 changed files with 144 additions and 19 deletions

View file

@ -130,6 +130,14 @@ void Canvas::drawImage(const RectF& rec, ImageHandle* image, halnf angle, halnf
#endif
}
void Canvas::updateTextureID(ImageHandle handle, ualni id) {
auto nvgl = (GLNVGcontext*) nvgInternalParams(mContext->vg)->userPtr;
auto glhandle = nvglImageHandleGL3(mContext->vg, handle.id);
auto tex = glnvg__findTexture(nvgl, handle.id);
tex->tex = id;
}
void Canvas::deleteImageHandle(ImageHandle image) {
if (image.id) {
nvgDeleteImage(mContext->vg, image.id);