How to make a SkyBox/Cubemap in Direct3D11?

Started by
19 comments, last by InfoGeek 8 years, 11 months ago

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


i am guessing all that mumbo-jambo with preprocessor #if #else #endif is simply to simply test the definition before it works? because it screams about undefined stuff after the #else. and the definition alone does not work like i said in the earlier post.

also 0x600 means Windows Vista as stated in link from earlier post, again.
Advertisement
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.

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.


in my case thre is no need to test with that code, because if everything works it will laumch without the error shown in post #5. and... it doesn't.
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.

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.

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?

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.

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?

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?

exactly what i want to know...

Can you show me where you put the define,

i can't show you but i can tell you i have been putting it all around the place... in the main.cpp before absolutely any includes(including system includes), after... in .cpp and in .h files, nothing works.

what you defined


this

and how the wrong CreateFile keeps being selected?

vooqrc.png

Read this please.
http://stackoverflow.com/questions/23854692/incorrect-sdk-os-version

It might be that you should use a different platform toolset for your project.

This topic is closed to new replies.

Advertisement