Skip to main content
2 votes
2 answers
102 views

I've been messing around with OpenGL/ModernGL in Python/Pygame, and after getting my images rendered to the screen, I have been having issues rotating them. I'm aware of the order that I need to ...
user32678267's user avatar
Best practices
0 votes
0 replies
40 views

I need to display many (a lot) 3d trajectories with modernGL. For now, I chain the trajectories and I create two arrays only (one for all the vertices and one for their colors) that I pass as params ...
mike's user avatar
  • 55
-1 votes
1 answer
109 views

According to my understanding of what a VAO is, it acts as a descriptor for the format of vertex data, and if you have vertex buffers that share the same format, you can use the same VAO for both. ...
Grass Lunatic's user avatar
-1 votes
1 answer
79 views

I’m currently studying OpenGL with ModernGL. I can render a red cube without any issues using the vertices below and assigning them to a shader program: Red Cube Rendered Here’s the code I used to ...
Gabriel Ribeiro's user avatar
0 votes
1 answer
249 views

I'm trying to make an interactive fragment shader using moderngl_window, featuring full 3D camera control. I want to do what pretty much every 3D game does - constrain the cursor to the active window, ...
Tomo's user avatar
  • 13
1 vote
0 answers
430 views

I'm trying to animate Mandelbrot set slow step-by-step appearance. Here is my approximate code for fragment shader: #version 330 uniform sampler2D previousIteration; in vec2 uv; /* from -1 to 1 */ ...
Георгий Тимофеевский's user avatar
0 votes
0 answers
327 views

So I am working on a raycasting project and first of all I need to know is how to render shader / image using GPU and moderngl on python. import moderngl def noise(size): return [(random.randint(0,...
Nikita Re's user avatar
1 vote
1 answer
2k views

I have recently been learning ModernGL with Python and Pygame. However I cannot work out how to create 2D images (a GUI) ontop of the ModernGL context (do I still use Pygame?) Before when I tried to ...
Murray's user avatar
  • 11
1 vote
2 answers
2k views

I wrote the simple program below: import pygame as pg import moderngl as mgl import sys class GraphicsEngine: def __init__(self, win_size=(1200,700)): pg.init() self.WIN_SIZE = ...
Error's user avatar
  • 9
0 votes
0 answers
370 views

I am trying to load big .png files (~10-16 MB, 14000x9600) with PIL. When I load them into a texture I can only use one color channel (I try 3 or 4 and it tells me it doesn't match in size). The part ...
Senfguerkli's user avatar
2 votes
2 answers
2k views

I'm trying to create a pygame software that utilizes shaders from ModernGL. I took the code from the following tutorial on Youtube. However, when I attempt to execute the code, ModernGL raises the ...
RandomPythonDev's user avatar
2 votes
1 answer
974 views

I recently discovered the advantages of compute shaders. However, somehow I couldn't get them to write data correctly. In the minimal example below, I want to use a compute shader to rotate the first ...
fst's user avatar
  • 53
0 votes
1 answer
803 views

I'm doing some stuff with 2D opengl rendering. Is there a way to render a vertex array object but have the data be passed through multiple shaders? For example, a shader that applies a normal map to ...
DaNubCoding's user avatar
1 vote
1 answer
351 views

I am trying to make a minimal Moderngl example of about <150 lines so I can better understand how it works. The issue here is that when I try to render this texture (it is an image of a mushroom), ...
Protolaser 28's user avatar
2 votes
0 answers
277 views

I'm getting invalid enum error using maningl. I have created an animated wave with video as texture. Code works well with a short animation of around 5 seconds. This is the result: But with more than ...
Hōgyoku's user avatar

15 30 50 per page