| Thanks Nobuyuku – I already tried that, but still had some problems. However, it works now. 
 I added the following function to mojo2.graphics:
 
 
Function ReInitVbos:Void()
	glBindBuffer GL_ARRAY_BUFFER,rs_vbo
	glEnableVertexAttribArray 0 ; glVertexAttribPointer 0,2,GL_FLOAT,False,BYTES_PER_VERTEX,0
	glEnableVertexAttribArray 1 ; glVertexAttribPointer 1,2,GL_FLOAT,False,BYTES_PER_VERTEX,8
	glEnableVertexAttribArray 2 ; glVertexAttribPointer 2,2,GL_FLOAT,False,BYTES_PER_VERTEX,16
	glEnableVertexAttribArray 3 ; glVertexAttribPointer 3,4,GL_UNSIGNED_BYTE,True,BYTES_PER_VERTEX,24
	glBindBuffer GL_ELEMENT_ARRAY_BUFFER,rs_ibo
End
 (I call this function before I start 2D rendering using mojo2 commands.)
 
 When rendering 3D content into an image I also noticed that in this case there was no depth buffer. So I added this
 
 
Local depth_rb:=glCreateRenderbuffer()
glBindRenderbuffer(GL_RENDERBUFFER, depth_rb)
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, _width,_height)
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depth_rb)
 to mojo2.graphics.Texture.Init() (before the call to glPopFramebuffer). This code adds a render buffer to Textures used as render target.
 
 
 |