trying to make a minimal skeleton, no hardware rendering needs to take place, only need to get d3d9 caps before starting software textureprocessing/generation to file, to get max texturesize on system etc, max aviable memory for textures
should this be pcall, icall, invoke or what?
want help with this, after that I will share a skeleton, with a main sourcefile, calling a example proc in separate .inc file for anyone to be able to write their own procedural texturegeneration or modify existing textures for example downsize existing textures for lower end systems
for example homers earlier blend together different textures, could be made to file and scaled/smoothed to better hardware
caps D3DCAPS9 <0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0>
should this be pcall, icall, invoke or what?
pcall lpD3D.GetDeviceCaps,D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,ADDR caps
want help with this, after that I will share a skeleton, with a main sourcefile, calling a example proc in separate .inc file for anyone to be able to write their own procedural texturegeneration or modify existing textures for example downsize existing textures for lower end systems
for example homers earlier blend together different textures, could be made to file and scaled/smoothed to better hardware
If it's in ATC, it works here for me
set g_pD3D as IDirect3D9
set g_pd3dDevice as IDirect3DDevice9
....
....
mov g_pD3D,$invoke(Direct3DCreate9,D3D_SDK_VERSION)
pcall g_pD3D.GetDeviceCaps,D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,addr caps
print caps[4*22] ;MaxTextureWidth=2048
its ATC
its not my lucky day
first its syntax error with caps D3D9 data, I define the struct but it complains its too complex
its not my lucky day
first its syntax error with caps D3D9 data, I define the struct but it complains its too complex
If you can't figurre it out, show me the following:
-Your D3DCAPS9 struct definition
-Your IDirect3D9 interface definition
I'll compare them to mine and let you know what the issue is.
-Your D3DCAPS9 struct definition
-Your IDirect3D9 interface definition
I'll compare them to mine and let you know what the issue is.
If you can't figurre it out, show me the following:
-Your D3DCAPS9 struct definition
-Your IDirect3D9 interface definition
I'll compare them to mine and let you know what the issue is.
I just define D3DCAPS9 struct with 69 dwords, as I saw in dx9 sdk
IDirect3D9 is from your older ATC/DX9 skeleton and already works with rendering and the other interfaces, I guess bug can be in includefile?
This struct appears twice within D3DCAPS9
Here's my D3DCAPS9 struct
That should sort the problem out.
If not, we'll doublecheck the interface definition too, my ATC includes for DX9.0a had a few small bugs, my current ones are 9.0c
D3DVSHADERCAPS2_0 struct
Caps dword ?
DynamicFlowControlDepth dword ?
NumTemps dword ?
StaticFlowControlDepth dword ?
D3DVSHADERCAPS2_0 ends
Here's my D3DCAPS9 struct
D3DCAPS9 struct
; Device Info
DeviceType dword ?
AdapterOrdinal dword ?
; Caps from DX7 Draw
Caps dword ?
Caps2 dword ?
Caps3 dword ?
PresentationIntervals dword ?
; Cursor Caps
CursorCaps dword ?
; 3D Device Caps
DevCaps dword ?
PrimitiveMiscCaps dword ?
RasterCaps dword ?
ZCmpCaps dword ?
SrcBlendCaps dword ?
DestBlendCaps dword ?
AlphaCmpCaps dword ?
ShadeCaps dword ?
TextureCaps dword ?
TextureFilterCaps dword ? ;D3DPTFILTERCAPS for IDirect3DTexture9's
CubeTextureFilterCaps dword ? ;D3DPTFILTERCAPS for IDirect3DCubeTexture9's
VolumeTextureFilterCaps dword ? ;D3DPTFILTERCAPS for IDirect3DVolumeTexture9's
TextureAddressCaps dword ? ;D3DPTADDRESSCAPS for IDirect3DTexture9's
VolumeTextureAddressCaps dword ? ;D3DPTADDRESSCAPS for IDirect3DVolumeTexture9's
LineCaps dword ? ;D3DLINECAPS
MaxTextureWidth dword ?
MaxTextureHeight dword ?
MaxVolumeExtent dword ?
MaxTextureRepeat dword ?
MaxTextureAspectRatio dword ?
MaxAnisotropy dword ?
MaxVertexW FLOAT ?
GuardBandLeft FLOAT ?
GuardBandTop FLOAT ?
GuardBandRight FLOAT ?
GuardBandBottom FLOAT ?
ExtentsAdjust FLOAT ?
StencilCaps dword ?
FVFCaps dword ?
TextureOpCaps dword ?
MaxTextureBlendStages dword ?
MaxSimultaneousTextures dword ?
VertexProcessingCaps dword ?
MaxActiveLights dword ?
MaxUserClipPlanes dword ?
MaxVertexBlendMatrices dword ?
MaxVertexBlendMatrixIndex dword ?
MaxPointSize FLOAT ?
MaxPrimitiveCount dword ? ;Max number of primitives per DrawPrimitive call
MaxVertexIndex dword ?
MaxStreams dword ?
MaxStreamStride dword ? ;Max stride for SetStreamSource
VertexShaderVersion dword ?
MaxVertexShaderConst dword ? ;Number of vertex shader constant registers
PixelShaderVersion dword ?
PixelShader1xMaxValue FLOAT ? ;Max value storable in registers of ps.1.x shaders
; Here are the DX9 specific ones
DevCaps2 dword ?
MaxNpatchTessellationLevel FLOAT ?
Reserved5 dword ?
MasterAdapterOrdinal dword ? ;Ordinal of master adaptor for adapter group
AdapterOrdinalInGroup dword ? ;Ordinal inside the adapter group
NumberOfAdaptersInGroup dword ? ;Number of adapters in this adapter group (only if master)
DeclTypes dword ? ;Data types, supported in vertex declarations
NumSimultaneousRTs dword ? ;Will be at least 1
StretchRectFilterCaps dword ? ;Filter caps supported by StretchRect
VS20Caps D3DVSHADERCAPS2_0 <?>
PS20Caps D3DPSHADERCAPS2_0 <?>
VertexTextureFilterCaps dword ? ;D3DPTFILTERCAPS for IDirect3DTexture9's for texture, used in vertex shaders
MaxVShaderInstructionsExecuted dword ? ;Maximum number of vertex shader instructions that can be executed
MaxPShaderInstructionsExecuted dword ? ;Maximum number of pixel shader instructions that can be executed
MaxVertexShader30InstructionSlots dword ?
MaxPixelShader30InstructionSlots dword ?
D3DCAPS9 ends
That should sort the problem out.
If not, we'll doublecheck the interface definition too, my ATC includes for DX9.0a had a few small bugs, my current ones are 9.0c
Remember to set the structure's size BEFORE calling GetCaps. In one of the topics here in this board I have explained this VERY THOROUGHLY, so feel free to check it out.
uhm, D3DCAPS9 and size? No, you needn't/can't set its size. I checked the DX9 SDK examples, no such thing needed/possible. Since the IDirect3D9 class, that I have here, works perfectly, I figured I should share it again (see attachment).
Parameters' number isn't defined (lazy me), and D3DCAPS9 isn't defined either, but you can either define them yourself (only if necessary), or just have the documentation/headers as a reference while coding (which you have to do anyway).
Btw, Homer, I finally understood the beauty of Matrix4x4 and Quaternions :) ... I had to make a good camera - and mathematically it was impossible without matrices. But still, I use the shortcut of Vec6 (vec3 for position, vec3 for ZYX rotation) in the initial stage of computing world-coordinates of parented meshes. (it's still a bit faster - and I damn need any extra cycles, since I'm already pushing near the theoretical limit of these PDA devices :( )
Btw, I have a (rather) complete importer of scene+animation data of .lws (lightwave scene) files - I can share to anyone interested via email :) .
Parameters' number isn't defined (lazy me), and D3DCAPS9 isn't defined either, but you can either define them yourself (only if necessary), or just have the documentation/headers as a reference while coding (which you have to do anyway).
Btw, Homer, I finally understood the beauty of Matrix4x4 and Quaternions :) ... I had to make a good camera - and mathematically it was impossible without matrices. But still, I use the shortcut of Vec6 (vec3 for position, vec3 for ZYX rotation) in the initial stage of computing world-coordinates of parented meshes. (it's still a bit faster - and I damn need any extra cycles, since I'm already pushing near the theoretical limit of these PDA devices :( )
Btw, I have a (rather) complete importer of scene+animation data of .lws (lightwave scene) files - I can share to anyone interested via email :) .
uhm, D3DCAPS9 and size? No, you needn't/can't set its size. I checked the DX9 SDK examples, no such thing needed/possible.
You're right. Let's just say that I was too sleepy :mrgreen:
I myself have a tonne of such posts, np ;)