Skip to content

Commit

Permalink
DirectXTex: WinRT usage problematic, sticking with CS on HGLBOAL
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn_cp authored and walbourn_cp committed Jun 29, 2013
1 parent a303eea commit af675e3
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions DirectXTex/DirectXTexWIC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@

#include "directxtexp.h"

#ifdef __cplusplus_winrt
#include <shcore.h>
#pragma comment(lib,"shcore.lib")
#endif

//-------------------------------------------------------------------------------------
// WIC Pixel Format nearest conversion table
//-------------------------------------------------------------------------------------
Expand Down Expand Up @@ -923,12 +918,7 @@ HRESULT SaveToWICMemory( const Image& image, DWORD flags, REFGUID containerForma
blob.Release();

ScopedObject<IStream> stream;
#ifdef __cplusplus_winrt
auto randomAccessStream = ref new Windows::Storage::Streams::InMemoryRandomAccessStream();
HRESULT hr = CreateStreamOverRandomAccessStream( randomAccessStream, __uuidof(IStream), reinterpret_cast<void **>( &stream ) );
#else
HRESULT hr = CreateStreamOnHGlobal( 0, TRUE, &stream );
#endif
if ( FAILED(hr) )
return hr;

Expand Down Expand Up @@ -975,12 +965,7 @@ HRESULT SaveToWICMemory( const Image* images, size_t nimages, DWORD flags, REFGU
blob.Release();

ScopedObject<IStream> stream;
#ifdef __cplusplus_winrt
auto randomAccessStream = ref new Windows::Storage::Streams::InMemoryRandomAccessStream();
HRESULT hr = CreateStreamOverRandomAccessStream( randomAccessStream, __uuidof(IStream), reinterpret_cast<void **>( &stream ) );
#else
HRESULT hr = CreateStreamOnHGlobal( 0, TRUE, &stream );
#endif
if ( FAILED(hr) )
return hr;

Expand Down

0 comments on commit af675e3

Please sign in to comment.