www.astonshell.com

Plug-ins and DirectX

 
Post new topic   Reply to topic    AstonShell.com Forum Index   Aston 1.x Plug-ins
View previous topic :: View next topic  
Author Message
Ingwar



Joined: 23 Apr 2007
Posts: 2

PostPosted: Mon Apr 23, 2007 9:13 pm    Post subject: Plug-ins and DirectX Reply with quote

Well... I wanted to create plugin that will use not Windows GDI, but DirectX. But i wonder... is Aston compatible with such plugins, 'cose I can't attach one to Aston. I created simple plugin that draws cube and tried to debug it...

Code:

void PLG_EXPORT InitGlobalModule(const PAstonData AstonData)
{
     // register class
    ....
    // create window
    ...

    AData.Node->Wnd = hWnd;
    GetClientRect(hWnd, &ClientRC);

   if( InitDirect3D(hWnd) == FALSE ){return;}

   M("InitDirect3D - OK");

   if( FALSE == InitIndexBuffer() )
   {
      M("InitIndexBuffer - error");
      UninitDirect3D();
      PostQuitMessage(0);
      return;
   }
   M("InitIndexBuffer - OK");
}


M("...") - it's just a simple MessageBox

So... i launch plugin. After message "InitDirect3D - OK" i see my window on desctop and a cube (picture is drawn correctly), but the TaskBar disappears. 0_o Then i press OK button on message "InitIndexBuffer - OK", function InitGlobalModule ends and Aston just closes. What could be the problem?

Anyone tried to write plugins with DirectX?




D3D_2.JPG
 Description:
 Filesize:  8.6 KB
 Viewed:  4346 Time(s)

D3D_2.JPG



D3D_1.JPG
 Description:
 Filesize:  7.55 KB
 Viewed:  4346 Time(s)

D3D_1.JPG


Back to top
View user's profile Send private message
Veratil



Joined: 29 Aug 2003
Posts: 3536
Location: Texas

PostPosted: Tue Apr 24, 2007 9:05 am    Post subject: Reply with quote

paste the file, or attach... whichever lol

_________________

ASTONSHELL.COM FORUM MODERATOR
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Ingwar



Joined: 23 Apr 2007
Posts: 2

PostPosted: Tue Apr 24, 2007 12:04 pm    Post subject: Reply with quote

Ops. Rolling Eyes Here is the source code and the executable of the plugin.



FirstD3D.rar
 Description:

Download
 Filename:  FirstD3D.rar
 Filesize:  129.41 KB
 Downloaded:  777 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AstonShell.com Forum Index   Aston 1.x Plug-ins All times are GMT
Page 1 of 1
Jump to:  

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


This forum is available via an RSS feed  Click to see the XML version of this web page.

Copyright © 1999-2007 Gladiators Software