自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (2)
  • 收藏
  • 关注

转载 Socket粘包问题

这两天看csdn有一些关于socket粘包,socket缓冲区设置的问题,发现自己不是很清楚,所以查资料了解记录一下: 一两个简单概念长连接与短连接:1.长连接    Client方与Server方先建立通讯连接,连接建立后不断开, 然后再进行报文发送和接收。2.短连接    Client方与Server每进行一次报文收发交易时才进行通讯连接,交易完毕后

2014-09-28 13:49:30 582

转载 C++11 random 随机数的使用而已没有原理

因为在看的那个工程有个关于采样的类,里面有一些这样的东西:private: std::mt19937 eng; std::uniform_int_distribution axis_dist; std::uniform_real_distribution fraction_dist;所以看了一下随机数的东西,这是C++11的一些扩展内容,boost里面也有了很久了。使

2014-09-27 16:51:22 1649

转载 【cocos2d-x3.2游戏开发】 lua 类, 继承, 面向对象

1.lua中的类    lua中其实是没有类的,有的只是表(table),而类之间的继承也就是将父类的表连到了一起,派生类中没有找到的属性和方法就通过元表查找父类2.lua中类的属性   classA = {width =10, height=10}   classA={}   classA.width=10   classA.height=10 

2014-09-09 20:24:09 1911

转载 class() 高级用法 -- lua

class() 高级用法class() 除了定义纯 Lua 类之外,还可以从 C++ 对象继承类。比如需要创建一个工具栏,并在添加按钮时自动排列已有的按钮,那么我们可以使用如下的代码:-- 从 CCNode 对象派生 Toolbar 类,该类具有 CCNode 的所有属性和行为local Toolbar = class("Toolbar", function()

2014-09-09 16:30:37 725

转载 --Create an class.

--Create an class.function class(classname, super)    local superType = type(super)    local cls    if superType ~= "function" and superType ~= "table" then        superTyp

2014-09-09 16:26:16 530

转载 Quick-Cocos2D-X 并成功运行示例代码

有好多天没有写博文了,今天三国制霸iOS版本进度快结束了。自己也终于有时间继续写博文与大家交流。今年,中国的手机网游市场很火,很多公司也需要Cocos2d的人才,所以有很多做页游端游的同行也一起加入了手游的大家庭(同时也增加了竞争力)。不过这样也是件好事,有追赶的时候,我们进步的能更快。   但是,如何能让自己在如此之多的同行之中脱颖而出呢?答案就在

2014-09-07 21:11:12 2732

转载 关于setpeer和getpeer的作用

每个C++对象需要存贮自己的成员变量的值,这个值不能够存贮在元表里(因为元表是类共用的),所以每个对象要用一个私有的表来存贮,这个表在tolua里叫做peer表。元表的__index指向了一个C函数,当在Lua中要访问一个C++对象的成员变量(准确的说是一个域)时,会调用这个C函数,在这个C函数中,会查找各个关联表来取得要访问的域,这其中就包括peer表的查询。

2014-09-07 19:48:34 4856

转载 [Lua]用__index/__newindex来限制访问

网友问了一个问题,说对象A在内部可以修改HP.外部对象只能访问对象A的HP,不能修改.这东西其实可以用__index和__newindex来实现.__index指向对象A,这样就可以访问;__newindex重写,修改hp的话,就禁止.就可以完成他的需求.下面给出简单的代码:function cannotModifyHp(

2014-09-07 19:46:36 659

转载 lua面向对象编程之点号与冒号的差异详细比较

2011-07-28 02:02 by youxiachai, 9067 阅读, 9 评论, 收藏, 编辑首先,先来一段在lua创建一个类与对象的代码12345678910111213141516171819

2014-09-07 19:25:47 976

转载 Lua脚本语法说明(修订)

Lua脚本语法说明(增加lua5.1部份特性)  Lua 的语法比较简单,学习起来也比较省力,但功能却并不弱。  所以,我只简单的归纳一下Lua的一些语法规则,使用起来方便好查就可以了。估计看完了,就懂得怎么写Lua程序了。  在Lua中,一切都是变量,除了关键字。I.  首先是注释  写一个程序,总是少不了注释的。  在Lua中,你可以使用单行注释和多行注释。

2014-09-07 19:24:47 940

URP Debug Views 1.0.4.zip

Do you wish you had debug views in LWRP / URP? Do you wish it was easy to add custom debug views? That it was accessible in game view and in builds? URP Debug Views - A unique plugin that adds debug views support for LWRP / URP and more! TLDR URP Debug Views adds must have features for anyone that uses LWRP / URP: - most of the debug views from the built-in renderer (including Shaded Wireframe!) - works in scene view, game view and in builds - add your own debug view with a single shader Available debug views - Shaded Wireframe - World normals - World tangents - Shadow cascades - Overdraw - Vertex color R - Vertex color G - Vertex color B - Vertex color RGB - Vertex color A - UV0 Checker - UV1 Checker Available everywhere Debug views work in scene view, game view but also in builds. It has been tested on various PCs, Mac, Android and VR. Custom Adding custom debug views is very easy, a single shader is enough! You can then plug the newly created debug view in an editor menu, shortcuts or a custom in-game menu. Time saver Being able to check problems and iterate on them quickly is very important, especially if you are an indie game developper. "Why is this vertex color not working? Is the problem coming from the mesh, Unity or the shader?" "What is this visual bug, is it coming from the geometry or the textures?" Any of theses questions and many more can be answered in one click by using the correct view. Without any debug view, it can take 10 minutes, an hour, or more. Less time fixing problems means more time working on your game. Your time is important, value it! Full source code included! Support I'm dedicated to make this asset a must-have for LWRP / URP. I answer to email and do my best to fix bugs and implement feature request. Please don't hesitate to contact me for feedback, ideas or bug report at ph.graphics.unity@gmail.com You can also come and chat on Discord at https://discord.gg/ksURBah If you are not convinced yet, you can look at reviews for

2021-07-23

房燕良-虚幻4渲染系统架构解析

自我介绍 • 3D引擎渲染系统概述 • 虚幻4渲染系统架构 – 游戏线程&渲染线程 – 场景管理与渲染数据管理 – Deferred Shading Scene Renderer • 虚幻4的VR渲染 – 以Google VR HMD插件为例

2019-02-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除