|
delphi-3d-digest Sunday, July 6 1997 Volume 01 : Number 002
---------------------------------------------------------------------- Date: Fri, 4 Jul 1997 10:26:50 -0400 (EDT) From: "Jodi J. Showers" <jodi@DMachine.com> Subject: [delphi-3d] EInvalid Op - Help Whenever I load large meshes (~2,000 polygons) viewport.render issues an EInvalidOp "Invalid floating point operation". Occasionally I'll get an EZeroDivide as well. The mesh will load fine if I scale it down (meshbuilder.scale). The crash seems to happen on every variation of machine I can find. I've been through blake's includes, and think I've found the last of the discrepencies.
Has anyone had this problem? Any ideas? Questions? Stuck In Toronto, Jodi. DX3.0a RM Delphi 2.01 Jodi J. Showers / Jodi@DMachine.com Technical Director, Partner Digital Machine Interactive Inc. Toronto, ON Canada [v] (416) 406-1162 [f] (416) 766-4796 [c] (416) 720-9981 - -------- ------------------------------ Date: Fri, 4 Jul 1997 13:51:07 -0400 (EDT) From: "Jodi J. Showers" <jodi@DMachine.com> Subject: Re: [delphi-3d] EInvalid Op - Help At 10:26 AM 7/4/97 -0400, you wrote: >Whenever I load large meshes (~2,000 polygons) viewport.render issues an >EInvalidOp "Invalid floating point operation". I hate replying to my own email. sigh. It seems that *somewhere in directx or my code that FPU exceptions are being enabled after blake has so deliberatly disabled them. My interim solution is to DisableFPUExceptions; in my render loop. Not an ideal solution, but perhaps the best considering time constraints. If anybody can reproduce and/or suggest a solution I'm all ears ( -- ). Jodi. Jodi J. Showers / Jodi@DMachine.com Technical Director, Partner Digital Machine Interactive Inc. Toronto, ON Canada [v] (416) 406-1162 [f] (416) 766-4796 [c] (416) 720-9981 - -------- ------------------------------ Date: Sun, 6 Jul 1997 10:43:02 -0400 (EDT) From: "Jodi J. Showers" <jodi@DMachine.com> Subject: [delphi-3d] LoadTextureFromResource. Huh? Having problems loading a texture from a dll resource. LoadLibrary and FindResource are reporting success, but LoadTextureFromResource is reporting a D3DRMERR_BADFILE.
The call back is callin-backin just fine. Loading the texture from disk using LoadTexture() works dandy. any ideas. Jodi. - ---------------------------------------------------------------------------- - --------------------------- TextureInstance : THandle; Function GetTexture ( tex_name: PChar ; lpArg: Pointer ; var lpD3DRMTex: IDirect3DRMTexture ): HRESULT ; CDecl; var reshandle : HRSRC; TextureName : String; Begin { TextureName := ExtractFileName(String(tex_name)); TextureName := ExtractFilePath(Application.Exename) + 'Textures\' + TextureName; DXCheck(theWorld.FWindow.D3DRM.LoadTexture(Pchar(TextureName), lpD3DRMTex)); Result := D3DRM_OK;} TextureName := ChangeFileExt(ExtractFileName(String(tex_name)),''); ResHandle := FindResource(TextureInstance, PChar(TextureName), RT_BITMAP); if ResHandle <> 0 then Begin DXCheck(theWorld.FWindow.D3DRM.LoadTextureFromResource(ResHandle,lpD3DRM Tex)); Result := D3DRM_OK; End Else Begin ShowMessage(TextureName + ' Missing'); Result := D3DERR_TEXTURE_LOAD_FAILED; End; End; procedure TMainForm.FormCreate(Sender: TObject); var TextureLibrary : String; begin //Load up the actors TextureLibrary := 'Textures.dll'; TextureInstance := LoadLibrary(PChar(TextureLibrary)); if TextureInstance = 0 then Begin ShowMessage(TextureLibrary + ' not found'); Application.Terminate; end; End; Jodi J. Showers / Jodi@DMachine.com Technical Director, Partner Digital Machine Interactive Inc. Toronto, ON Canada [v] (416) 406-1162 [f] (416) 766-4796 [c] (416) 720-9981 - -------- ------------------------------ End of delphi-3d-digest V1 #2 ***************************** |