d3d9 | Direct3D9 wrapper for Go
kandi X-RAY | d3d9 Summary
kandi X-RAY | d3d9 Summary
This library is a pure Go wrapper for Microsoft's Direct3D9 API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of d3d9
d3d9 Key Features
d3d9 Examples and Code Snippets
Community Discussions
Trending Discussions on d3d9
QUESTION
Having such a simple DirectX application:
...ANSWER
Answered 2021-May-19 at 15:42The message loop likely never terminates.
QUESTION
I'm trying to draw CEF buffer (returned on OnPaint) to D3D9 texture of the game, and game randomly premanently freezes. I figured out that code provided below is the reason of the game freeze, but still can't understand. What did I miss?
...ANSWER
Answered 2021-Apr-28 at 20:54As discussed above, the paint event (and override method) are both called on the CefBrowser UI thread, and locking the same texture multiple times before it gets released will deadlock your entire D3D context.
The fix is to separate the paint event handler (which is responsible for saving the rendered Chrome image to an internal buffer) from the D3D render thread (which is responsible for uploading the internal buffer to the D3D texture and rendering with it).
QUESTION
There is a problem with run Unity project on Hyper-V virtual machine. To make a long story short, my Unity project is working on my PC, but doesn't work on a VM. I described this in detail here:
https://stackoverflow.com/q/65550732/5709159.
I found a crash log where Unity wrote everything. Because there is a restriction on number of chars that I can post on stack overflow I uploaded the full file here: https://drive.google.com/file/d/1xAtTUytNGH7WFSSIr8WGotCDrvQKW9f-/view, and here I just posted the last part of this file:
...ANSWER
Answered 2021-Jan-13 at 06:17The execution fails when it tries to enable or access a dedicated graphics card/driver:
QUESTION
I making a d3d9 app in C, but when trying to create a device object it fails in C, but its counterpart in C++ just works and returns S_OK.
C:
ANSWER
Answered 2020-Dec-11 at 15:40The ={}
initialization for a plain C struct only zeroes the memory.
Microsoft's own example at https://docs.microsoft.com/en-us/windows/win32/direct3d9/creating-a-device recommends ZeroMemory
for this:
QUESTION
I'm trying to create a transparent overlay over some process' window (I want to draw some stuff on the overlay using Direct3D 9).
The overlay is being created by using an external program (not a .dll injected library or something).
The problem is when I launch the program, an invisible overlay appears over the process window (and it even draws some text on it, so the WM_PAINT seems to be working), but in the next few seconds the cursor becomes a "sand clock" styled (sorry, I don't know how else is it called xd) and if I click on the window, it shows an error "The app is not responding" and becomes solid white.
I import the overlay class into the entry point file and here's how I run it in the main function (simplified):
...ANSWER
Answered 2020-Dec-04 at 07:34The reason for the access conflict is the setting of the hInstance
parameter in your WNDCLASSEX
structure. You can set it to GetModuleHandle(NULL)
;
Just like the code :
QUESTION
Hi I am trying to combine the given code with mine to output an array of pixels from the image, but the problem is 1) It outputs an empty array 2) memcpy fails with "unique_ptr to const void * ERROR" How to access pixels data from ID3D11Texture2D?
To be honest, I don't understand what the problem might be, because I did everything as it says. Help please, maybe I missed something.
...ANSWER
Answered 2020-Nov-29 at 18:40There are a few problems in your code, specifically you need to match AcquireFrame
/ReleaseFrame
calls and accept the fact that you don't necessarily get the picture in the first call. I explained this earlier in DXGI API: AcquireNextFrame() never grabs an updated image, always blank question.
I edited your code to make it work, see ADDED and REMOVED comments.
QUESTION
Yes I included all the libs but every time I run my program in x64 it gives me an unresolved symbol but works perfectly in x32??
Source ...Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol Direct3DCreate9Ex referenced in function "int cdecl DirectXInit(struct HWND *)" (?DirectXInit@@YAHPEAUHWND__@@@Z) DirectX Overlay D:\VSprojects\2020\Mygui\Garrysmod take 2\Overlay aimbot\DirectX.obj 1
ANSWER
Answered 2020-Oct-28 at 17:08x32 and x64 have different project configurations because you may need to point them to different library locations for each architecture. Double check to make sure that when you select x64 that the library and include directories still point to your DirectX include and libs folder.
You also need to make sure that under your includes
QUESTION
I needed to draw some simple shapes and I decided to go with D3D9. After going through a few of the tutorials on directxtutorial.com, I finally have all the code and knowledge I need to make my first shape appear on the screen. The problem is, though, that no image is appearing. I've looked over the code many times and have compared it with the code on the website, and it all checks out. Why is nothing rendering on the screen?
...ANSWER
Answered 2020-May-17 at 14:52Turns out my vertex positions weren't triangle enough to make a triangle. Thanks for the help, though, it reminded me to set up error-checking.
QUESTION
On the D3D10 Docs is a list which shows the deprecated features from D3D9 to D3D10. It says that W buffering is no longer supported and we should use high-precision depth buffers/Z-Buffers instead. I suspect that it is also not (fully) supported in Direct3D 11 and 12. But is there any way to use W-buffers in Direct3D 12?
...ANSWER
Answered 2020-Apr-24 at 20:17The "W-buffering" feature in Direct3D 9 is part of the legacy fixed-function pipeline. In Direct3D 10 and later, you can only use the programmable shader pipeline (or for DirectX 11+ the DirectCompute shader pipeline). Therefore, the 'w-buffering' hardware feature isn't relevant. This was also much more of an issue with Direct3D 9 era hardware when people were using 16-bit depth buffers.
In the programmable shader model, it's up to your shaders to compute depth values using either conventional z or linearized-depth values, and set the appropriate depth/stencil state. Beware that you need to use SV_DepthGreater
or SV_DepthLessEqual
instead of SV_Depth
to not lose 'early z rejection' optimizations.
See this blog post and this post for a good discussion of the topic.
TL;DR: Most people just use DXGI_FORMAT_D32_FLOAT
and don't worry about it.
QUESTION
I am following the process to create a trampoline in order to hook a dll function (in my case Direct3DCreate9 from d3d9.dll) as outlined here: https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-1.html and https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-2.html
My code differs slightly as I am working out the offset bytes manually using a disassembler rather than using the hde32_disasm function.
Everything seems to work fine, the victim process calls my injected dll wrapper function, the new function does some stuff, then calls the original function (Direct3DCreate9), once the original returns the wrapper should then call some other stuff, before returning to the victim process.
Unfortunately when the original function is called from the hook wrapper it returns back to the victim application and not the hook wrapper, this means it misses out some of the code from the wrapper.
Having stepped through the disassembly it looks as though the call stack is being overwritten so when the Direct3DCreate9 returns it pops back to the victim application instead of my hook function that made the call.
I'm guessing I need to push the hook function manually onto the call-stack? How would I go about this?
Other potentially pertinent information: Both the victim process and the hook have been built in debug mode. Direct3DCreate9 is a __stdcall and I am using vs2010 for the hook dll, but the victim process was compiled with vs2015.
...ANSWER
Answered 2020-Mar-25 at 17:30It turns out the callstack was being knobbled by the NVidia graphics driver nvd3d9wrap.dll. This dll was injecting into the d3d9 application in the same manner as what I was trying to do. This lead to the madness explained in the original post.
The solution was to open Device Manager in windows and disable the NVidia graphics driver. Thankfully my pc has an integrated graphics chip, so I am able to use that.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install d3d9
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page