Results 1 to 40 of 201

Thread: Direct2D Typelib+ for VB6

Hybrid View

  1. #1
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: Direct2D Typelib+ for VB6

    Hi baka,

    Yes, I'm trying to cobble together a DX8 project right now. It's just taking me a bit to get back up to speed with this stuff. You don't need a Typelib with DX8. Under the VB6 IDEs references, just explore to a copy of Dx8vb.dll, and you're all set. Worst case, just make sure that DLL is in your project's VBP folder, and then make sure the following line is near the top of your VBP file:

    Code:
    Reference=*\G{E1211242-8E94-11D1-8808-00C04FC2C603}#1.0#0#dx8vb.dll#DirectX 8 for Visual Basic Type Library
    And then, you can start using the object browser (F2) to explore that DLL's abilities. However, DirectX can be somewhat overwhelming, possibly more so than even GDI+. That's why examples of how to do things is of paramount importance.

    Also, just to say it, I'm not sure I see DirectX and GDI+ as terribly similar. Sure, they both render and display images. However, the GDI+ is truly meant to display those images in such a way that they can be edited and manipulated in a variety of ways. And, I think the big advantage that GDI+ brings to the table (as opposed to GDI32), is that it truly handles the alpha layer correctly. Although, it's my understanding that DirectX also handles alpha correctly, possibly in a much more complex way than either GDI32 or GDI+, in that it considers everything behind the object when working out the translucency and the actual color of each pixel.

    Now, I see DirectX as having a different purpose. Of the three (GDI32, GDI+, & DirectX), it's the only one (AFAIK) that makes full use of whatever GUI accelerator hardware we have. And, as such, it's really designed to be a "display" tool, as opposed to an "editing and image manipulation" tool. Sure, you can paint textures (i.e., images) on DX objects. And then, you can rotate and scale these objects, and their textures will rotate and scale with them. However, I don't think you could do brightness, gamma, color corrections and other adjustments to these textures-on-objects. Also, I'm not sure how you'd re-read a texture from an object's face (especially maintaining the way it's scaled and oriented). I suppose you could just read the pixels off the screen's DC, but hmmm.

    However, I'm not the guru on these things. Maybe DirectX is the correct tool for your needs.

    Good Luck,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  2. #2
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Direct2D Typelib+ for VB6

    Technically DirectX is already a typelib. Much like OpenGL is. Otherwise wed all be writing in assembly to access hardware. It's not hard to learn and pick up. Creating a library out of a library would not be worth it. Well unless you learn Unity or Unreal Engine. But even that's a learning curve. Just learn how to use DirectX. If you need to ask me any questions at all regarding it, I can help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width