ericrrichards / dx11 Goto Github PK
View Code? Open in Web Editor NEWC# & SlimDx exploration of Frank Luna's Introduction to 3D Game Programming with DirectX 11
License: MIT License
C# & SlimDx exploration of Frank Luna's Introduction to 3D Game Programming with DirectX 11
License: MIT License
Hello, The Voronoi implementation is great. Can you please provide some suggestions on getting co-ordinates of the polygon for each site?
Thanks!
The function Core.Util.GetArray
uses a static array to lower array allocation costs, but newer version of SlimDX (currently I'm using SlimDX 4.0.13.44) seems to expect a array of exact length needed.
For example, in LightingDemo, running this demo will throw a NullReferenceException
, located at this line:
_fxPointLight.SetRawValue(new DataStream(array, false, false), array.Length);
With the help of the debugger I found that all fields of _fxPointLight
became invalid. A watch on _fxPointLight
shows that the change happens just after the _fxDirLight.SetRawValue
call. So I canceled the static buffer and tried to create a new array of len
bytes each time, and this modification worked. I suspect SlimDX neither fully checks the parameters nor handles this situation well and internal states of D3D just crash.
This problem also affects other several demos.
Thanks for you! I foung this yestoday. I only use compile fx directly instead of use fxo. I find your sample is very good. it's great helpful for me. So i want run your sample When i compile the sample with VS2012 .It report error about this "错误 6 命令“cd FX
fxc /O0 /Fc /Zi /T fx_5_0 /Fo Basic.fxo Basic.fx
fxc /O0 /Fc /Zi /T fx_5_0 /Fo Sky.fxo Sky.fx
fxc /O0 /Fc /Zi /T fx_5_0 /Fo NormalMap.fxo NormalMap.fx
fxc /O0 /Fc /Zi /T fx_5_0 /Fo DisplacementMap.fxo DisplacementMap.fx”已退出,代码为 9009。 20-NormalDisplacementMaps
"
I don't kown how solve it . can you help me. Thanks, my english is very bad.
Well, good tutorials, and good repo, Mr. Richards, thanks.
I tried to run some examples and found EndOfStreamException
is thrown in many of them. The debugger shows it is in the Core.Model.TextureManager.Create1By1Tex
method, this line:
db.Data.Write(color);
I commented this line and the code works fine. Is setting the color of this pixel really necessary, or it is a defensive measure? I'm not sure why it throws an EndOfStreamException
while "trying to read" (as the debugger prompts).
I suggest updating read me to a link to this:
Lets us see a preview of the tutorials online before downloading the whole thing.
Hi Eric,
Thanks for the awesome code, it is really helping me make the move from XNA.
I am having a small issue in the LightDemo project, perhaps you can explain why.
In the DrawScene method you have the following code:
var array = Util.GetArray(_dirLight);
_fxDirLight.SetRawValue(new DataStream(array, false, false), array.Length);
All is well until it tries to set the array as "Util.GetArray(_pointLight)" and call _fxPointLight.SetRawValue()
At the SetRawValue call an object reference error is thrown by SlimDX.
I looked it up and came across that section of the tutorial. Someone left a comment there saying that they had a similar issue and that they resolved if by initializing a new array with the size [1024] for each of these calls. I tried that and it did not work (Same Error).
Please let me know if you can help and thanks again for the awesome tutorials.
Regards,
George
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.