Jump to content

  • Log In with Google      Sign In   
  • Create Account


NightCreature83

Member Since 21 Feb 2008
Offline Last Active Today, 07:04 AM
****-

#5080530 Data clipped before Output Merger

Posted by NightCreature83 on 25 July 2013 - 01:16 PM

I have run into a few issues with the new graphics debugger that PIX didn't have and it is really annoying I had something fail a depth test but the depth test wasn't on for that particular drawcall it turned out that it actually failed a stencil test. I had to go through all the states for that particular draw call to figure out what was happening to it.

 

The other problem is that PIX no longer understands the DX11.1 runtime so even if the application is shared if it is build against the DX11.1 runtime PIX will fail to open the application, and seeing he is building his application with VS2012 it is very likely it's built against the DX11.1 runtime sadly.

 

Currently I am having to deal with GPUPerfStudio 2 and it is not perfect either and only works for AMD cards, there is another plugin for VS that might help you and it is called NSight but that only works for NVidia cards and you have to register as a developer with NVidia to get it.




#5080424 Data clipped before Output Merger

Posted by NightCreature83 on 25 July 2013 - 06:08 AM

Hey

Thanks for your hint. In currently not at my computer but I think the problem ain't related to the vertex data. The post vertex shader view in the debugger shows the output of the vertex shader in projection space with the usual clipping already applied, e.g. clipping near and far plane.

So I think the problem is that the pixel shader never gets called. I'm not 100% sure but I thin that there are only two possible situations.
1) The rasterizer does not generate any fragments but as all checks are disabled in the rasterizerstate that should not be the case.

2) My pixel shader is not attached correctly even though it shows up in the debugger.

I will have a look at everything when I'm back home.

Thanks and a nice afternoon
Plerion

Your problem is most likely related to your view transform, if the object is drawn outside of the view frustum or view port, the transformed vertices will not be going through the pixel shader. And this is also the reason that you can't find another pixel with a different pixel history then the clear call, objects that are not in the view port will not have a pixel shader run for them.




#5080363 Data clipped before Output Merger

Posted by NightCreature83 on 25 July 2013 - 02:29 AM

Do you know where on the screen it should show up? If so look at the pixel history it might tell you why it failed to draw that pixel.




#5080135 Why companies still use C++ and what should I learn then

Posted by NightCreature83 on 24 July 2013 - 08:55 AM

 

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

 

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

 

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

 

If you wish to learn C++ in the end stay away from Python, Java and C# are your better options to start with as a lot of the syntax will be the same. Not having to learn a new syntax in your second langauge is really useful as you are focusing more on learning the particulars of the language instead of feeling like starting over. Having to pick up a new syntax becomes easier when you are more comfortable in constructing non trivial coding solutions and algorithms.

 

I started out with Pascal -> Delphi and then transitioned through C# and Jave to C++, moving away from Pascal/Delphi at the time wasn't really easy as I wasn't that good at coding yet and meant I had to learn a whole new language effectively.




#5080059 Cleanest way(s) to negate a predicate in C++11?

Posted by NightCreature83 on 24 July 2013 - 02:16 AM

The problem: I have a predicate bool pred(const T&) which I can feed to an algorithm like partition, but what I want is its negation (!pred). I'd prefer a solution that works regardless of what pred is exactly, but at least the solution has to work if pred is a named lambda.

 

I can come up with three ways of getting the negation:

1) [](const T& t){return !pred(t);} or

2)  bind(logical_not<bool>(), bind(pred, _1)) or

3)  not1(function<bool(const T&)>(pred))

 

but all of them are clumsy. I feel the lambda version (1) may be the easiest to write and read, but on the other hand I like the bind version (2) because it avoids the need to specify T's type explicitly. (3) has nothing going for it. Am I overlooking something? I thought about writing a template function function<...> neg(pred), but could not think of a way to deduce the parameter type of the callable, which would be necessary to specify a correct return type for neg, and apparently function is also less efficient than raw lambdas and function pointers.

 

The first one is the only clean solution and the preferred way of doing this in C++11 (http://herbsutter.com/2013/05/16/gotw-3-solution-using-the-standard-library-or-temporaries-revisited/). Why don't you write your predicate in such a way that it takes and "auto" as then your lambda doesn't need to take a type at all.
 




#5079873 Data Driven Design: Questions (and Answers?)

Posted by NightCreature83 on 23 July 2013 - 09:46 AM

A decent tool for XML serialisation is tinyXML2. There is no benefit in chosing JSON over XML in C++ as neither of them will deserialise directly to C++ data structures like JSON does in Javascript.

 

Data Driven Design can be used together with an OO hierarchy, by using a praser and a factory you can construct the instances the data is specifying and initialise them with data from the data.




#5079577 Decals in XNA or DirectX9

Posted by NightCreature83 on 22 July 2013 - 08:23 AM

Well use normal projective texturing in that case but that won't always look as pretty as that one will. But it should teach you enough tricks to overcome it's short comings.




#5079522 rusty c++ coder

Posted by NightCreature83 on 22 July 2013 - 02:00 AM

Maybe try some Euler project problems to get you into the flow of thinking like a programmer again. After that who knows your ideas might start to flow again for games. Or try to make clone with a twist of a simple game you love.




#5078873 Directional Light

Posted by NightCreature83 on 19 July 2013 - 02:07 AM

As long as you aren't running on Win 8 you can use PIX from the the D3D SDK folder it also allows you to debug the shader. Or use the NVidia or AMD tools.




#5078664 Programming the right way?

Posted by NightCreature83 on 18 July 2013 - 03:49 AM

I found looking at other peoples code helped a lot but also looking at my old code that I wrote years ago and spotting the mistakes in them. This will also give you a sense of growth as a programmer in that you get to see what you are doing better now.




#5078077 C++ trenches, hpp prototype

Posted by NightCreature83 on 16 July 2013 - 01:53 AM

As a tip though curly braces start on a new line like this:

namespace fubar
{
}

And before this sparks a debate I know this is personal preference but by doing it this way all your opening and closing curly braces should be at the same indentation level in the code. This makes it easier to parse where a block starts end ends for your brain, as you only have to glance at the code to find it.




#5077828 Function addresses are not fixed relative to each other?

Posted by NightCreature83 on 15 July 2013 - 05:51 AM

 


Are functions shifted around during the library load operation?

Yes. The correct term is 'relocated'.

 

If libraries couldn't be loaded at arbitrary base addresses, then every library in the world would need a unique base address (and we'd run out of addresses).

 

 

This is also a security measure in most OSes the dynamic base makes it harder for buffer overflows or underflows to be detected and exploited. This is not the end all in security and is very easily broken but it is an additional step that make the rest of the security system better.

 

Also it is not a good idea to assume fp are always relative to a certain location in code itself, as adding additional code could also move this stuff around. It is better to ask for the function pointer address from the module you are loading in, this way it will always link to the correct version.
 




#5077395 Is Inspiron 15R good for programming?

Posted by NightCreature83 on 13 July 2013 - 01:05 PM

http://www.notebookcheck.net/AMD-Radeon-HD-7730M.72678.0.html

http://www.notebookcheck.net/NVIDIA-GeForce-GT-640M.71579.0.html

 

I prefer ATI but then again I only use D3D and ATI has always been the better for D3D. For the 1330 price the Inspiron is better as it is cheaper even the bluray drive version.

 

I have an SSD at work (perforce drive only OS is on a normal HDD) and the only reason I am glad I have one is that our build tool is shit and even on an SSD rebuilding assets takes 30 minutes.




#5077283 Is Inspiron 15R good for programming?

Posted by NightCreature83 on 13 July 2013 - 01:47 AM

Strongly recommend finding a laptop with NVIDIA graphics. Other than that, the only must-have spec is 8GB+ of RAM. I'm also insistent on finding the highest screen resolution you can afford; 1920x1080 is common now and 1600x900 should be considered minimum. 1366x768 is embarassing on a 15" screen.

Why are you recommending NVidia for graphics as there is no real difference between the two, even the new Intel 4th generation core GPU's are actually full DX11 GPUs and are mid range cards.

 

I would go for the Inspiron 15R SE as it has a 1920x1080 screen and a Radeon 7730M price should be similiar and dito for the hardware. This laptop has hardware that you normally would find in a laptop that is 300-400 dollars more.




#5076655 Are the D3DX Functions Faster ?

Posted by NightCreature83 on 10 July 2013 - 11:05 AM

DirectxMath and XNAmath are the same library and should be included with the June SDK, could be you have to include the xnamath.h as the header for it as the rename happened more or less arround the time that DirectX SDK was changed to be a component of the Windows SDK.

 

If you just transpose the matrices you wrote yourself before you feed them to D3D they should just work as that is how you switch from column major to row major which D3D9 likes.






PARTNERS