http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Subject would be good) Direct3D for VB



You should get some type libraries and stuff if you're gonna program DirectX
on VB, but you could do like I and wait, because Micro$oft has promised that
version 7 of DirectX will support Visual Basic.
----- Original Message -----
From: Resquín <drweir@cvtci.com.ar>
To: <gameprogrammer@gameprogrammer.com>
Sent: Tuesday, September 07, 1999 5:51 PM


> Where  can I find a direct3drm fullscreen sample for Visual Basic 5?. I've
> got a sample writen for Visual C++.Here is a part of this code:
>
> file://create d3d retained mode interface
> Direct3DRMCreate(&d3drm);
> file://create directdraw interface
> DirectDrawCreate(0,&ddraw,0);
> ddraw->SetCooperativeLevel( hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN );
> ddraw->SetDisplayMode( modewidth, modeheight, modedepth );
> file://create the primary surface(with attached back surface)
> DDSURFACEDESC desc;
> desc.dwSize = sizeof(desc);
> desc.dwFlags = DDSD_BACKBUFFERCOUNT | DDSD_CAPS;
> desc.dwBackBufferCount = 1;
> desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE |
> DDSCAPS_FLIP | DDSCAPS_COMPLEX;
> ddraw->CreateSurface(&desc,&primsurf,0);
> file://create the attached back surface
> DDSCAPS ddscaps;
> ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
> primsurf->GetAttachedSurface(&ddscaps,&backsurf);
> file://create the zbuffer
> memset(&desc,0,sizeof(desc));
> desc.dwSize = sizeof(DDSURFACEDESC);
> desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT |DDSD_CAPS | DDSD_ZBUFFERBITDEPTH;
> desc.dwWidth = modewidth;
> desc.dwHeight = modeheight;
> desc.dwZBufferBitDepth = modedepth;
> desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER | DDSCAPS_SYSTEMMEMORY;
> ddraw->CreateSurface(&desc,&zbufsurf,0);
> backsurf->AddAttachedSurface(zbufsurf);
> file://create d3d device from directdraw surface
> d3drm->CreateDeviceFromSurface(0,ddraw,backsurf,&device);
> device->SetQuality(D3DRMRENDER_GOURAUD);
>
> My problem is that I'm using the Directx5 typelib by Patrick
> Scribe and there is no member "dwZBufferBitDepth" in the DDSURFACEDESC
> structure. Maybe I must change the typelib.
>
>
>
>
>
>
>
> =================================================================
> To SUBSCRIBE or UNSUBSCRIBE please visit
> http://gameprogrammer.com/mailinglist.html

=================================================================
To SUBSCRIBE or UNSUBSCRIBE please visit
http://gameprogrammer.com/mailinglist.html



  • References:
    • No Subject
      • From: "Resquín" <drweir@cvtci.com.ar>