遇到些蛋疼无聊的问题,share下
1, NDEBUG preprocessor:
怪了,以为debug下ok就全ok,release下不就是开个优化么。
结果无穷多的无语的问题困扰了很久,遇到如下这些:
Direct3D9: (ERROR) :Need to call BeginScene before rendering.(我当然是call了BeginScene)
DrawIndexedPrimitive也会fail
DrawIndexedPrimitive内部会有long memory exception...
实在无语,不知道怎么回事,只好和debug版一项项比较,最后发现是preprocessor NDEBUG的问题。
换成RELEASE就好了.
进一步尽到dxsdk的include下面也找不到NDEBUG相关定义的东西。
就不再花时间了。
2, d3d render state cache
本来在console上面因为driver给的灵活性很大(也就是给实现的东西很少),对rendertstate这种东西做cache进而避免掉重复设置是很有效的优化。
(之前这里认识不足,sorry,幸亏楼下有人指出,thx)
pc上create device的时候可以指定是否来做cache等管理的,如果选择puredevice就可以不作任何这种管理,就可以自己来弄了。
我想可能要根据pix截出来的东西来看最准了。
有种情况pc上是有可能自动cache的,也就是内部就不用自己去做和driver一样的cache了。
可以自己开d3d debug模式下,输出所有log会有这种东西:
Direct3D9: (WARN) :Ignoring redundant SetRenderState - 7
分享到:
相关推荐
along with some useful C++ coding techniques. Chapter 2 describes the Direct3D object. Every application instantiates this object to select a device from those available. Available devices advertise ...
you’d normally associate with jQuery. When I was approached by Manning to write this book, I thought it would be the perfect opportunity for me to look deeply at D3 and make sure I knew how every ...
基于 SOMEIP 协议的 CANoe 软件仿真,让你清楚了解SOMEIP的结构。
SOMEIP通信协议代码实现,两个文件client.c和server.c,实现客户端和服务端通讯;测试在树莓派与电脑虚拟机上的Ubuntu通讯;文件SOMEIP测试实现.docx记录测试结果;
AutoSAR SOME/IP协议V1.3版标准文档英文全文。文字版,有目录
D3 represents two major transitions for folks: modern web development and data visualization. I touch on aspects of both that may give a reader more grounding in what I expect to be new and strange ...
基于 SOMEIP 协议的 CANoe 软件仿真,内容很使用。
some java code some java code some java code
该压缩包提供的内容可以参考博客:https://blog.csdn.net/qq_30391343/article/details/123568915 主要提供SOMEIP中Demo演示,侧重Method和Event的客户端和服务端代码实现。 提供一个比较综合的典型场景应用。
C#开发中一些问题的解决办法,经过了一些整理,有些问题只有实践了才知道.
someip-sd报文
SOME/IP-SD协议的翻译
kaggle “give me some credit”数据集
of packing arbitrary two-dimensional shapes within the boundaries of some container. The objective can vary e.g. minimizing the size of a rectangular container or maximizing the number of shapes in ...
body problem in quantum physics originates from the difficulty of describing the non-trivial correlations encoded in the exponential ... We introduce a variational repre- sentation of quantum states ...
Key to Some Exercises_U1Key to Some Exercises_U1Key to Some Exercises_U1Key to Some Exercises_U1
车载以太网上层应用SOME/IP协议,附属于AUTOSAR体系,里面包含6个相关文件,学习了解SOME/IP必备资料,欢迎下载
JavaScript数组some()方法测试数组中的某个元素是否通过由提供的功能来实现测试。 语法 array.some(callback[, thisObject]); 下面是参数的详细信息: callback : 函数用来测试每个元素。 thisObject : 对象作为...
I'd like some noodlesPPT教案.pptx
C++ Recipes: A Problem-Solution Approach is a handy code cookbook reference guide that cover the latest C++ 14 as well as some of the code templates available in the latest Standard Template Library ...