mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-15 14:30:13 +02:00
DirectXTex: WinRT usage problematic, sticking with CS on HGLBOAL
This commit is contained in:
parent
a303eea709
commit
af675e3c3a
@ -15,11 +15,6 @@
|
|||||||
|
|
||||||
#include "directxtexp.h"
|
#include "directxtexp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus_winrt
|
|
||||||
#include <shcore.h>
|
|
||||||
#pragma comment(lib,"shcore.lib")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
// WIC Pixel Format nearest conversion table
|
// WIC Pixel Format nearest conversion table
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
@ -923,12 +918,7 @@ HRESULT SaveToWICMemory( const Image& image, DWORD flags, REFGUID containerForma
|
|||||||
blob.Release();
|
blob.Release();
|
||||||
|
|
||||||
ScopedObject<IStream> stream;
|
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 );
|
HRESULT hr = CreateStreamOnHGlobal( 0, TRUE, &stream );
|
||||||
#endif
|
|
||||||
if ( FAILED(hr) )
|
if ( FAILED(hr) )
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
@ -975,12 +965,7 @@ HRESULT SaveToWICMemory( const Image* images, size_t nimages, DWORD flags, REFGU
|
|||||||
blob.Release();
|
blob.Release();
|
||||||
|
|
||||||
ScopedObject<IStream> stream;
|
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 );
|
HRESULT hr = CreateStreamOnHGlobal( 0, TRUE, &stream );
|
||||||
#endif
|
|
||||||
if ( FAILED(hr) )
|
if ( FAILED(hr) )
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user