3D editor stable with path tracer

This commit is contained in:
IlyaShurupov 2024-06-18 19:36:47 +03:00 committed by Ilya Shurupov
parent 8bec5d1ab7
commit 5ac4d56d32
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);