Hi thank for your help, after some playing around I seem to have realized the stips until stiching… But I am not able to programm the shader to do the correction. Do you have any suggestions how this could be realized easily. Below you find my current source code (Python)…
I am drawing a large vertex array where half of the quads are filled with one texture while the others are filled with another…
This is done 4 times for each camera orientation.
def DrawGLScene():
global texture, go,position
i = 3
for ang in [0,90,180,270]:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # Clear The Screen And The Depth Buffer
glLoadIdentity()
glRotatef(ang,0,1,0)
glTranslate(0,0,-position)
if texture:
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D,1)
glDrawArrays(GL_QUADS, 0, 800)
if texture:
glBindTexture(GL_TEXTURE_2D,2)
glDrawArrays(GL_QUADS, 800, 400)
glBindTexture(GL_TEXTURE_2D,i)
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 1024, 768, 0)
i+= 1
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # Clear The Screen And The Depth Buffer
glLoadIdentity()
i = 3
for x in [-0.5, -0.25, 0, 0.25]:
glBindTexture(GL_TEXTURE_2D,i)
glEnable(GL_TEXTURE_2D)
glBegin(GL_QUADS)
glTexCoord2f(0, 0); glVertex3f(x, -0.25/2,-0.5)
glTexCoord2f(1, 0); glVertex3f(x+0.25, -0.25/2,-0.5)
glTexCoord2f(1, 1); glVertex3f(x+0.25, 0.25/2,-0.5)
glTexCoord2f(0, 1); glVertex3f(x, 0.25/2,-0.5)
glEnd()
glDisable(GL_TEXTURE_2D)
i+=1
glutSwapBuffers()
glutPostRedisplay()
if go:
position += 0.1
if position > 54:
position = 50
Thanks,
Armin