freeglut

Transparent textures being rendered as black in OpenGL

Transparent textures being rendered as black in OpenGL Question: I have a texture with transparent parts, but instead of being rendered transparent they’re black. To test if the RGBA values get passed on correctly to the shader, I made everything render in greyscale. And as I thought the alpha values weren’t getting passed on correctly. …

Total answers: 1

Why do objects in my window sometimes disappear and reappear?

Why do objects in my window sometimes disappear and reappear? Question: The objects in my window sometimes disappear and reappear. This mainly happens when resizing the window. I suppose this is because my two methods conflict with each other with the glutMainLoopEvent() function. I create the window like this: def create_display(self, window_name): glutInit() glutInitDisplayMode(GLUT_RGBA) # …

Total answers: 1

My texture is being displayed as completely black in pyOpenGL

My texture is being displayed as completely black in pyOpenGL Question: I was trying to display a texture in pyOpenGL with the following methods. Instead of the texture being rendered correctly, the entire object was black. The texture is being loaded with PIL in an RGBA format. I try to load in the texture using …

Total answers: 1

glDrawElements method not drawing with indices and vertices

glDrawElements method not drawing with indices and vertices Question: My desired output of my program would be a simple quad being drawn onto the screen, instead nothing is being drawn on my screen. The relevant methods of my program are below. What is wrong in my code causing this issue? I’m trying to draw a …

Total answers: 2

Does glBufferData need a Buffer object as the 'data' parameter?

Is the last parameter of glVertexAttribPointer a '0' or 'None'? Question: I am trying to setup a simple 3D Engine in pyOpenGL. My current goal was to achieve a 2D rectangle being displayed to the screen, which isn’t working at all. (nothing is being rendered to the screen, no exception is being thrown by the …

Total answers: 1