Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 01 Nov 2002
Offline Last Active May 18 2016 08:12 AM

Posts I've Made

In Topic: open source x file format library

22 April 2016 - 06:15 PM

i remember reading about this


In Topic: Problems displaying a mesh

04 July 2015 - 11:03 AM

you will still need lighting regardless if the mesh has no materials or textures

In Topic: Problems displaying a mesh

29 June 2015 - 01:05 PM

have you added a light source ?

// this is the function that sets up the lights and materials
void init_light(void)
    D3DLIGHT9 light;    // create the light struct
    D3DMATERIAL9 material;    // create the material struct

    ZeroMemory(&light, sizeof(light));    // clear out the light struct for use
    light.Type = D3DLIGHT_DIRECTIONAL;    // make the light type 'directional light'
    light.Diffuse = D3DXCOLOR(0.5f, 0.5f, 0.5f, 1.0f);    // set the light's color
    light.Direction = D3DXVECTOR3(-1.0f, -0.3f, -1.0f);

    d3ddev->SetLight(0, &light);    // send the light struct properties to light #0
    d3ddev->LightEnable(0, TRUE);    // turn on light #0

    ZeroMemory(&material, sizeof(D3DMATERIAL9));    // clear out the struct for use
    material.Diffuse = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);    // set diffuse color to white
    material.Ambient = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);    // set ambient color to white

    d3ddev->SetMaterial(&material);    // set the globably-used material to &material
//set these after you make the device
d3ddev->SetRenderState(D3DRS_LIGHTING, TRUE);    // turn on the 3D lighting
d3ddev->SetRenderState(D3DRS_ZENABLE, TRUE);    // turn on the z-buffer
d3ddev->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_XRGB(50, 50, 50));    // ambient light

In Topic: Basic Terrain editor help

29 June 2015 - 12:24 PM

when i do this


UINT vidx[3];
vidx[0] = ib[ faceIndex*3 + 0 ];
vidx[1] = ib[ faceIndex*3  + 1 ];
vidx[2] = ib[ faceIndex*3 + 2 ];


also where does .position come from?

In Topic: should i release my code?

15 June 2015 - 10:32 AM

yes , release it to gitub, ive always had problems with skinned meshs when not using the dx .x helper functions, does it use shaders as well?