Coloured edge with OpenGL

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
fortikur
Posts: 25
Joined: Tue Nov 15, 2005 3:59 pm
Location: Hungary

Coloured edge with OpenGL

Post by fortikur »

I modified the "Render to texture" tutorial like this:

Code: Select all

	video::ITexture* mirr = driver->getTexture("mirrorbgr.bmp");

	while(device->run())
	if (device->isWindowActive())
	{
		driver->beginScene(true, true, 0);


		if (rt)
		{
			// draw scene into render target
			
			// set render target texture
			driver->setRenderTarget(rt, true, true, video::SColor(0,0,0,255));     

			// make cube invisible and set fixed camera as active camera
			test->setVisible(false);

			driver->draw2DImage(mirr, core::position2d<s32>(0,0),
				core::rect<s32>(0,0,256,256), 0, 
				video::SColor(255,255,255,255), true);
So, now I can have a background on the reflecting cube's surface.
My problem is, that if i use the OpenGL renderer, there is a blue line that appears on the edges (color resulting from the rendertarget line). If i use Software renderer the result is ok.
I tried with different texture sizes, but the result is the same.

I remember reading about this 2 years ago in the OpenGL forums. I think there was something about geometry. (I've never had this problem, even though I created some mirrors using plain OpenGL)

How can i make this edge disappear?
fortikur
Posts: 25
Joined: Tue Nov 15, 2005 3:59 pm
Location: Hungary

Post by fortikur »

Yeah. It really looks like a GL_CLAMP bug.
Looked up in the Opengl forums and searched in my old engine code and found it.
Post Reply