游戏:Borderlands

Posted in 游戏 on September 16th, 2009 by Adam

borderlands
Borderlands是一款独特的第一人称角色扮演射击游戏,它以独特的概念艺术渲染方式,通过手绘材质结合传统的虚拟现实渲染模式,勾勒出厚重而炫目的高画质游戏画面,带给你不同于传统三维射击游戏的全新视觉体验。

这款游戏是由Gearbox开发,基于Unreal Engine 3游戏引擎,(Gears of War 2战争机器二就是用的这款引擎)利用最新图形渲染技术,结合运用了diffuse, normal和specular三种材质映射,加上照明,阴影和边缘处理技术,达到令人惊叹的电影效果,是真正的三维与艺术的完美结合。
borderlandsborderlands2borderlands3

Tags: ,

老板与劣质虚拟主机

Posted in 窄多废话 on September 15th, 2009 by Adam

上个月底网站的主页被黑客添加类似这样的代码

< body >< iframe src=”http://hacker-statistic/……” width=”0″ height=”0″ frameborder=”0″ > < / iframe >

以至于被Google的安全浏览功能屏蔽,用Firefox网站无法访问。
p20090915154533

从文件权限666来看,文件可以被写入,好像是权限设置问题。但是我尝试把权限改为600,文件仍然被修改。从这里我们可以判断:是服务器的安全有问题,可以猜测是黑客在服务器上拥有写的权限。这说明什么,当然是虚拟主机提供商太劣质。但是…

老板发现后,我说明我的看法,但是老板自己认为:网页权限是666,就是是任何人都可以修改,通过网页也可以被修改。加上咨询虚拟主机提供商的意见(他们的意见和老板一致,是文件权限666造成网页被修改,而且还很善意的帮我们修改FTP密码,并提供一些安全建议,做的很全套,很有说服力),老板强烈建议我重新审视现用系统的安全性,特别注意不要设置666,不要把密码随便记录在文件中。我中肯的点点头。

作为做技术的我,我的确在权限设置上不够严谨,但是666并不是我愿意设置的,而是根据系统需要和虚拟主机上可以写文件的条件造成,要不我完全可以设置权限为660,甚至600。

我知道的原因在老板看来不是问题,或者说是不能明白。于是老板接受了虚拟主机提供商的意见。我也再次加强系统的安全防范。就这样事情慢慢被淡忘…

半个月后的今天,网站主页再次被修改。老板是乎这才明白过来,问题出在服务器上,在劣质虚拟主机提供商的身上。也许我这才可以松口气,也许我会继续郁闷与老板在技术问题的沟通上,也许我会继续争扎在是老板和劣质虚拟主机提供商的怪圈中…

后续更新2009-09-16:
老板再次提出质疑:说我的电脑是否有装防病毒软件,最好用杀毒软件杀杀毒。
真是郁闷,如果我的电脑有病毒,为什么只是那个网站有问题,而别的网站没事,那这个黑客真是好心,只黑我们一个网站的主页而已。

Tags: ,

用VC++测试OpenGL和DirectX9

Posted in VC++ on September 11th, 2009 by Adam

测试环境WinXP专业版SP3:

Microsoft Visual C++ 2008 Express Edition
Microsoft DirectX SDK (March 2009)

测试DirectX9遇到的问题:

错误:Cannot convert from ‘const char [..]‘ to ‘LPCTSTR’

Problem

This error message means that you are trying to pass a multi-byte string (const char [12]) to a function which expects a unicode string (LPCTSTR). The LPCTSTR type extends to const TCHAR*, where TCHAR is char when you compile for multi-byte and wchar_t for unicode. Since the compiler doesn’t accept the char array, we can safely assume that the actual type of TCHAR, in this compilation, is wchar_t.

解决办法
Change your project configuration to use multibyte strings. Press ALT+F7 to open the properties, and navigate to Configuration Properties > General. Switch Character Set to “Use Multi-Byte Character Set“.

错误:Error LNK2019: unresolved external symbol _Direct3DCreate@4 referenced in function “long_cdecl InitD3D(struct HWND__*)”(?InitD3D@@YAJPAUHHWD__@@@Z)

解决办法
确保DirectX SDK安装正确,检查下列路径:
Tools->Options->Projects and Solutions->VC++ Directories.
Under the selection box “Show Directories For”, select “Library Files” and check the directory “C:/DXSDK/Lib”;
then the same for “Include Files” and check “C:/DXSDK/Include”.

然后

Those are linker errors, not compiler errors, so they don’t involve missing headers.
You need to link to the appropriate DirectX import libraries.
when you make a project, select Project->Properties->Linker->Input, and under Additional Dependencies, enter these items separated by a space: d3d9.lib d3dx9.lib“;

或者可以直接在源文件里加入
#pragma comment(lib, “d3d9.lib”)
#pragma comment(lib, “d3dx9.lib”)
#pragma comment(lib, “dxerr9.lib”)

测试OpenGL遇到的问题:

Problem:

error LNK2019: unresolved external_ Help me please

LNK2019: unresolved external symbol _gluPerspective@32 referenced in function

Add “opengl32.lib glu32.lib glaux.lib” to Project Properties->Configuration Properties->Linker->Input->Additional Dependencies.

LNK1104: cannot open file ‘glaux.lib’

r u running VS2008?
if so, just remove glaux.lib from the link inputs.

Tags: , , , ,
RSS Feed