From 04a03e83f135fbfccbc960b13e05729490ccd375 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 11 Aug 2014 21:18:59 -0700 Subject: Adding 0.4.1 windows files --- LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp') diff --git a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp index 1e4b11a..2fe3fee 100644 --- a/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp +++ b/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp @@ -37,9 +37,6 @@ limitations under the License. #include "../../Kernel/OVR_Allocator.h" #include "../../Kernel/OVR_Color.h" - -#include "../Textures/healthAndSafety.tga.h" - // We currently borrow the SimpleQuad shaders #include "../Shaders/SimpleTexturedQuad_vs.h" #include "../Shaders/SimpleTexturedQuad_vs_refl.h" @@ -324,7 +321,11 @@ void HSWDisplay::LoadGraphics() #endif if(!pTexture) // To do: Add support for .dds files, which would be significantly smaller than the size of the tga. - pTexture = *LoadTextureTga(RenderParams, pSamplerState, healthAndSafety_tga, (int)sizeof(healthAndSafety_tga), 255); + { + size_t textureSize; + const uint8_t* TextureData = GetDefaultTexture(textureSize); + pTexture = *LoadTextureTga(RenderParams, pSamplerState, TextureData, (int)textureSize, 255); + } if(!UniformBufferArray[0]) { @@ -418,9 +419,6 @@ void HSWDisplay::LoadGraphics() } } } - - // Calculate ortho projection. - GetOrthoProjection(RenderState, OrthoProjection); } @@ -445,6 +443,8 @@ void HSWDisplay::RenderInternal(ovrEyeType eye, const ovrTexture* eyeTexture) if(!pVB) LoadGraphics(); + // Calculate ortho projection. + GetOrthoProjection(RenderState, OrthoProjection); // Save settings // To do: Merge this saved state with that done by DistortionRenderer::GraphicsState::Save(), and put them in a shared location. -- cgit v1.2.3