Jump to content

  • Log In with Google      Sign In   
  • Create Account

Medo3337

Member Since 24 Apr 2012
Online Last Active Today, 10:45 AM

Posts I've Made

In Topic: 3D Box Texture Coordinates

Today, 07:58 AM

I found out that the problem I mentioned in the last post was related to the projection matrix and fixed it.

 

@Buckeye:

@ericrrichards22:

 

Thanks!


In Topic: 3D Box Texture Coordinates

Today, 04:24 AM

Something weird is happening, the box is getting another shape if I moved the camera to look at the box from certain angels:

Attached File  4848.png   67.27KB   0 downloads

 

The same box from another camera angel:

Attached File  12641.png   354.54KB   0 downloads


In Topic: 3D Box Texture Coordinates

Yesterday, 11:52 PM

@Buckeye: Can you please show me how the 24 vertices, uv, normal as well as the indices should be like?


In Topic: Supporting Multiple DirectX Versions

25 January 2015 - 12:09 PM

I guess D3D11 doesn't support vs_3_0 / ps_3_0.

 

There is something I'm not sure if I'm doing correctly.

 

For vertex buffers, D3D9 uses IDirect3DVertexBuffer9 while D3D11 uses ID3D11Buffer

 

What is the correct way to create a struct that handle both so I can use it in IRenderer?

 

Here is what I have right now:

struct EngineVertexBuffer
{
       ID3D11Buffer *D3D9_VB;
       IDirect3DVertexBuffer9 *D3D11_VB;
};

In Topic: Supporting Multiple DirectX Versions

25 January 2015 - 11:04 AM

@ryan20fun: The following doesn't work, if I changed LPCSTR pProfile parameter from vs_3_0 to vs_4_0 it will work

 ID3D10Blob *VS, *PS;
 D3DX11CompileFromFile("shader.fx", 0, 0, "VS", "vs_3_0", 0, 0, 0, &VS, 0, 0);
 D3DX11CompileFromFile("shader.fx", 0, 0, "PS", "ps_3_0", 0, 0, 0, &PS, 0, 0);

 device->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS);
 device->CreatePixelShader(PS->GetBufferPointer(), PS->GetBufferSize(), NULL, &pPS);

PARTNERS