- 博客(1020)
- 资源 (11)
- 问答 (2)
- 收藏
- 关注

原创 此博客永久停止更新,我的独立博客:dawnarc.com
告知:此博客永久停止更新,以后的文章只会更新到我的独立博客:https://dawnarc.com(2016-05-26夜晚·记)===============================================介绍两个静态页面博客框架:hexo和hugoHexo源码:https://github.com/hexojs/hexo官网:http...
2016-03-31 00:22:26
318
原创 [C++]比memcpy快50%的FastMemcpy
云风老大用汇编实现的一个高效memcpy,号称比传统memcpy快50%FastMemcpyhttps://github.com/skywind3000/FastMemcpy/blob/master/FastMemcpy.h#L580 不过VS2015编译器中已经做了类似的优化。...
2016-05-26 13:03:39
3809
2
原创 [UE4] C++实现Delegate Event实例(例子、example、sample)
相关文章:如何用蓝图实现Delegate Event:http://aigo.iteye.com/blog/2269663 原文作者:@玄冬Wong转载请注明出处:http://aigo.iteye.com/blog/2301010 虽然官方doc上说Event的Binding方式跟Multi-Cast用法完全一样,Multi-Cast论坛上也有很多例子,但是实际是...
2016-05-26 10:33:18
912
原创 VS2015 update2 eng iso(英文版镜像文件官方下载地址)
Download Microsoft Visual Studio 2015 Update 2 [Web Installer]Download Microsoft Visual Studio 2015 Professional 14.0.25123.0 with Update 2 [Web Installer]Download Microsoft Visual Studio 2015 P...
2016-05-24 22:49:53
1496
原创 [UE4]Fog Of War(战争迷雾)教程
[TUTORIAL] Fog Of Warhttps://forums.unrealengine.com/showthread.php?55650-TUTORIAL-Fog-Of-War
2016-05-24 21:08:52
4833
原创 protobuf C++生成代码中使用自己定义类型参数时的set问题
如果proto结构体的变量是基础变量,比如int、string等等,那么set的时候直接调用set_xxx即可。如果变量是自定义类型,那么C++的生成代码中,就没有set_xxx函数名,取而代之的是三个函数名:set_allocated_xxx()release_xxx()mutable_xxx()使用set_allocated_xxx()来设置变量的时候,变量不能...
2016-05-23 22:11:33
1418
原创 [UE4]FSocket client客户端如何检测与server服务端断开链接
目前FScoket无法做到感知服务端关闭tcp链接,要做到只能通过两种其他方式:1,使用BSD socket(建议使用non-blocking mode,因为这样方便终止接收线程);2,客户端发送心跳包给服务端,如果没有得到回应则认为关闭。 下面方法仅适用于客户端自己关闭连接,如果是服务端关闭是没法感知的if (Socket->GetConnectionState()...
2016-05-23 11:32:46
1882
原创 各个编程语言都无法表达出非2的幂的float型变量的问题
原文:http://stackoverflow.com/questions/588004/is-floating-point-math-broken 表现:0.1+0.2==0.3->false0.1+0.2->0.30000000000000004Any ideas why this happens? 回答1:Binary floating po...
2016-05-21 21:53:04
300
原创 比memcpy更快的内存拷贝:用赋值代替循环拷贝
原文是出自百度空间,百度空间早已关闭,所以原文出处无法查询了 相关衍生:怎样写出一个更快的 memset/memcpy ?https://www.zhihu.com/question/35172305 以下内容转自:http://www.cnblogs.com/GoodGoodWorkDayDayUp/archive/2010/10/15/1852251.html...
2016-05-21 12:40:46
4050
原创 C++ 实现把非静态成员函数作为回调函数(非static)
C++ Thunk方式:https://blog.twofei.com/616/ 自定义代理类方式:原文:http://qimo601.iteye.com/blog/1727645CallbackProxy.h#ifndef __CALLBACK_PROXY_H__#define __CALLBACK_PROXY_H__ //Tobject:调用对象的...
2016-05-20 12:33:44
697
原创 [C++]MFC使用CFile读写Unicode字符集文件(文件头缺失导致乱码)
原文:http://blog.csdn.net/augusdi/article/details/8961008写入Unicode文本时,要在文件头部加入Unicode文本标志0XFEFF。#include <stdio.h>#ifndef _UNICODE#define _UNICODE //使用UNICODE编码#endif#...
2016-05-19 21:19:52
941
原创 Dlang IDEs
https://wiki.dlang.org/IDEs IDEs Integrated development environments with D support.NamePlatformsCommentsVersionLast known activityCoeditWindows, LinuxProjects, DUB ...
2016-05-19 14:47:42
643
原创 [UE4]Actor初始化时相关的父类函数
AActor::PreInitalizeComponents - Called before components of the actor are initialized AActor::PostInitalizeComponents - Called after every Component is initialized AActor::PostInitProper...
2016-05-14 17:16:36
638
原创 C++ fopen、CFile如何以UTF-8编码格式读写文件
How to write UTF-8 file with fprintf in C++http://stackoverflow.com/questions/10028750/how-to-write-utf-8-file-with-fprintf-in-c ou shouldn't need to set your locale or set any special mode...
2016-05-13 22:17:32
12473
原创 [UE4]UMG设置组件自适应居中或靠边
比如你的UI中有些组件需要居中显示,有些需要始终在右上角并且与上边框和右边框保持固定的距离等等,对于这种需要动态适应屏幕分辨率的UI组件,有两种设置方式:1,直接编辑组件的属性Anchors 2,代码控制ULoginWidget* LoginUI = NULL; //创建UI的逻辑省略if (UImage* backImg = Cast<UImage>...
2016-05-11 13:22:43
4874
原创 [UE4]引擎自身提供的无锁队列等无锁容器(TLockFreePointerList)
常用的接口:TLockFreePointerListFIFO<T>:先进先出;TLockFreePointerListLIFO<T>:后进先出;TLockFreePointerListUnordered<T>:看注释是说这个List内部元素是无序的,但效率比前面两个更高。 注意:如果你的元素是一个指针,比如A* val,那么模版名只...
2016-05-07 16:57:48
1198
原创 [UE4]如何跨线程访问GameThread中的数据
UE4中如果在自己创建的FRunnable线程中取访问引擎相关的API,比如你想在非GameThread中创建UI,运行时UE4时会给assert错误:Assertion failed: IsInGameThread() [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Slate\Public...
2016-05-07 15:43:39
3188
原创 [UE4]性能优化工具(Profiler Tool)
Profiler Tool Referencehttps://docs.unrealengine.com/latest/INT/Engine/Performance/Profiler/index.html 原文:https://www.unrealengine.com/zh-CN/blog/how-to-improve-game-thread-cpu-performance...
2016-05-07 15:28:12
2499
原创 std::shared_mutex和std::mutex的性能对比(banchmark)
原文作者:@玄冬Wong转载请注明原文出处:http://aigo.iteye.com/blog/2296462key world: std::shared_mutex、std::mutex、performance、benchmark、性能测试 shared_mutex的适用场景比较特殊:一个或多个读线程同时读取共享资源,且只有一个写线程来修改这个资源,这种情况下才能从shar...
2016-05-06 23:39:18
1549
1
原创 [UE4]UMG widget构造初始化函数中获取其内部组件
原文作者:@玄冬Wong目的:在自定义的Widget初始化完毕后,获取其内部的button、combo等UMG组件的C++指针。 这里我们新建了一个C++类,LoginWidget,继承自UserWidget,然后新建了一个Widget蓝图LoginWidgetBP,继承自LoginWidget C++ class。我们想在这个LoginWidgetBP蓝图被实例化之后,获取这个U...
2016-05-05 23:10:39
4120
原创 [UE4]C++UI组件Slate教程
官方文档:Slate, Hellohttps://wiki.unrealengine.com/Slate,_Hello Slate Widget Exampleshttps://docs.unrealengine.com/latest/INT/Programming/Slate/Widgets/ Slate Tutorialhttps://forums.un...
2016-05-05 19:40:45
1123
原创 [git]更新submodule报错:submodule update error: pathspec did not match any file(s) k
更新submodule的时候报错:submodule update error: pathspec did not match any file(s) known to git. 原因不清楚,重新添加一次submodule就正常了,命令:git submodule add -f URL-of-submoudle path/of/submodule ...
2016-05-05 13:07:54
2777
原创 TortoiseGit对submodule进行commit、push的问题:Current HEAD Detached
如果提交submodule的时候提示这个信息:Current HEAD Detached,说明submodule已经和远程仓库脱离开了,如果你submodule中有未提交的改动,一定要手动备份下。 然后在submodule所在的目录下,右键-》TortoiseGit-》switch/checkout-》Branch选择:Master,然后点击确定,然后再在当前submodule下进...
2016-05-04 23:34:26
2826
原创 [UE4] 设置UMG的ComboBox(String)字体大小
UMG自带ComboBox组件没有提供直接的属性来修改其字体大小,只能自己做一个列表类型的widget然后再塞进ComboBox中,相当于从头定义一个类似combox的widget,当完全由你重新定义的时候,可以修改的不只是字体大小了。下面教程以修改字体大小为例: 图文教程How do I set the font size of the UMG ComboBox (String...
2016-05-04 08:18:38
2207
原创 [UE4]性能优化之:如何减少drawcall
Using Instanced Meshes doesn't reduce draw calls原文:https://answers.unrealengine.com/questions/127435/using-instanced-meshes-doesnt-reduce-draw-calls.html epic工程师的回答:Instanced meshes will r...
2016-05-03 20:02:50
3585
原创 [UE4]如何查看drawcall实时统计
命令行(按下波浪键)输入:stat SceneRendering 更多stat命令说明:Stat Commandshttps://docs.unrealengine.com/latest/INT/Engine/Performance/StatCommands/
2016-05-03 19:59:40
6456
1
原创 [UE4]protoc生成的代码编译问题:error LNK2019: unresolved external symbol "public: __cdec
ue4工程编译时,如果只是将protobuf.lib链接进来,不加入protoc生成的代码,那么编译时没有问题的,但是如果加进来了,那么就跪了:error LNK2019: unresolved external symbol "public: __cdecl 。。。" 之前这个问题没想明白,以为可以通过设置工程来解决这个错误,后来想了想,protoc生成的代码都是标准c++代码...
2016-05-03 12:26:44
898
原创 [cmake 3.5]使用自身集成的FindProtobuf来生成并构建proto代码
使用FindProtobuf,可以不用手动执行protoc命令,nmake的时候自动去执行protoc,然后再编译链接生成静态库。如果proto文件之间有相互引用(使用了import),貌似会有问题,这个不知道当前版修复没,后面有空再测。 目录结构:/proto-build |—— build/ #empty, used for cmake b...
2016-05-03 12:26:05
2076
原创 [windows bat]如何在一行命令中执行多个命令
How to run two commands in one line in Windows CMD?http://stackoverflow.com/questions/8055371/how-to-run-two-commands-in-one-line-in-windows-cmd 例子:cmd /c "echo foo & echo bar" ...
2016-05-03 12:25:49
5841
原创 [cmake]如何在cmake生成完毕后自动执行其他命令,比如nmake
CMakeLists.txt中添加配置:add_custom_command 官方文档:https://cmake.org/cmake/help/v3.5/command/add_custom_command.html参考:http://stackoverflow.com/questions/15115075/how-to-run-ctest-after-build...
2016-05-02 13:18:25
4713
原创 [windows bat]如何启动一个新的cmd窗口并在其内执行命令
两种方式:1,start cmd /k echo Hello, World! 2,start cmd /C pause 区别是第二种执行完毕以后,新开的窗口会自动关闭,第一种则不会参考:http://stackoverflow.com/questions/9392874/bat-file-open-new-cmd-window-and-enter-code-...
2016-05-02 13:15:17
29924
2
原创 [windows bat]如何启动某一个bat后让当前cmd窗口不关闭
用start命令执行操作后,start所在的窗口会自动关闭,如何启动其他bat之后,初始cmd窗口不关闭?方式如下:例子1启动脚本start.bat内容如下:cmd /k "C\MyPath\TEST.BAT" 这样运行TEST.bat之后,start.bat所在的cmd窗口不会自动关闭。参考:http://stackoverflow.com/questions/8...
2016-05-02 13:09:10
3759
原创 [cmake 2.x]解析protobuf模版(*.proto)并构建其C++代码
有两种方式,一种是使用cmake自带的FindProtobuf module,这个模块内部集成了生成代码命令的操作,用起来最方便;另外一种是将protoc命令集成到CMakeLists.txt中,这种要麻烦点。 自带的FindProtobuf方法如下:使用cmake自带的FindProtobuf解析protobufhttp://www.leoox.com/?p=285...
2016-05-02 11:34:20
392
原创 [cmake]示例:构建引用了protobuf第三方库的工程
演示下cmake如何构建引用了第三方库的C++工程,这里第三方库已protobuf-lite为例。 1,我们用protobuf生成一个简单的c++代码,模版文件如下,test.proto:package HProtocol;option optimize_for = LITE_RUNTIME;message add { required int32 val ...
2016-05-02 08:55:53
2818
原创 [VC++]release版本编译输出的文件比debug版本体积大的原因
原因:多半是因为release模式下开启了全程序优化(/GL),这个选项默认是关闭的。 关闭方法:工程Properties -》 Configuration Properties -》 C/C++ -》 Optimization -》 Whole Program Optimization设置为 No ...
2016-05-01 18:49:19
714
原创 [cmake]windows下构建简单入门示例
1,编写C++代码app.cpp: #pragma once#include <cstdio>int main(char** args, int size){#ifdef _DEBUG printf("debug\n");#endif#ifdef NDEBUG printf("release\n");#endif retu...
2016-05-01 16:48:23
680
1
原创 [C++]如何判断exe和dll文件是debug还是release编译生成的
用depends工具查看:debug模式的dll和exe,VCRUNTIME.DLL文件名后面多一个字母D;release模式下则没有D。x64架构的dll和exe,图标右边都有一个“64”字样的小图标;x86架构的图标右边是空白。 debug x86 debug x64 release x86 release x64 ...
2016-05-01 15:43:50
2744
原创 cmake常见错误
错误:D:\Program_Filesx86\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(17): error C2061: syntax error: identifier 'noexcept'D:\Program_Filesx86\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(17): er...
2016-05-01 15:07:08
1094
原创 [cmake]如何设置Debug和Release编译模式
一般Debug和Release必须在不同的目录下编译,否则每次当切换模式时必须把编译文件全部删掉。这里假设新建两个目录Debug和Release来分别用于构建相应的模式:mkdir Releasecd Releasecmake -DCMAKE_BUILD_TYPE=Release ..makemkdir Debugcd Debugcmak...
2016-05-01 12:53:06
2763
原创 [cmake]有没清理所有编译生成文件的clean命令
答案是没有。 推荐等价于clean的方法:在你的source目录之外建一个build目录,在这个build目录下进行cmake,如果想清理,删掉build下所有文件即可:mkdir buildcd buildcmake ..make 参考:http://stackoverflow.com/questions/27247123/how-to-clean...
2016-04-30 19:56:39
7097
1
《OpenGL ES 2.0 Programming Guide》PDF&书籍源码
2012-08-31
GFX SDK(Game.and.Graphics.Programming.for.iOS.and.Android.with.OpenGL.ES.2.0)
2012-08-30
Spring3.0 API chm帮助文档
2009-11-04
C# 命名规范合集(WinForm、ADO、Web)
2008-09-18
静态方法为什么不用修改引用类型变量
2010-08-05
Servlet中如何获取response的statusCode
2010-05-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人