Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackendFlagsRendererHasVtxOffset flag is not working #236

Closed
Cardroid opened this issue Dec 16, 2023 · 3 comments
Closed

BackendFlagsRendererHasVtxOffset flag is not working #236

Cardroid opened this issue Dec 16, 2023 · 3 comments

Comments

@Cardroid
Copy link

Cardroid commented Dec 16, 2023

If the size of the data is larger than a certain size, there is a problem that the ImPlot does not draw.

bug-ffmpeg.mp4

It's part of my initialization code.
(I referred to ocornut/imgui#2591)

func InitImgui(title string, width, height int) {
	Context = &ImguiWContext{}
	Context.context = imgui.CreateContext()

	io := imgui.CurrentIO()

	// io.SetConfigViewportsNoAutoMerge(true)
	io.SetConfigFlags(imgui.ConfigFlagsDpiEnableScaleViewports)
	io.SetBackendFlags(imgui.BackendFlagsRendererHasVtxOffset)

	io.SetIniFilename("")

	imgui.PlotCreateContext()
	imgui.ImNodesCreateContext()

	Context.imBackend = imgui.CreateBackend(imgui.NewGLFWBackend())

	// logger.Tracef("imgui.CurrentIO().IniFilename()=%v", imgui.CurrentIO().IniFilename())
	// logger.Tracef("io.IniFilename()=%v", io.IniFilename())

	Context.imBackend.SetTargetFPS(60)
	Context.imBackend.SetBeforeRenderHook(beforeRender)
	Context.imBackend.SetAfterCreateContextHook(afterCreateContext)
	Context.imBackend.SetBeforeDestroyContextHook(beforeDestroyContext)
...

The flag does not appear to be working properly.
I'd appreciate your help :)

@AllenDang
Copy link
Owner

What's your giu version?

@Cardroid
Copy link
Author

I'm sorry that I didn't put any important information on it.

I'm only using cimgui-go because of the bug in giu
And I'm currently using the code on ptxmac/cimgui-go/tree/ptx_fixes due to a problem that cimgui-go is not building on Windows (#206)

@Cardroid
Copy link
Author

The reason was that the opengl version was 3.0.
It works well when it is fixed at 3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants