unimplemented_methods_linux.diff

implementation of getCurrentScreenMode() and adding some TODO - kishan, 01/11/2009 08:20 pm

Download (2.5 kB)

nel/src/3d/driver/opengl/driver_opengl.cpp (copie de travail)
389 389

390 390
	_CurrentMaterialSupportedShader= CMaterial::Normal;
391 391

392
	// to avoid any problem if light0 never setuped, and ligthmap rendered
392
	// to avoid any problem if light0 never setted up, and ligthmap rendered
393 393
	_UserLight0.setupDirectional(CRGBA::Black, CRGBA::White, CRGBA::White, CVector::K);
394 394

395 395
	_TextureTargetCubeFace = 0;
......
1653 1653
	mode.Width= (uint16)devmode.dmPelsWidth;
1654 1654
	mode.Height= (uint16)devmode.dmPelsHeight;
1655 1655
#else
1656
	nlwarning("LINUXTODO: enumerate all available modes. now returns empty array");
1656
#	ifdef XF86VIDMODE
1657
	sint pixelClock ;
1658
	XF86VidModeModeLine xmode ;
1659
	
1660
	if (!XF86VidModeGetModeLine(dpy, 0, &pixelClock, &xmode))
1661
	{
1662
		nlwarning("XF86VidModeGetModeLine returns 0, cannot get current video mode");
1663
		return false;
1664
	}
1665
	
1666
	mode.Windowed = !_FullScreen ;
1667
	mode.OffScreen = false ;
1668
	mode.Depth = (uint) DefaultDepth(dpy, DefaultScreen(dpy));
1669
	mode.Frequency = 1000 * pixelClock / (xmode.htotal * xmode.vtotal) ;
1670
	mode.Width = xmode.hdisplay ;
1671
	mode.Height = xmode.vdisplay ;
1672
	
1673
	nldebug("Current mode : %dx%d, %d Hz, %dbit", mode.Width, mode.Height, mode.Frequency, mode.Depth) ;
1674
	
1675
#	endif
1657 1676
#endif
1658 1677
	return true;
1659 1678
}
......
2097 2116
		nlinfo("3D: Switching back viewport to %d,%d",_OldX, _OldY);
2098 2117
		XF86VidModeSetViewPort(dpy, DefaultScreen(dpy), _OldX, _OldY);
2099 2118
		// Ungrab the keyboard (probably not necessary);
2100
        XUnmapWindow(dpy, win);
2119
		XUnmapWindow(dpy, win);
2101 2120
		XSync(dpy, True);
2102 2121
		XUngrabKeyboard(dpy, CurrentTime);
2103 2122
	}
......
2505 2524
	*/
2506 2525

2507 2526
#elif defined (NL_OS_UNIX)
2508

2527
	nlwarning("LINUXTODO: This method is not implemented under linux") ;
2528
	// TODO for Linux : implement it (clipRect with the window dimensions ?)
2509 2529
#endif // NL_OS_UNIX
2510 2530
}
2511 2531

......
3027 3047
		// try to read the good value from windows
3028 3048
		return ::GetDoubleClickTime();
3029 3049
#else
3030
		// FIXME: FAKE FIX
3050
		// TODO for Linux FIXME: FAKE FIX
3031 3051
		return 250;
3032 3052
#endif
3033 3053
}
......
3137 3157
	}
3138 3158

3139 3159
#else
3140

3160
	// TODO for Linux: implement CDriverGL::setMonitorColorProperties
3141 3161
	nlwarning ("CDriverGL::setMonitorColorProperties not implemented");
3142 3162
	return false;
3143 3163

......
3907 3927
			}
3908 3928
			RegCloseKey(parentKey);
3909 3929
		}
3930
	#else
3931
		// TODO for Linux: implement retrieveATIDriverVersion... assuming versions under linux are probably different
3910 3932
	#endif
3911 3933
}