Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

My past experience has been with OpenGL, so I'm used to be able to specify a normal, texture, and color for every vertex. I'm now using MDX's CustomVertex, and I've found several different combinations. I've found textured+normal, normal+color, etc. But none of them allow all 3. If I want to have lighting, I need normals. But then I can't do both colors and textures, which forces me to create textures of several different colors, instead of allowing me to use the color of a vertex to blend and affect the color of the texture. Is there a way around this?

 

Thanks.

 

-Nick

Posted

You can use different vertex structure without using any customvertex structure.

Hovever I don't understan one thing:

you want color and normal?

why?

normal are use to lightmesh that means apply a color based on

light. You can use ambient color or emissive color.

anyway is possible

use a thing like this

structure newVertexType

dim position as vector3

dim color as integer...

 

etc

then use vertexformat to create the appropriate vertex format

Posted

here:

 

Dim x As VertexFormats = VertexFormats.Texture1 Or VertexFormats.Transformed Or VertexFormats.Diffuse

 

Texture1 means 1 texture

Transformed is wehre you use the normal(rhw)

diffuse is the color :-D

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...