d3d9 | Direct3D9 wrapper for Go

 by   gonutz Go Version: v1.2.1 License: MIT

kandi X-RAY | d3d9 Summary

kandi X-RAY | d3d9 Summary

d3d9 is a Go library. d3d9 has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This library is a pure Go wrapper for Microsoft's Direct3D9 API.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              d3d9 has a low active ecosystem.
              It has 137 star(s) with 13 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 8 have been closed. On average issues are closed in 1 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of d3d9 is v1.2.1

            kandi-Quality Quality

              d3d9 has no bugs reported.

            kandi-Security Security

              d3d9 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              d3d9 is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              d3d9 releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of d3d9
            Get all kandi verified functions for this library.

            d3d9 Key Features

            No Key Features are available at this moment for d3d9.

            d3d9 Examples and Code Snippets

            No Code Snippets are available at this moment for d3d9.

            Community Discussions

            QUESTION

            How to properly close/terminate a simple Windows app
            Asked 2021-May-19 at 15:52

            Having such a simple DirectX application:

            ...

            ANSWER

            Answered 2021-May-19 at 15:42

            The message loop likely never terminates.

            Source https://stackoverflow.com/questions/67606078

            QUESTION

            Drawing buffer to D3D9 texture
            Asked 2021-Apr-28 at 20:54

            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:54

            As 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).

            Source https://stackoverflow.com/questions/67301812

            QUESTION

            Unity VM crash (looks like acceleration issue)
            Asked 2021-Jan-20 at 11:17

            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:17

            The execution fails when it tries to enable or access a dedicated graphics card/driver:

            Source https://stackoverflow.com/questions/65560295

            QUESTION

            DirectX9 CreateDevice fails in C, but succeds in C++
            Asked 2020-Dec-11 at 16:03

            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:40

            The ={} 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:

            Source https://stackoverflow.com/questions/65254040

            QUESTION

            A window transparent overlay stops working after a few seconds
            Asked 2020-Dec-04 at 07:34

            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:34

            The 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 :

            Source https://stackoverflow.com/questions/65132481

            QUESTION

            DXGI outputs empty pixel array, memcpy also doesn't work
            Asked 2020-Nov-29 at 18:40

            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:40

            There 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.

            Source https://stackoverflow.com/questions/65063320

            QUESTION

            C++ DirectX 9 unresolved external symbol
            Asked 2020-Nov-02 at 13:09

            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??

            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

            Source ...

            ANSWER

            Answered 2020-Oct-28 at 17:08

            x32 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

            Source https://stackoverflow.com/questions/64576827

            QUESTION

            Direct3D9 not drawing?
            Asked 2020-May-17 at 14:52

            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:52

            Turns 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.

            Source https://stackoverflow.com/questions/61831774

            QUESTION

            W-Buffer(ing) in Direct3D 12
            Asked 2020-Apr-24 at 20:17

            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:17

            The "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.

            Source https://stackoverflow.com/questions/61407405

            QUESTION

            dll hook not updating callstack correctly when returning
            Asked 2020-Mar-25 at 17:30

            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:30

            It 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.

            Source https://stackoverflow.com/questions/60745389

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install d3d9

            Get and build the library with:. To run a Direct3D9 application you need to have d3d9.dll installed on your system. Luckily, all Windows versions starting with Windows XP have this pre-installed. This means that you will not need to ship any additional DLL with your application when using this library.

            Support

            See the GoDoc for the Go API. The functions are only documented very generally, to get more detailed information about the Direct3D9 API see the MSDN documentation.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/gonutz/d3d9.git

          • CLI

            gh repo clone gonutz/d3d9

          • sshUrl

            git@github.com:gonutz/d3d9.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link