DirectX

Описание: Разработка и отладка приложений. Упор на 3D-графику.

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#1 dyvniy » Пт, 29 августа 2014, 14:15:00

Майкрософт. Новые директиксы.
http://msdn.microsoft.com/ru-ru/library/hh873117.aspx

#pragma comment( lib, "legacy_stdio_definitions.lib" )
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#2 dyvniy » Чт, 8 января 2015, 15:08:14

Библиотека, автоматически перенаправляющая OpenGL вызовы на DirectX.
То есть с иксами можно больше не заморачиваться!!!
http://www.gamedev.ru/code/forum/?id=196931

https://code.google.com/p/angleproject/
https://code.google.com/p/angleproject/wiki/DevSetup
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#3 dyvniy » Вт, 7 июля 2015, 12:04:40

CComPtr и другие умные весьма полезны для работы с DirectX
http://forum.sources.ru/index.php?showtopic=54853
Спойлер
Вам когда-нибудь надоедало все время писать объявление указателя на интерфейс, потом вызывать QueryInterface, после вызывать Release()?
Правильно.Вот и всем надоело.Поэтому написали шаблонный класс CComPtr инкапсулирующий указатель на интерфейс и автоматом вызывающий AddRef и Release и выполняющий много другой рутинной работы.Это как бы оболочка для указателя на интерфейс.
Его обычно называют "Умный указатель".
Вот пример:
ExpandedWrap disabled
CComPtr<IMyInterface> spShWin;//объявляем умный указатель на интерфейс
if (FAILED(spShWin.CoCreateInstance( __uuidof(IMyIntarface))))//собстенно создаем com объект и инкапсулированный указатель будет //указывать на запрашиваемый интерфейс
throw std::cout << "Couldn't create object spShWin";

Вот и все по поводу инициализации!
Теперь можно вызывать ф-ии.
ExpandedWrap disabled
spShWin->MyFunction();

Обрати внимание, что функции-члены CComPtr вызываются оператором "точка"(как в обращении к CoCreateInstance()), а методы интерфейса - с помошью перегруженного оператора ->( как только что мы вызвали MyFunction()).
И не надо в конце ничего вызывать для освобожения в конце проги.
А указатель CComQIPtr еще управляет автоматическими вызовами QueryInterface.
Представь, что у нас есть другой интерфейс IMyInterface2.
Создать на него указатель теперь можно так
ExpandedWrap disabled
CComQIPtr<IMyInterface2> spShWin2(spShWin);

И опять все.
Вызывай его методы.
Оба класса описаны в заголовочном файле Atlbase.h.
Думаю теперь понятно, что эта за запись
ExpandedWrap disabled
CComPtr< IGraphBuilder > m_pPlayGraph;

Здесь собственно создается объект умного указателя на интерфейс IGraphBuilder.НО он еще не на что не указывает и COM объект еще не создан.Потом надо вызвать m_pPlayGraph.CoCreateInstance( __uuidof(IGraphBuilder)).
ExpandedWrap disabled
CComQIPtr< IVideoWindow, &IID_IVideoWindow > pWindow = m_pPlayGraph;

Здесь мы создаем умный указатель на интерфейс IVideoWindow.
Здесь автоматом при создании умного указателя вызывается QueryInterface.
На случай если ты не знаешь про __uuidof, то это оператор, который извлекает GUID указанного интерфейса.
А вообще вот статья про __uuidof из MSDN.
https://msdn.microsoft.com/ru-ru/library/wc177dxw.aspx
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#4 dyvniy » Пт, 31 марта 2017, 18:46:06

https://blogs.msdn.microsoft.com/chuckw/2015/08/0 ... -the-directx-sdk-2015-edition/
Developer Runtime: The Windows 8.1 SDK or Windows 10 SDK is where you obtain the latest DirectX Developer Runtime
that is compatible with Windows 7, Windows 8.0, and Windows 8.1. The DirectX Developer Runtime for Windows 10 is an optional
Windows feature you enable in the operating system. You can also enable it on Windows 10 via the command-line using an admin prompt:
Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

Web installer
https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=35
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#5 dyvniy » Ср, 21 февраля 2018, 11:26:55

lune 2010 - last, now part of windows sdk
https://blogs.msdn.microsoft.com/chuckw/2015/08/0 ... -the-directx-sdk-2015-edition/
Спойлер
As noted on MSDN, the DirectX SDK is deprecated. The June 2010 release is the last release, and "DirectX" is now part of the Windows SDK. There are really only three scenarios where you should continue to use the old DirectX SDK:

You have code (or perhaps an older book) that makes use of D3DX9, D3DX10, D3DX11, or XACT Engine.
Your application uses use XAudio2 and supports Windows 7 systems.
You are targeting Windows XP with the alternate v1x0_xp Platform Toolset.
Remember that use of the legacy DirectX SDK is not supported for UWP app or Xbox One development.

Developer Runtime: The Windows 8.1 SDK or Windows 10 SDK is where you obtain the latest DirectX Developer Runtime that is compatible with Windows 7, Windows 8.0, and Windows 8.1. The DirectX Developer Runtime for Windows 10 is an optional Windows feature you enable in the operating system. You can also enable it on Windows 10 via the command-line using an admin prompt:

Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

D3DX: All versions of D3DX are deprecated including D3DX9, D3DX10, and D3DX11. See Living without D3DX for replacements and recommendations including DirectX Tool Kit, DirectXTex, DirectXMesh, and UVAtlas on GitHub.

FX: The latest version of Effects for Direct3D 11 is available on GitHub and does not require the legacy DirectX SDK or any version of D3DX.

DXUT: The latest version of DXUT for Direct3D 11 is available on GitHub and does not require the legacy DirectX SDK or any version of D3DX.

Tools: Some of the developer tools are in the Windows SDK others are not. See DirectX SDK Tools Catalog for a complete inventory.

Samples: A number of samples from the DirectX SDK (June 2010) release have been updated and posted to GitHub. They do not require the legacy DirectX SDK or any version of D3DX. See DirectX SDK Samples Catalog.

The Windows 10 SDK includes the latest headers and link libraries for DirectX including Direct3D 12.0, Direct3D 11.3, DXGI 1.4, Direct2D/DirectWrite 1.3, and XAudio 2.9.

Both the Windows 8.1 SDK Spring 2015 update and the Windows 10 SDK include Direct3D 11.0/11.1/11.2, DXGI 1.0/1.1/1.2/1.3, DirectXMath 3.07, and Direct2D/DirectWrite 1.0/1.1/1.2. They also include the legacy Direct3D 10.0/10.1, Direct3D9Ex, Direct3D 9 headers, DirectSound8, DirectInput8, and DirectMusic "core" APIs. See DirectX SDKs of a certain age for a full catalog of older DirectX APIs and their locations.

XInput: The Windows 10 SDK includes the Windows.Gaming.Input WinRT API which is supported on Windows 10. Both the Windows 8.1 SDK and Windows 10 SDK include XInput 1.4 which is supported on Windows 8.x and Windows 10. You should use XInput 9.1.0 to support Windows 7. See XINPUT and Windows 8 and DirectX Tool Kit: Now with GamePads.

XAudio: The Windows 10 SDK includes XAudio 2.9 which is supported on Windows 10. The Windows 8.1 SDK and Windows 10 SDK include XAudio 2.8 which is supported on Windows 8.x and Windows 10. You have to use the legacy DirectX SDK and XAudio 2.7 to support Windows 7. See XAudio2 and Windows 8 and Known Issues: XAudio 2.7.

DirectX SDK: If you need to make use of legacy DirectX SDK components such as D3DX9, D3DX10, D3DX11, or XAudio 2.7 with VS 2012, VS 2013 or VS 2015, see MSDN for details on mixing the Windows 8 or Windows 10 SDK correctly with the legacy DirectX SDK. Be sure to The Zombie DirectX SDK as well. If you are targeting Windows XP which makes use of the Windows 7.1A SDK, see Visual Studio 2012 Update 1.

DirectX 12
There is something called the DirectX 12 SDK which was used as a beta vehicle for the development of DirectX 12 through the Early Access Program. Now that the Windows 10 SDK is final, you don't need access to the DirectX 12 SDK at all. The DirectX 12 samples are on GitHub.

D3DX: Note that there is also a header file called d3dx12.h which is an all inline header with some utility code shipped in the GitHub samples. D3DX12 is not in any SDK, there's no DLL, and there's no REDIST for it. DirectX Tool Kit, DirectXTex, and DirectXMesh also support DirectX 12.
Изображение

dyvniy M
Автор темы, Администратор
Администратор
Аватара
dyvniy M
Автор темы, Администратор
Администратор
Возраст: 41
Репутация: 1
Лояльность: 1
Сообщения: 3579
Зарегистрирован: Ср, 10 октября 2012
С нами: 11 лет 5 месяцев
Профессия: Программист
Откуда: Россия, Москва
ICQ Сайт Skype ВКонтакте

#6 dyvniy » Вт, 20 марта 2018, 00:36:06

Матрица проекции имеет вид:
https://habrahabr.ru/post/252771/
*000
0*00
00**
00*0
Вложения
ll.jpg
ll.jpg (108.89 КБ) 763 просмотра
pro.PNG
pro.PNG (17.93 КБ) 764 просмотра
Изображение


Название раздела: Программирование (под Desktop и Android)
Описание: Разработка и отладка приложений. Упор на 3D-графику.

Быстрый ответ


Введите код в точности так, как вы его видите. Регистр символов не имеет значения.
Код подтверждения
:) ;) :hihi: :P :hah: :haha: :angel: :( :st: :_( :cool: 8-| :beee: :ham: :rrr: :grr: :* :secret: :stupid: :music: Ещё смайлики…
   

Вернуться в «Программирование (под Desktop и Android)»

Кто сейчас на форуме (по активности за 15 минут)

Сейчас этот раздел просматривают: 10 гостей