Newbie question on D3D

Newbie question on D3D

Post by LeoArg » Sun, 27 Oct 2002 00:01:00



I'm trying to draw a cube but some triangles are partially transparent, but
it look like its only from one side.  I have declared (in VB):
Public Const D3DFVF_MYVERTEX = (D3DFVF_XYZ Or D3DFVF_DIFFUSE Or
D3DFVF_SPECULAR)

Other things that may be relevant:
Dim d3dpp As D3DPRESENT_PARAMETERS
Dim g_D3DDevice As Direct3DDevice8

d3dpp.Windowed = 1
d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
d3dpp.BackBufferFormat = Mode.Format
Set g_D3DDevice = g_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)

g_D3DDevice.SetRenderState D3DRS_CULLMODE, D3DCULL_NONE
g_D3DDevice.SetRenderState D3DRS_LIGHTING, 0

I'm not quite sure what the diffuse and specular do, but I have the diffuse
set to the color for the vertex, and the specular set to 0.  I am using a
triangle list, but I had the same problem when I tried to use a triangle
strip...

Please copy my email on replies:

Thanks!

 
 
 

Newbie question on D3D

Post by The March Har » Sun, 27 Oct 2002 01:28:03


Wouldn't this be more appropriate for the ../sdk ng?


> I'm trying to draw a cube but some triangles are partially transparent,
but
> it look like its only from one side.  I have declared (in VB):
> Public Const D3DFVF_MYVERTEX = (D3DFVF_XYZ Or D3DFVF_DIFFUSE Or
> D3DFVF_SPECULAR)

> Other things that may be relevant:
> Dim d3dpp As D3DPRESENT_PARAMETERS
> Dim g_D3DDevice As Direct3DDevice8

> d3dpp.Windowed = 1
> d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
> d3dpp.BackBufferFormat = Mode.Format
> Set g_D3DDevice = g_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
> hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)

> g_D3DDevice.SetRenderState D3DRS_CULLMODE, D3DCULL_NONE
> g_D3DDevice.SetRenderState D3DRS_LIGHTING, 0

> I'm not quite sure what the diffuse and specular do, but I have the
diffuse
> set to the color for the vertex, and the specular set to 0.  I am using a
> triangle list, but I had the same problem when I tried to use a triangle
> strip...

> Please copy my email on replies:

> Thanks!


 
 
 

Newbie question on D3D

Post by LeoArg » Sun, 27 Oct 2002 02:57:12


What exactly do you people discuss then, if not DirectX programming?  In my
experience, SDK goes into fits when they see DirectX and Visual Basic in the
same sentence...



> Wouldn't this be more appropriate for the ../sdk ng?



> > I'm trying to draw a cube but some triangles are partially transparent,
> but
> > it look like its only from one side.  I have declared (in VB):
> > Public Const D3DFVF_MYVERTEX = (D3DFVF_XYZ Or D3DFVF_DIFFUSE Or
> > D3DFVF_SPECULAR)

> > Other things that may be relevant:
> > Dim d3dpp As D3DPRESENT_PARAMETERS
> > Dim g_D3DDevice As Direct3DDevice8

> > d3dpp.Windowed = 1
> > d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
> > d3dpp.BackBufferFormat = Mode.Format
> > Set g_D3DDevice = g_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
> > hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)

> > g_D3DDevice.SetRenderState D3DRS_CULLMODE, D3DCULL_NONE
> > g_D3DDevice.SetRenderState D3DRS_LIGHTING, 0

> > I'm not quite sure what the diffuse and specular do, but I have the
> diffuse
> > set to the color for the vertex, and the specular set to 0.  I am using
a
> > triangle list, but I had the same problem when I tried to use a triangle
> > strip...

> > Please copy my email on replies:

> > Thanks!

 
 
 

1. D3D Beginners Question

Hi,
I started programing with C++Builder3 and I am trying to program some
DirectDraw and Direct3D things and got a problem.
  I imported the ddraw.h in wich the IID_IDirectDraw7 is defined by
DEFINE_GIUD( IID_IDirectDraw7, .....);
Now I want to use the GIUD in the DirectDrawCreateEx function and the error
message occurs:"[LinkError]Unresolved external '_IID_IDirectDraw7'
referenced from D:\....\Unit1.obj". I cannot find the reason! You are my
best chance to get some information. My informationresources don't tell me
something about this.

Thank you for your help.
And sorry for the bad English.

2. Interesting article on SAS/Goodnight

3. Couple of questions around D3D

4. help with ps2pdf

5. A D3D Camera/Viewpoint question

6. new feature ( select/apply ) tips.

7. Simple question (d3d, alpha blending)

8. Pioneer DRM-600 CD Jukebox

9. (newbie) makefile question (newbie)

10. Tricky exiting question (not a newbie question!)

11. How to tell if a window is a D3D render window

12. AVI Playback in full screen D3D application

13. D3D and color modes