MeshLib C++ Docs
Loading...
Searching...
No Matches
MRImGuiImage.h
Go to the documentation of this file.
1
#pragma once
2
#include "exports.h"
3
#include <MRMesh/MRMeshFwd.h>
4
#include <
MRMesh/MRMeshTexture.h
>
5
#include "
MRRenderGLHelpers.h
"
6
#include "
MRViewer/MRImGui.h
"
7
8
namespace
MR
9
{
12
13
17
class
MRVIEWER_CLASS
ImGuiImage
18
{
19
public
:
20
MRVIEWER_API
ImGuiImage
();
21
MRVIEWER_API
virtual
~ImGuiImage
();
22
24
MRVIEWER_API
void
update
(
const
MeshTexture
& texture );
25
28
ImTextureID
getImTextureId
()
const
{
return
(ImTextureID) (intptr_t) glTex_.getId(); }
29
31
unsigned
getId
()
const
{
return
glTex_.getId(); }
32
34
const
MeshTexture
&
getMeshTexture
()
const
{
return
texture_; }
35
36
int
getImageWidth
()
const
{
return
texture_.resolution.x; }
37
int
getImageHeight
()
const
{
return
texture_.resolution.y; }
38
39
private
:
40
GlTexture2
glTex_;
41
MeshTexture
texture_;
42
43
void
bind_();
44
};
45
46
}
MRImGui.h
MRMeshTexture.h
MRRenderGLHelpers.h
MR::GlTexture2
represents OpenGL 2D texture owner, and allows uploading data in it remembering texture size
Definition
MRRenderGLHelpers.h:68
MR::ImGuiImage
Definition
MRImGuiImage.h:18
MR::ImGuiImage::getImageWidth
int getImageWidth() const
Definition
MRImGuiImage.h:36
MR::ImGuiImage::~ImGuiImage
virtual MRVIEWER_API ~ImGuiImage()
MR::ImGuiImage::ImGuiImage
MRVIEWER_API ImGuiImage()
MR::ImGuiImage::getImTextureId
ImTextureID getImTextureId() const
Definition
MRImGuiImage.h:28
MR::ImGuiImage::update
MRVIEWER_API void update(const MeshTexture &texture)
Sets image to texture.
MR::ImGuiImage::getImageHeight
int getImageHeight() const
Definition
MRImGuiImage.h:37
MR::ImGuiImage::getMeshTexture
const MeshTexture & getMeshTexture() const
Returns current MeshTexture.
Definition
MRImGuiImage.h:34
MR::ImGuiImage::getId
unsigned getId() const
Returns gl texture id.
Definition
MRImGuiImage.h:31
MR
only for bindings generation
Definition
MRCameraOrientationPlugin.h:8
MR::MeshTexture
Definition
MRMeshTexture.h:13
MeshLib
source
MRViewer
MRImGuiImage.h
Generated by
1.11.0