Jump to content

  • Log In with Google      Sign In   
  • Create Account

Fredericvo

Member Since 06 Mar 2012
Online Last Active Today, 08:06 AM

#5230856 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 25 May 2015 - 10:35 AM

 

yet you have:
 
http://i57.tinypic.com/vooqrc.png
 
Am I missing something?


yes, but the point is DDSTextureLoader needs to use the correct version, and if it does it lets the program launch without the error. there is no point in testing those function versions manually. the problem is getting the define through.

 

I don't get your problem then. The define is what does the selection and it did for me. How can it not work for you? Can you show me where you put the define, what you defined and how the wrong CreateFile keeps being selected?




#5230851 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 25 May 2015 - 10:11 AM

 

That seems odd. Maybe remove the whole #if/#else clause altogether and the CreateFile2 part. There's no way CreateFileW shouldn't work on W7,unless you have other issues such as not providing the correct path/name to it or unless you don't have a valid dds to work with.


i couldn't care less about the createfile... i need the define to work for the DDSTextureLoader and it doesn't.

 

 

yet you have:

 

http://i57.tinypic.com/vooqrc.png

 

Am I missing something?




#5230822 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 25 May 2015 - 06:10 AM

That seems odd. Maybe remove the whole #if/#else clause altogether and the CreateFile2 part. There's no way CreateFileW shouldn't work on W7,unless you have other issues such as not providing the correct path/name to it or unless you don't have a valid dds to work with.


#5230759 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 24 May 2015 - 09:00 PM

I have absolutely no idea why they added so much macro hoodoo but it just seems to choose whether to use CreatefileW or Createfile2, the latter of which is only supported on W8 or later.


#5230725 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 24 May 2015 - 03:23 PM

Here is the define I used, as promised.

I put it right before the #if

(not sure why I used 600 rather than 601 but it works so meh.)

 

#define _WIN32_WINNT 0x0600
    // open the file
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
    ScopedHandle hFile( safe_handle( CreateFile2( fileName,
                                                  GENERIC_READ,
                                                  FILE_SHARE_READ,
                                                  OPEN_EXISTING,
                                                  nullptr ) ) );
 
#else
 
    ScopedHandle hFile( safe_handle( CreateFileW( fileName,
                                                  GENERIC_READ,
                                                  FILE_SHARE_READ,
                                                  nullptr,
                                                  OPEN_EXISTING,
                                                  FILE_ATTRIBUTE_NORMAL,
                                                  nullptr ) ) );
#endif



#5230629 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 23 May 2015 - 08:14 PM

Oh I had a similar problem under windows 7. Apparently there's a bug in the way it tries to tell W7 from W8. I fixed it by force defining a macro but I'm on my phone in bed now. I will tell you what it was once I'm on my PC as I can't remember what it was by heart.


#5229804 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 19 May 2015 - 06:34 AM

I have never used the WIC loader but the loader I mentioned has the ability to load cube maps from a dds.
Take a look at it and experiment with it.

https://directxtex.codeplex.com/wikipage?title=DDSTextureLoader


#5229643 How to make a SkyBox/Cubemap in Direct3D11?

Posted by Fredericvo on 18 May 2015 - 12:34 PM

I don't use the WIC texture loader but the stand alone DDSTextureLoader which is just a header and a cpp file available from directXTk sdk. Works like a charm for me.


#5222336 Skeletal animation in Assimp

Posted by Fredericvo on 09 April 2015 - 06:38 PM

Add "node" to the list of synonyms. Assimp uses the term node.

Assimp also uses bones. (aiBone structure)

I remember struggling with assimp too initially.
It's been a few months since I last touched animations but aiBones only hold information such as inverse bind pose matrix but they call it offset matrix, bone indices & weights. The hierarchy is not represented at all here. That's where the aiNodes intervene. You have to construct a tree and match corresponding aiBones to aiNodes, using the names.


#5222253 Starting Using OpenGL Or DirectX?

Posted by Fredericvo on 09 April 2015 - 10:18 AM


but I don't like the fact it uses d3dx math (deprecated) instead of xnamath.

 

someone made a zip with ALL the tutorials rewritten for DirectXMath + DDSTextureLoader and I still have it on my HD somewhere if anyone is interested.

It's also a very good exercise to rewrite a couple of them yourself to get a good grasp of it.




#5216445 How do game programmers visualize the Maths on their game?

Posted by Fredericvo on 14 March 2015 - 08:05 AM


How did the programmer know if he is going to use Sin or Cos?

 

In this case it wouldn't matter indeed but the idea here is to output a value that continually oscillates between 0 and 1 smoothly.

Both sin & cos do this but dephased by 90°

The question a programmer would've asked himself here is "what function will perpetually output values that oscillate between 0 & 1 and back down like this:

 

http://upload.wikimedia.org/wikipedia/commons/0/02/Simple_sine_wave.svg

 

Oops it's Saturday morning: I mean -1 & 1, not 0 & 1




#5215541 x86 / x64 and the crazy conditional moves based on flags

Posted by Fredericvo on 09 March 2015 - 06:37 PM

The ones you mentioned date back to the early 1990s


Make that early 1980s.
My C64's 6510 (6502 variant) had them. At least the carry flag but not sure about parity.


#5214990 Playing a Video

Posted by Fredericvo on 06 March 2015 - 12:20 PM

Isn't Directshow deprecated now?

I think Media Foundation is the new way but I have not tried either yet tbh.




#5214612 When and how do I start graphics? (C++)

Posted by Fredericvo on 04 March 2015 - 08:07 PM

After console apps and before I jumped into DirectX, I learned win32 GUI programming a little.
There are a few online tutorials you can google.
I believe it can be helpful to know the anatomy of a message loop, what a winproc is etc before you modify it to accommodate a game loop.
Alternatively you could opt for SDL 2 which abstracts this and is portable.


#5212715 How were you learning programming at the age of 5?

Posted by Fredericvo on 24 February 2015 - 09:39 AM

I didn't have my first computer until I was 9 (a Commodore 128) and immediately started learning BASIC.

What was nice with the C128 rather than the C64 was that its BASIC had graphical commands otherwise very hard to do for a beginner in pure C64 mode such as circle, box, line, sprite etc. On C64's BASIC you'd have had to use pokes and math formulas for circles (way above my head at that age)

I've had tremendous pleasure trying to visualise simple scenes in my head and then trying to create them procedurally with those commands.

 

Since the C128 was a complete commercial flop and I became aware that I'd have no audience for my programs I increasingly wanted to be able to program in C64 mode and be able to do the same or better stuff (after all games did exist for the 64 so it was possible but I had to figure out how) and at about 12 I became aware of machine code and how professional games were made with it rather than BASIC. As you can imagine it was a steep learning curve after that...






PARTNERS