|
delphi-3d-digest Friday, July 4 1997 Volume 01 : Number 001
---------------------------------------------------------------------- Date: Wed, 2 Jul 1997 18:53:35 -0400 (EDT) From: "Jodi J. Showers" <jodi@DMachine.com> Subject: Another D2 BSTONE change Please make the following change to the texture callback declaration. The two changes are 1. the lpD3DRMTex should be a var (*IDirect3DRMTexture). 2. Calling convention is CDECL. D3DRMLOADTEXTURECALLBACK = function ( tex_name: PChar ; lpArg: Pointer ; var lpD3DRMTex: IDirect3DRMTexture ): HRESULT ; CDECL;
I just used this callback, but the others seem to have the same issue. The others still need to be verified and changed. Can Someone please post the ftp info for logging changes to the blake stone includes and I'll upload this.
Cheers, 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: Wed, 2 Jul 1997 17:22:29 -0700 From: "Daniel and Petra Spiess" <dspiess@frii.com> Subject: [ADMIN] Sorry for the mass mailing :) Hi, My ISP decided to change the software running our list. As you might already be aware, we ran into a problem and one message was send repeatedly. Basically the main list was on the digest's list. This problem has been fixed. On a positive note, things should run more smoothly. Again my apologies, Daniel Spiess ------------------------------ Date: Thu, 3 Jul 1997 12:17:16 -0400 From: Dean Thompson <ClassicSoftware@CompuServe.COM> Subject: [delphi-3d] How to get angles for glRotate? How can I derive the angles needed to pass into glRotate (I'm using OpenG= L) from an object's direction and up (and possibly, right) vectors? (These vectors are unit vectors relative to the object's origin). Once I know t= he angles of rotation around the x, y and z (global) axes I would use something like: glRotatef(xRot, 1.0, 0.0, 0.0); glRotatef(yRot, 0.0, 1.0, 0.0); glRotatef(zRot, 0.0, 0.0, 1.0); Note that the 3 vectors (direction, up, right) are being pulled out of th= e top 3x3 sub-matrix of a 4x4 transformation matrix that is updated (and re-normalized/re-orthoganilized) whenever the object changes direction bu= t if I try using the whole (4x4) matrix directly by calling glMultMatrix or= glLoadMatrix the object still rotates around the global x, y, z axes instead of around its local axes. I've got to the point where the view looks correct whenever the camera is= moved or rotated (I use the position and the direction and up vectors wit= h gluLookAt) but not for objects in the scene... TIA, Dean ------------------------------ Date: Thu, 3 Jul 1997 19:42:14 +0200 From: "Bart Pype" <gnorq@xs4all.nl> Subject: [delphi-3d] How to play large audio files using DirectSound ? Dear Delphi Freaks, I'm writing an application using Delphi3 which need to play large (40MB) audio files from CDrom. I have a simple DirectSound wrapper in Delphi to play&mix sounds in Delphi, but this code only works if the complete wavefile is loaded into RAM. Since not everybody has 64 MB of RAM, does anybody have some example code to play WAVfiles from a stream using Delphi3 and DirectSound ? Thanks in advance, Bart Pype (gnorq@xs4all.nl) ------------------------------ Date: Thu, 3 Jul 1997 11:57:01 -0700 From: "Daniel and Petra Spiess" <dspiess@frii.com> Subject: [delphi-3d] Anyone have troubles with ID3DRMMeshBuilder.GetVertices? Hi, I am trying to copy a mesh into another mesh, and I am having troubles with the GetVertices/Addfaces methods. In the new meshbuilder, I am getting the correct number of vertices but the incorrect number of faces. I am copying the mesh the following way : // the arrays are PVectorArray = ^TVectorArray; // dynamic vector array TVectorArray = Array[0..2048] of D3DVECTOR; PDWordArray = ^TDWordArray; // dynamic dword array TDWordArray = Array[0..2048] of DWORD;
// Initialize everything FaceArray := nil; Vertices := nil; Normals := nil; FaceData := nil; VCount := 0; NCount := 0; FaceSize := 0; // Get Counts DXCheck(SourceMesh.GetVertices(Vcount, Vertices^[0], NCount, Normals^[0], FaceSize, FaceData^[0])); // Allocate Space GetMem(Vertices, SizeOf(D3DVECTOR) * VCount); GetMem(Normals, SizeOf(D3DVECTOR) * NCount); GetMem(FaceData, SizeOf(DWORD) * FaceSize); // Get info DXCheck(SourceMesh.GetVertices(Vcount, Vertices^[0], NCount, Normals^[0], FaceSize, FaceData^[0])); // Copy info to new mesh DXCheck(DestMesh.ReserveSpace(VCount, NCount, FaceSize)); DXCheck(DestMesh.AddFaces(VCount, Vertices^[0], 0, Normals^[0], FaceData^[0], FaceArray)); For example, when I copy a cube I get 8 vertices and 3 faces. For a flat face, I get 8 vertices and 3 faces. A sphere seems to have 296 vertices and 4 faces. Is GetVertices buggy? I know AddFaces is working, however I never actually got it to work when I passed the normals. I always left that blank. Thanks for any help (I'm really stumped!) Daniel Spiess ------------------------------ Date: Thu, 3 Jul 1997 22:02:35 +0200 From: Simen Svale Skogsrud <simen@mop.no> Subject: [delphi-3d] What about shading strategies Hi, Oh, at last... my engine is starting to look decent. The perspective = correct texture mapper works fine (again, multitudes of thanks to Romesh for = pointing me in the right direction). I have now added a unit for palette = processing and calculation of shading tables. I have also added one programmer to the = team now, because we are running out of time... We are running in 8bit color and implemented the usual 256 by 256 byte = lookup table indexed with shading value and palette index to quickly find the = closest matching=20 palette entry to a shaded pixel. First we used solely RGB color model to = calculate the shaded colors, then looking them up in the palette. Now we have = implemented a HSV model as well, tweaking the V-value according to the shading = value, then=20 converting back to RGB and then look it up in the palette. This looks = quite good,=20 especially when "darkening" scenes. We have done test scenes with = brightly drawn textures that are mostly darkened during shading, and it works fine. I = have skimmed internet and a lot of Graphics literature (i do not have 'the Zen = of...') But as far as I can see there is a million approaches to shading the scenes and picking = the right colors (as for realistic "over exposure" etc) I wonder if anyone has any = pointers toward optically/perceptually realistic color models and eventually not so = realistic but rather cool shading effects. Yours sincerely, Simen - -------------------------------------------------------------- Simen Svale Skogsrud; simen@mop.no; Executive Producer Medieoperat=F8rene as; Nedre vaskegang 6; N-0186 Oslo; Norway mob:+47 90 77 90 24; tlf: +47 22 20 64 20; fax: +47 22 20 64 21 - -------- ------------------------------ Date: Fri, 4 Jul 1997 11:24:46 +0200 From: "Bart Pype" <gnorq@xs4all.nl> Subject: [delphi-3d] How to play large audiofiles using DirectSound, part 2 Sorry I forgot to mention that my app needs to load lots of hires photo's while music is playing, so I can't use CD audio tracks, it must be samples. Thanks for respons, but I hope to find some code I can use to play large audio files using streams. Bart Pype (gnorq@xs4all.nl) - --------
------------------------------ End of delphi-3d-digest V1 #1 ***************************** |