Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 May 2004
Offline Last Active Aug 08 2013 01:18 AM

#5076261 C++ DX API, help me get it?

Posted by on 08 July 2013 - 08:23 PM

Ok so i'm coming from a .net background (multiple years of professional development).

I'm checking out microsoft DX11 samples and i just don't get it, am i missing something obvious & there's actually beauty there i'm not seeing? Or is this actually just flat ugly hard code for no reason? Is it legacy or are you actually supposed to write & consume APIs this way?

(just to be clear, this is half rant, half question, i'd be more than happy to learn my rant is unfounded & have this transition from a rant to an answered question, also i'm not saying i'm having a hard time, just to be clear i understand the sample perfectly fine, i just find it painstakingly hard for no reason).


Shed some light on all this for me

1) Why the hell is this so damn long & hard? I expected getting a DX11 window up & running (and rendering) with nothing inside to be a 10liner or so, maybe 20 tops, but not 250 like in the sample!

2) Why the typedefs? Seems to be adding confusion for no reason especially on simple types, am i missing something or is this just useless? typedef float               FLOAT

3) Why no constructors? Objects are just declared and initialized element by element, meaning you remove 1 line you don't get a default, you don't even get an exception, you get a nice access violation!

4) Why all the if(failed(bla)) ? Why isn't code throwing?

5) Probably the same as 3 but, why no sensible default values for everything? Declaring any directX object seems to be a full time job & a 10 liner!

6) Why is everything taking a pointer? I get the point for large (or medium) objects but why for example does something like the feature level, which isn't a large object nor an array, and that you're likely to be using once (or hell, maybe twice!) in your whole application get passed by pointer? I'm new at C++ but unless i get it wrong it means you must create a (local or global) variable, assign a value to it, and pass a pointer to it, if it was by reference you could just pass in D3D_FEATURE_LEVEL_11_0 for example

7) Typedef question again, it's confusing enough for float => FLOAT, but hell LPVOID*, i can't believe people starting with C++ make it through this!

8) __uuidof, so you even need custom keywords to get a simple directX sample app going on???


I'm not trying to bash C++ here, the only things i can't bare in it are header files and compilation speed, but i just don't get that API design, is it flaws in the API or in the sample? Or am i just getting it wrong? Because if this is the right way to do it this sounds just horrible to me, 250 lines to do nothing, 3X that much for a rotating cube (out of which only 60 lines are rendering, and about 300 setting up the device . . . ). I just don't get it! Hell SharpDX didn't feel that way at all.


I'm waiting, please enlighten me!

#4888251 I dont know any mongolians.

Posted by on 27 November 2011 - 05:28 PM

Thanks to my job selling burgers, which I only quit last year, I've met a huge variety of people in person. I've worked with kurds, arabs, asians afticans, north americans south americans and europeans I also went to a very mixed college, lived with pakistanis, poles, africans, south americans, north americans.Thanks to the internet ive also had conversations with israelies, palistinians (sometimes at the same time with interesting results)But I never met anybody from mongolia. I've not worked with a Mongolian, lived with a Mongolian, or chatted with a Mongolian on IRC.Where are all the mongolians? It's as if they only live in Mongolia or something. I feel they are very under-represented.[edit]Just to clarify - im aware that mongolia is in asia. The thing that puzzles me is that you can name nearly any country you like, and I can think of somebody I know or used to know who is from that country. Mongolia is an exception, despite its size and population count.

Hey we Mongolians are everywhere ^.^

Why is it important to meet someone from Mongolia?

Have you met any Mongolians?

Wait wait, i'm a lil confused here, you quote someone saying he's surprised he's never met a mongolian and you ask him if . . . he's ever met a mongolian?

#4822346 Are you man enough to tell your boss in his face that he is wrong?

Posted by on 12 June 2011 - 04:38 AM

I tell my boss he's wrong if i think so, but my boss is man enought to hear it else i wouldn't.

If telling your boss he's wrong sounds hard, you need a new boss.

#4793849 The Facepalm Gaming Marathon for Charity

Posted by on 03 April 2011 - 09:46 AM

Nice concept,

I think it would be nice to add some more variety (instead of platformers platformers and then more platformers), how about some bullet dodges? (touhou lunatic mode)
Also will you provide a downloadable version for those who can't follow the stream at the time it is aired?

#4779482 [.net] Reflector - no more free version

Posted by on 26 February 2011 - 06:03 PM

http://www.simple-ta...-of-reflector-/ <<< have a look there , hell even in the first paragraph it's boldly stated at the end "Red Gate will continue to offer the tool for free to the community." ,there's no if and but and maybes, it will continue to offer the tool for free. It's also re staded in large letters and bold right next to the paragraph.

Dude, read your own link. You'll see exactly what I said happened in the comments: people giving Red Gate grief because at no point did they issue a promise that the produce would be free indefinitely.

Which . . . doesn't change anything? People didn't trust what they said back then, just means they were right? In any case they stated it would stay free, and it didn't, wether or not the community was whining about no promise back then or not is irrelevant.

What i linked is totally inline with what i said

#4776030 I got beat up by a cop

Posted by on 18 February 2011 - 01:07 PM

Also he didn't "beat you up" , as soon as he had you in control he stoped from what i read, i see nothing shocking.

And you definately weren't in your right when you shut the door on him, and you're "not even sure" he didn't tell you to stop.

While you (your sheer studidity aside) are perfectly in your right to start running i very much doubt keeping running when asked to stop by the police and smashing the door on him was ok.
YOU should do the right thing, tell him you're some stupid adrenaline and attention whore and decided that pissing off people who are doing their work , apparently late at night when they'd rather be sleeping in bed, was ok in exchange for the fun you'd get.

Overall i feel like you're an asshole.

#4757048 I'm Leaving Gamedev.Net Because Of The New Site Design

Posted by on 10 January 2011 - 10:06 PM

I'm curious to know how many users are like me but , as far as i'm concerned, i don't just skip over the main page quickly, i only have the forums bookmarked and never go throught anything else.
The one thing GDnet brought me was "click here , got what you care for with relevant people", i don't care for networking with those people, nor with feeling part of a community, i care much more about finding my forum grouping back which allowed me to skip over all of the forums i don't care about and get to the revelant stuff.
About once or twice a year i visit another forum than those in my favorites, the rest of the time (i visit gdnet forums once to twice a day and usually read every new post in .net / lounge at least while tossing in for begginers and dx/xna every other day) i don't even want to see them.
With the huge advantage of grouping i'm surprised (i don't think , with such a breadth of subject, that most users visit more than 10% of topics on an individual basis, so i'd assume everyone loved that) that you considered a regression because i'd think community done right + all the other comments fixed would still lead to a worse site. Trading forum grouping for community seems like a bad deal in itself.
read in a lot of post in answers to "make the forums the focus again" that the goal is just to add focus to the rest by linking them with the forums, but i think it may have been a better idea when renewing to focus only on the forums and actually, simply drop the rest of the website if you wanted a real change, the news could be consumed in a news forum fashion and most of the rest of the site is (was) obsolete last time i looked. This may actually have increased the number of people who see the news.
So overall, and please don't take this as something harsh but i really think it's important to be honest with it since you seemed open about wanting feedback, i feel that even once everything will be fixed, this will be a total regression, what we gain (once the issues are fixed) isn't worth what we loose. We loose a great forum and get yet another community website.
I'm also not "leaving" gdnet, it makes no sense to "leave" something you're not formally introduced into but i can see myself loosing the habbit of coming daily to check, i come only for the forums , anything outside of this isn't a selling point for me , actually if you had removed the rest of the website i'm fairly sure i wouldn't have noticed (forums bookmarked directly).
Now i understand that you need to keep gdnet afloat as you say so, and i hope you'll see throught that i mean no insult but am genuinely concerned, as a part of the solution to get the old features back , i'm willing to donate 250$ to get the old forums back , the old width space usage, the old groupings, (i don't mind if the ratings go). In a functional sense it fited it's role as i never thought "i'm limited by lack of features X" in the old forums so i couldn't see a need for a change, while everything screams "unfit" on the new ones, and most of that everything is the community stuff, the large area for user presentation vs small area for post content etc.
I'll understand if this posts get nuked but if not please take note of my sincere proposition for individual funding and maybe make a thread about it because i'm sure others would join me in the "support the old site financialy" move while it's still probably technically feasible?

#4550504 [C++] Code Beautification Tools

Posted by on 31 October 2009 - 12:17 AM

Actually (and i have no clue how nuclear plants are hanled by / handling the software) but i' expect that a system crash woul simply warn/shutdown the plant and not cause random results like not checking a value coul , in that case i'd take the crash in a heartbeat