Hi, I wrote some code using pygame that has two images. I am trying to figure out how transparency works, so I have tried to display a circle png on a square png. My code looks like this. import pygame from pygame.locals import * #make window pygame.init() screen = pygame.display.set_mode((1270, 790), pygame.FULLSCREEN) pygame.display.set_caption('Pygame Caption') #load images backg = pygame.image.load('backg.png') circle = pygame.image.load('circle.png') #attempt to add transparency circle = circle.convert() circle = circle.convert_alpha() while True: #close program withescape key for event in pygame.event.get(): if (event.type == KEYDOWN): print event if (event.key == K_ESCAPE): done = True #blit image to screen screen.blit(backg, …

Member Avatar
Member Avatar
+0 forum 4

I am wondering how to perform a 2D image blit with openGL. I used to use SDL and it was easy, but with opengl I end up making a rectangle with texture coords that is sunk a little into the screen. Is there any way to perform a 'real' blit? void blitImage(unsigned int glTex, int top, int left) { //what do I do? }

Member Avatar
Member Avatar
+0 forum 3

The End.