aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-08-11 21:18:59 -0700
committerBrad Davis <[email protected]>2014-08-11 21:18:59 -0700
commit04a03e83f135fbfccbc960b13e05729490ccd375 (patch)
tree7878b192a3fd24eb69f54744dc17f44f53b0ac1a /LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp
parent0f49ce8fc6aa54224e4c0d6fda8c4527ad39cce1 (diff)
Adding 0.4.1 windows files
Diffstat (limited to 'LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp')
-rw-r--r--LibOVR/Src/CAPI/D3D1X/CAPI_D3D1X_HSWDisplay.cpp14
1 files changed, 7 insertions, 7 deletions
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.