• Content count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About Hubis

  • Rank
  1. Unfortunately, there's no real easy way to make this work -- there's a good reason only Visual Studio 2008 samples are included! That being said, here are my observations based on the problems you describe. [quote name='mrheisenberg' timestamp='1353917235' post='5004142'] I think the problem comes from some incompatibility with Visual Studio 2012,but 2 of the projects don't update properly.The first one - DiffuseGlobalIllumination I think misses some files,there is no main.cpp for instance,so I can't build it and it's kind of inconvenient,since it would have been a nice direction to in what order different functions in the sample are called(+all other samples have a main.cpp). [/quote] If you search for "WinMain", you'll find the entrypoint for the DiffuseGlobalIllumination sample in Lighting.cpp. That file should have everything you would be looking for from a "main.cpp". [quote name='mrheisenberg' timestamp='1353917235' post='5004142'] The other(bigger) problem is - TerrainTessellation doesn't update at all.This is the migration report: [quote] TerrainTessellation_2008.vcproj: Value cannot be null. Parameter name: file TerrainTessellation_2008.vcproj: Project upgrade failed. ..\Common\FXC.rules: Semicolon is the only supported separator in MSBuild. Usage of any other separator for Custom Build Rule string properties is invalid after conversion. Show 2 additional messages ..\TerrainTessellation\TerrainTessellation_2008.vcproj Message : Custom build rules file 'C:\ProgramData\NVIDIA Corporation\NVIDIA Direct3D SDK 11\source\Common\FXC.rules' was not found or failed to load. : The following error has occurred during XML parsing: File: C:\ProgramData\NVIDIA Corporation\NVIDIA Direct3D SDK 11\source\TerrainTessellation\TerrainTessellation_2008.vcproj Line: 22 Column: 4 Error Message: System error: -2147154664. The file 'C:\ProgramData\NVIDIA Corporation\NVIDIA Direct3D SDK 11\source\TerrainTessellation\TerrainTessellation_2008.vcproj' has failed to load. [/quote] [/quote] How did you attempt to update this project? I did an automated update into Visual Studio 2012 and did not get any of these errors.If possible, try to import the entire base solution file, rather than project-by-project. If you're able to work around that, you may run into problems where the build fails due to HLSL or FX files not "compiling". This stage is actually not necessary, and is just included to validate the shaders before trying to run the samples and having them crash in the executable. You can fix that by simply selecting all the HLSL and FX files in your project, right clicking, and selecting "Exclude from Project". They will no longer go through that pre-processing step. Finally, I've noticed some samples seem to fail to build due to macro redefinition warnings being treated as errors. These warnings stem from macros in DXGITYPE.H (part of the DirectX SDK) being re-defined in WINERROR.H, which is part of the Windows Development Kit v8.0. For a quick-and-dirty workaround, right click the project and open its properties, go to "C++ > General" and change "Treat Warnings As Error" to "No (/WX -)". If you follow those steps, you should be able to build and run any of the samples included successfully. [quote name='mrheisenberg' timestamp='1353917235' post='5004142'] Has anyone else had this issue?Can I run VS2012 in some backwards compatibility mode? [/quote] There is no compatibility mode that I am aware of. Unfortunately, the SDK only officially supports Visual Studio 2008, largely because of the compatibility issues you've run across. On the plus side, you can now get Visual Studio 2008 Express Edition for free from Microsoft [ ] which should be sufficient to build these samples, if all else fails. It's obviously not ideal, but it might be the easiest way if you just want to modify the code and see how it runs.
  2. For some reason, I get an INVALID_OPERATION error when I make that call. According to the spec, the function call will generate an error in the following cases: GL_INVALID_VALUE is generated if program is neither 0 nor a value generated by OpenGL. GL_INVALID_OPERATION is generated if program is not a program object. GL_INVALID_OPERATION is generated if program could not be made part of current state. GL_INVALID_OPERATION is generated if glUseProgram is executed between the execution of glBegin and the corresponding execution of glEnd. There are no glBegin/glEnd calls in my program at all (using glDrawElements), and the first 2 don't seem like they apply so all I am left with is case 3 -- "Program could not be made part of the current state". Anyone have any idea what could cause that?