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

(Windows) Access Violation errors when using the basic-buffer example #7

Open
Aronicu opened this issue Jul 15, 2024 · 2 comments
Open

Comments

@Aronicu
Copy link

Aronicu commented Jul 15, 2024

The title explains it.

I compiled basic-buffer.odin as odin build basic.odin -file

Odin:    dev-2024-07:efe5e9e34
        OS:      Windows 11 Unknown Edition (00000064) (version: 23H2), build 22631.3737
        CPU:     Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
        RAM:     12121 MiB
        Backend: LLVM 17.0.1
@ColleagueRiley ColleagueRiley changed the title Access Violation errors when using the basic-buffer example (Windows) Access Violation errors when using the basic-buffer example Jul 15, 2024
@ColleagueRiley
Copy link
Owner

I saw that the example wasn't rendering on Windows, but I didn't get any sort of error like that.

I’m not sure what’s causing the problem since the structures seem correct and the code works on regular RGFW.

@ColleagueRiley
Copy link
Owner

I thought this issue might be caused by this

	win->src.bitmap = CreateDIBSection(win->src.hdc,
		(BITMAPINFO*) &bi,
		DIB_RGB_COLORS,
		(void**) &win->buffer,
		NULL,
		(DWORD) 0);

But when I allocated the buffer myself it still had the same issue and win->buffer == nil
It's worth noting that buffer rendering works on linux/X11.

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