A new article DirectX Tutorial (Part 1): Drawing the First Triangle has been released:
Author: Rorschach
New article DirectX Tutorial (Part I): Drawing the first triangle has been published:
Author: Rorschach
Sir:
Your this DX.mq5 issame as DXTutorial.mq5, and received the same error : Ошибка, не удалось создать графический контекст: 5151
I checked code and fond that DXContextCreate function fail ! all samples at https://www.mql5.com/en/articles/7708 gave same error.
When I change code as
Print("Before DXContextCreate"); m_dx_context = DXContextCreate(m_width, m_height); if(m_dx_context == INVALID_HANDLE) { Print("Ошибка, не удалось создать графический контекст: ", GetLastError()); return(false); } Print("After DXContextCreate");
received that
2023.05.09 18:32:21.723 DX (EURUSD,H1) Before DXContextCreate
2023.05.09 18:32:21.727 DX (EURUSD,H1) Ошибка, не удалось создать графический контекст: 5151
I can not debug it , my OS is windows server 2019 and display adapter is Nivida Quadro FX 1700, and DXdiag told that it support DirectX12

- www.mql5.com
Quadro FX 1700
The Quadro FX 1700 was an enthusiast-class professional graphics card by NVIDIA, launched on September 12th, 2007. Built on the 80 nm process, and based on the G84 graphics processor, in its G84-875-A2 variant, the card supports DirectX 11.1. Built on the 80 nm process, and based on the G84 graphics processor, in its G84-875-A2 variant, the card supports DirectX 11.1. Even though it supports DirectX 11, the feature level is only 10_0%. Even though it supports DirectX 11, the feature level is only 10_0 Even though it supports DirectX 11, the feature level is only 10_0 , which can be problematic with many DirectX 11 & DirectX 12 titles.
Try this.

- 2020.04.22
- www.mql5.com
problematic
Thanks!
yes, I find it, FX 1700's DirectX-feature-level only support to 10.0, it is an old diaplay adapter .
DXDiag: DirectX Version: DirectX 12, Chip type: Quadro FX 1700 Driver Date/Size: 2016-10-18 8:00:00, 17559200 bytes
DDI Version: 11.1 Feature Levels: 10_0,9_3,9_2,9_1 & nbsp; Driver Model: WDDM 1.2
I will try it, otherwise I maybe change my diaplay adapter at this server PC.
I test the code at my notepad PC with windows 11 OS, all run OK.
The Quadro FX 1700 was an enthusiast-class professional graphics card by NVIDIA, launched on September 12th, 2007. Built on the 80 nm process, and based on the G84 graphics processor, in its G84-875-A2 variant, the card supports DirectX 11.1. Built on the 80 nm process, and based on the G84 graphics processor, in its G84-875-A2 variant, the card supports DirectX 11.1. Even though it supports DirectX 11, the feature level is only 10_0%. Even though it supports DirectX 11, the feature level is only 10_0 Even though it supports DirectX 11, the feature level is only 10_0 , which can be problematic with many DirectX 11 & DirectX 12 titles.
Try this.
Thanks again !
When set Force WARP for MT, run OK !

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article DirectX Tutorial (Part I): Drawing the first triangle has been published:
It is an introductory article on DirectX, which describes specifics of operation with the API. It should help to understand the order in which its components are initialized. The article contains an example of how to write an MQL5 script which renders a triangle using DirectX.
Rendering primitives is the primary purpose of the graphics API. Modern video cards are adapted for quick rendering of a large number of triangles. Actually, at the current computer graphics development stage, the most effective way to draw 3D objects is to create a surface from polygons. A surface can be described by specifying only three points. 3D modeling software often use rectangles, but the graphics card will still force the polygons into triangles.
Mesh of triangles
Author: Rorschach