4 messages in net.java.dev.jna.usersdirectx binding
FromSent OnAttachments
duschhaubeNov 7, 2007 4:36 am 
Timothy WallNov 7, 2007 5:42 am 
Timothy WallNov 7, 2007 5:53 am 
duschhaubeNov 7, 2007 6:49 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:directx bindingActions...
From:duschhaube (dusc@gmx.net)
Date:Nov 7, 2007 4:36:09 am
List:net.java.dev.jna.users

Hello,

I think about createing a directx binding for java. Do you think it is possible to use jna for this job or better use jni??

e.g

is it possible to map this code to java using jna: [code] typedef struct _D3DMATRIX { union { struct { float _11, _12, _13, _14; float _21, _22, _23, _24; float _31, _32, _33, _34; float _41, _42, _43, _44;

}; float m[4][4]; }; } D3DMATRIX; [/code]

or this one: [code] typedef interface IDirect3D9 IDirect3D9; [/code]

or this one: [code] #define INTERFACE IDirect3D9

DECLARE_INTERFACE_(IDirect3D9, IUnknown) { /*** IUnknown methods ***/ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE;

/*** IDirect3D9 methods ***/ STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE; STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE; STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter,DWORD
Flags,D3DADAPTER_IDENTIFIER9* pIdentifier) PURE; STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter,D3DFORMAT Format)
PURE; STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter,D3DFORMAT Format,UINT
Mode,D3DDISPLAYMODE* pMode) PURE; STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter,D3DDISPLAYMODE* pMode)
PURE; STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter,D3DDEVTYPE DevType,D3DFORMAT
AdapterFormat,D3DFORMAT BackBufferFormat,BOOL bWindowed) PURE; STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter,D3DDEVTYPE
DeviceType,D3DFORMAT AdapterFormat,DWORD Usage,D3DRESOURCETYPE RType,D3DFORMAT CheckFormat) PURE; STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter,D3DDEVTYPE
DeviceType,D3DFORMAT SurfaceFormat,BOOL Windowed,D3DMULTISAMPLE_TYPE MultiSampleType,DWORD* pQualityLevels) PURE; STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter,D3DDEVTYPE
DeviceType,D3DFORMAT AdapterFormat,D3DFORMAT RenderTargetFormat,D3DFORMAT DepthStencilFormat) PURE; STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter,D3DDEVTYPE
DeviceType,D3DFORMAT SourceFormat,D3DFORMAT TargetFormat) PURE; STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DCAPS9*
pCaps) PURE; STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE; STDMETHOD(CreateDevice)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,HWND
hFocusWindow,DWORD BehaviorFlags,D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DDevice9** ppReturnedDeviceInterface) PURE;

#ifdef D3D_DEBUG_INFO LPCWSTR Version; #endif }; [/code]

any suggestions are welcome.

ciao Thorsten