Results 1 to 4 of 4

Thread: Getting Started with Asphyre

  1. #1

    Cool Getting Started with Asphyre

    I am trying to get started with Asphyre, but having a few difficulties understanding how I should be using it..

    Is it intended that only one Asphyre engine is created per application, per form, or even per visible component? Or are there any recommendations/advisers here?

    I reference the example "TargetsNPanels" with two side-by-side TPanels. Is there a way (that I am missing) to track the SwapChainsIndex so that GameDevice.Render can be sent to a TPanel, or TButton, or whatever, (inside the constructor maybe) without having to index each one individually?


    What I am looking to do is to render to a TPanel that contains buttons and maybe other TPanels, all of which are animated with their own graphics

    Thanks

  2. #2
    What version of Asphyre are you using?

    In latest version of Asphyre / PXL (http://asphyre.net/products/pxl), the actual example illustrating it is called "FullScreenApp". Basically, you can specify any control that has a window handle attached to it (so TPanel will definitely work) and add to list of swap chains, then you simply pick what swap chain to render to.

    In case of DX11, the swap chains are created transparently for you and are associated by SwapChainIndex, so you first have to make association with a particular control before rendering to it. If you need to somehow manage multiple indices related to multiple controls, maybe you can use something like TDictionary between control pointer and swap chain index, so you can easily determine what control is associated with what index.

  3. #3
    What an oversight, that should have been my opening sentence! Currently I am stuck with Delphi 2007, and so I am using Asphyre v3.0.4.
    I will look more deeply at what you have said and see how I can make that work for me.

    Thank you for your reply

  4. #4
    Actually, making latest PXL for Delphi 2007 might not be that difficult by reusing some parts from Asphyre 3.x, mainly ZLib distribution. However, the principle is the same - for mapping different swap chain indices to different controls, instead of TDictionary, you might try using some different mechanism, e.g. a sorted array of control pointers with binary search, etc.

Bookmarks

Posting Permissions

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