[Help] Direct3D Device from c++ menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    dealerchen's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Direct3D Device from c++

    Ok what im basicly tried to do is trying to render stuff from an injected c# dll on the unmanaged c++ Direct3DDevice9. (EndScene is already hooked so no i wont ask about how to do that)

    What i first tried is creating an c# Device Version out of the c++ Pointer wich actually worked, I could use Clear to fill my screen with a color. But i failed on drawing on it.
    (Code Copied from Quick DirectX tutorial in c# from Apoc as i dont have my code anymore.. but it was basicly the same):
    Code:
                CustomVertex.TransformedColored[] vertices = new CustomVertex.TransformedColored[3];
    
                vertices[0].Position = new Vector4(150f, 100f, 0f, 1f);
                vertices[0].Color = Color.Red.ToArgb();
                vertices[1].Position = new Vector4(this.Width / 2 + 100f, 100f, 0f, 1f);
                vertices[1].Color = Color.Green.ToArgb();
                vertices[2].Position = new Vector4(250f, 300f, 0f, 1f);
                vertices[2].Color = Color.Yellow.ToArgb();
    
                device.VertexFormat = CustomVertex.TransformedColored.Format;
                device.DrawUserPrimitives(PrimitiveType.TriangleList, 1, vertices);
    it didnt do an exception but nor displayed the Triangle on the screen.
    I think the problem is that the new Triangle is stored in managed memory and not unmanaged memory from the c++ device?

    My 2nd Idea is to get all Function pointers of the c++ device and try it that way but before im putting hours of work in this i wanted to ask if there is an easier way to do so. maybe i was on the right way and just missed something.

    i would be thankful for any help

    edit:
    another idea i just had while thinking about it again:
    could it be possible that the drawing worked BUT the triangle is somewhere i cant see it cause of the world camara settings?
    Last edited by dealerchen; 11-01-2009 at 10:04 AM. Reason: adding another question

    [Help] Direct3D Device from c++
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're drawing to WoW, you're going to need to setup quite a few transforms. The camera system in WoW is honestly; kinda screwy. They use mostly vertex shading, so the actual DX drawing layers are fun to work with.

  3. #3
    dealerchen's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your answer.
    Im still not quiet sure if my first attempt was that wrong.
    But if YOU already say its screwy then i should most likly start with something simpler then WoW to learn in deep how directx works (I only know basics from few tutorials in "own" created forms or using opengl engine funcs (hl1))

    still i dont really want to give up.
    i also found http://www.mmowned.com/forums/wow-me...ame-world.html wich also talks about the matrix settings being wrong and theirfor not showing up anything.

    Am i on the right way or should i drop it till i know more about it?

Similar Threads

  1. Immortal Bot help, much appreciated from a Wiz! Please! will rep
    By taehanpak in forum Diablo 3 Bots Questions & Requests
    Replies: 3
    Last Post: 07-14-2012, 02:05 AM
  2. [Help] auto dispell from raid member
    By lolo133 in forum WoW Memory Editing
    Replies: 4
    Last Post: 03-26-2012, 04:01 PM
  3. [Help] vb6 Reading from a random file
    By Murdok in forum Programming
    Replies: 3
    Last Post: 10-20-2008, 12:39 PM
  4. Help hiding wow from my dad
    By RichyG in forum World of Warcraft General
    Replies: 7
    Last Post: 12-01-2006, 09:09 PM
All times are GMT -5. The time now is 08:43 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search