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

Segfault under pygame if I forget pygame.OPENGL #67

Open
sh1boot opened this issue Oct 13, 2024 · 0 comments
Open

Segfault under pygame if I forget pygame.OPENGL #67

sh1boot opened this issue Oct 13, 2024 · 0 comments

Comments

@sh1boot
Copy link

sh1boot commented Oct 13, 2024

I know the code is wrong, but I don't think it should cause a segfault.

import moderngl
import pygame

pygame.init()
pygame_flags = pygame.SCALED | pygame.RESIZABLE #| pygame.OPENGL
pygame.display.set_mode((1024, 1024), pygame_flags, vsync=True)
ctx = moderngl.get_context()
texture = ctx.texture((256, 256), 3, bytearray(256 * 256 * 3))
print('success', str(texture))

When I run this it does not print success. However, it seems to depend on the size given to set_mode(), because when I used 256x256 it succeeded, and when I passed 1024x1024 it crashed. It may need a little prodding to bring about a crash on a different system.

'GL_VENDOR': 'Intel', 'GL_RENDERER': 'Mesa Intel(R) Graphics (RPL-P)', 'GL_VERSION': '4.6 (Compatibility Profile) Mesa 24.1.7',

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

1 participant