Creative Commons License
本Blog采用 知识共享署名-非商业性使用-禁止演绎 3.0 Unported许可协议 进行许可。 —— Fox <游戏人生>

游戏人生

游戏人生 != ( 人生 == 游戏 )
站点迁移至:http://www.yulefox.com。请订阅本博的朋友将RSS修改为http://feeds.feedburner.com/yulefox
posts - 62, comments - 508, trackbacks - 0, articles - 7
共3页: 1 2 3 
创建一个渲染目标,显示后,会有黑底,可以置混合模式让它透明,但是,我显示的黑色字体也被过滤掉不显示了.. 请问还有什么办法让渲染目标透明而黑色的文字能正常显示呢?
不知道楼主还看不看这篇文章,我想请教一个问题,是这样的,我的模型坐标很大,如何让模型绕中心轴旋转呢?因为如果只是Rotatef(angle,0,1,0)这样的话,模型一旋转就没有了。
ggeSprite调用SetTextureRect设置了显示区域,然后如果不SetPosition设置渲染位置的话,显示出来的效果就变成了拉伸缩放,且显示区域也不是设置的Rect,而是原来的大小。不知是不是BUG
当创建引擎时,如果传入的窗口宽度小于三个控制按钮(最小钮+最大钮+关闭钮)的宽度会出现一件神奇的事情,您可以测试一下。
@kuyu
有。易语言论坛曾经有人发布过
New version of WTL will be 9.0

Download current build WTL 9.0.4035 (1/4/2014)
天生不支持xp,这是基于什么考虑呢
re: 备忘录模式[未登录] fox 2011-11-25 10:19
挺好的,请问博文你这个UML是用啥画的?
没有具体测试过,fwrite用于写结构、二进制数组,可以参考w.r.stevens在apue(5.9, p145)中关于fwrite的描述。
我照抄了,编译通不过啊
re: Autotools初体验 Fox 2009-12-24 10:52
@饭中淹
这套工具现在对于我更多的是一个学习和试验,如果希望和别人交流和共同开发跨平台(尤其是non-win)的代码的话,由于需要对依赖库进行检测,这个工作可以由autoconf+automake来完成。
re: Autotools初体验 Fox 2009-12-23 09:04
In practice, CMake not only lacks a rich platform tests suite, compared to autoconf, it also lacks a lot of features from automake and libtool.

So why should you not switch an autotools-based project over to CMake?

Tedious
First and foremost, your configure.ac script may be large. Porting to CMake can be a time consuming and not so funnny task when it comes to the long tail.
iconv support missing
There are no standard tests for iconv(), neither for finding the compiler flags, nor whether it takes a const pointer.
pkg-config support broken
pkg-config support is reportedly broken as of cmake 2.4 patch 8.
Exported symbols list not implemented
There are no documented ways to specify the list of exported symbols for a shared libraries, so your libraries will unconditionnaly expose all their non-static APIs (libtool can use a flat list or a regular expression).
C99 compiler check missing
There is no built-in support to enable C99 support in the C compiler.
Objective-C flags not supported
You can add flags for the Objective-C compiler, but they propagate to C compilation as well.
Compiler feature checks missing
There are no built-in checks for any of the C99 features, such as variable-sized arrays, restricted pointers, macros with variable number of arguments, etc. nor for GCCisms.
Monolithic installation prefix
There is only one global installation prefix. So the typical Linux distro cannot set the global prefix to /usr while the system configuration (automake's sysconfdir) would be /etc. Very nice for "downstream" Linux packagers...
Installation paths hard-coding
As a consequence of the single prefix, you need to hard-code all paths from the prefix. Instead of ${docdir}, you need to hard-code ${prefix}/share/doc/${package} (${CMAKE_INSTALL_PREFIX}/share/doc/foobar in CMake parliance) and so on and so forth. BSD porters are going to have fun tweaking the paths manually...
Uninstallation not supported
There is sipport for uninstalling. That is a design choice. You'd better never ever try to install a package straight from the build tree, without a proper packaging system.
Installation testsuite not supported
Since there is no uninstallation, there is no of course no distcheck target either. How often did you get your source tarball right from the first attempt before a new release?
No cross-compilation
There is no documented support for cross-compilation. This is scheduled for a future release.
Limited documentation
Compared to autotools, the documentation feels a bit light. At least, there is a wiki, but that cannot replace a good offline reference.
Limited executable renaming
CMake is not quite as powerful as automake (with program-prefix, program-suffix and program-transform-name) when it comes to on-the-fly executable renaming. This little-known feature of automake can be extremely useful when building an operating system distribution with possibly conflicting executable names from different projects. For instance, it is very conveniant along with the Debian alternatives system.
No source tarball packaging
There is no built-in support for making a tarball (make dist). Some Version Control Systems can do it themselves (git does, Subversion does not). This is quite critical a feature for open-source projects.
No source tarball testing
As there is no replacement for make dist, there is no replacement for make distcheck either. From my not-so-humble experience, that is tremendously useful before doing a new release. (NOTE: when I write distcheck, I mean distcheck. I don't mean check which becomes test with CMake)
No gettext integration
Gettext is not supported. Targets for .po and .mo files must be added manually. Nevermind that this is the most widely used localization subsystem in the open-source community.
Awkward feature listing
Whereby ./configure --help gives the list of build option, cmake --help prints the CMake options only. Instead, it seems you have to run cmake in "interactive" mode and answer a question for each and every setting (much like Linux kernel make config).
---------------------------
当然这些问题对于我不是必需的,不过还是等我autotools用一段时间再说:)
三更半夜的上来看一下,这两天被蹂躏安逸了……
re: 如何产生随机数 Fox 2009-12-08 00:18
<style type=text/css>
#top a{ border-bottom:1px dashed; color:white; }
#top a:link{ border-bottom:1px dashed; color:white; }
#top a:hover{ border-bottom:1px dashed; color:white; }
#top a:visited{ border-bottom:1px dashed; color:white; }
.post a:link{ border-bottom:1px dashed; color:maroon; }
.post a:hover{ border-bottom:1px dashed; color:maroon; }
.post a:visited{ border-bottom:1px dashed; color:maroon; }
.postbody a{ color:white; background:maroon; }
.postbody a:link{ color:white; background:maroon; }
.postbody a:hover{ color:white; background:maroon; }
.postbody a:visited{ color:white; background:maroon; }
</style>
@adah
给个链接我了解一下DCL被批的原因吧,我承认孤陋寡闻了。
@Peter
对不起,是我自己学艺不精:-),DOXYFILE_ENCODING只是配置文件的编码格式而已,而识别中文文档只需要修改INPUT_ENCODING成EUC-CN即可,OUTPUT_LANGUAGE自然设置成Chinese也不会有问题,因为doxygen采用UTF-8输出,使用中文输出不会有乱码问题。
也就是说,对于你而言,DOXYFILE_ENCODING可以保持UTF-8,只是把INPUT_ENCODING改成EUC-JP(或者你用的其他编码)即可。
re: ACE之Cygwin vs Win Fox 2009-08-24 13:21
@阿福
没有,记得一个家伙说过:过分依赖ide是一个不好的习惯。想想在cygwin下装B就装到底算了。
re: ACE之Cygwin vs Win Fox 2009-08-24 13:19
@true
看了一下config-win32.h,这个宏前后都不会有影响,不过统一放在前面的话,是一个好的习惯,还是改过来了,3X
重载NEW唯一坏处是线程不安全。
不用线程,只是select轮询又如何?不见得性能很差。
@叶先生
你给的第一个的例子并不太合适,阻塞实际是指因继续执行的条件不满足(事件未到达)而挂起等待,test1实际并未挂起,只是一直在执行一个空循环而已。
test2只是 多了一个DoEvent,如果讨论同步还是异步,实际要视DoEvent而定,若DoEvent像你所说,那可以作为异步看待,如果DoEvent阻塞等待事件到来,则成了同步,但这都与你给的循环没有关系。

至于你说test1会“卡死”,那是因为单线程的话,需要不停的执行循环,但没有阻塞,因为循环一直在跑:)
呵呵,我也同意算上空行和注释等。

这个不用这么较真儿吧?
麻烦大家“阅读全文”后回复,谢谢:D
很诱人的功能,先MARK一个,明天好好研究研究:D
并不是所有基类的析构都要virtual的,此例即不需要,因为这儿的析构是trivial的,推荐阅读lippman的<inside the c++ object model>.

re: 让人无语的boost Fox 2008-10-15 12:04
你停太久了……
呵呵,整理的不错:)
re: 日志该这么记录 Fox 2008-10-10 14:55
@阿福
这个是成员函数,所以后面加了;这儿没有上下文,去掉更好理解了。
前面加是笔误:)。
@Condor
你说的这个问题我也考虑了,既然被提到,可以查看新一篇:http://www.cppblog.com/Fox/archive/2008/10/10/63625.html
@sl
我在上面提到“我们说某某操作是非阻塞的,是因为操作结果会通过异步方式返回”,Douglas说的是there is no async processing if without a proper configuring,意思是:

非阻塞之后可以不做异步处理。

但非阻塞和异步仍然是紧密联系而非区别非常大。
Douglas这本书我手头现在没有:(,翻了一下adv. pro. in UNIX,没有看到详细说明:(。
@LOGOS
你说的对,但如果说“非阻塞的东西不一定会给你回调通知”,那么这时候在所阻塞和非阻塞也就没有意义了,既然不需要回调/事件通知或其他任何形式的回馈,也就没有阻塞的意义了,就是普通调用,无所谓阻塞不阻塞了,对吧?
select在等待时间timeout>0的情况下是阻塞的,这时才有你所说的同步。
如果timeout==0,才是非阻塞的,有无数据都是立即返回,自然没有同步问题。
非常感谢
比如发送缓冲区中一段数据(一个整型数:0x0A0B0C0D),最合适的发送方式当是从低址到高址顺序发送,接受也将是顺序接收到0A,0B,0C,0D这样,big-endian正是这种顺序。
空格,呵呵,谢谢提醒!:D
构造失败主要是指new失败,所以前面也有说不要让构造函数做太复杂的事情,可以专门用一个Init去做,抛不抛异常,用哪个版本的new,关键在于对象构造失败之后,使用的时候如果不做检测会造成代码崩溃,即使检测出构造失败,也无法继续执行,还是要像处理异常一样解决问题。
stl之所以会将所有实体的定义和实现置于std命名空间下,正是为了避免出现命名冲突(string\map\vector\list等等),如果使用了using或前置声明之类,效果等同于将其纳入当前命名空间,所以说会导致不明确的行为,命名冲突、不可移植,不知道你同意否?
恩,看过这个指南之后,感觉是因为Google的项目中大多没有使用高级C++特性,所以对于很多特性都是尽量避免使用,对于自己开发的项目制定一个自己的风格,大家一起遵循,也基本是从软件工程的角度,我比较赞成在底层模块中使用,上层逻辑可以少用即可。
re: 日志该怎么记录? Fox 2008-07-18 15:20
@LOGOS
事实上,在没有dump的时候,我都是从日志找bug的。
re: 日志该怎么记录? Fox 2008-07-18 12:36
我日......你
这一点在下一篇C++特性中有对禁止使用C++异常的说明,不仅仅是针对构造函数,是针对整个coding。
不管怎么说,都只是一种编程约束,有利必有弊,感觉更多是从软件工程的角度给出的约束。
Fn = (phi^n)/(5^(1/2)), phi = 1/2(1+(5^(1/2))).
——计算机程序设计艺术. 第一卷. sec. 1.2.8
我对小波的了解也只是皮毛,是不是变换层数少了的原因呢?
瞎猜的。

但绝不是小波变换的一点瑕疵;)多半是重构时的问题。
Oh, my God...
哦,俄滴聖啊...
Sorry,我以为都必须放在首页#--"
谢谢提醒;)
是的,debian是GNU的一款Linux,ubuntu据说就是基于debian的。我也是刚开始用,主要是为了学习一下Linux的使用;)
re: Api Hook 细析(一) Fox 2008-05-15 20:37
為什么我的評論沒了??強烈抗議!!
看来,这一块的东西,我又可以偷偷懒,直接请教你了;)
共3页: 1 2 3