Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


weired situation between Direct3D9 and OCX.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 SunkistOrange   Members   -  Reputation: 103

Like
0Likes
Like

Posted 08 April 2013 - 01:24 AM

Hi.

 

I experienced strange things..

 

is there some problem with compatibility between OCX and DirectX or VB6?

 

I only created Device (LPDIRECT3DDEVICE9) with IDirect3D9::CreateDevice() in OCX code.

 

and then I added this ocx Control to my application made in VB6.

 

but some reason, return value of Now function was incorrect after CreateDevice() called.

 

and there is another situation with Delphi.

 

i added ocx Control to my application made in Delphi6. but the value of devision was strange too.

 

for example ,

when i calcurate 4/2 ,

result value is  2 without CreateDevice(), but 1.99999.. after CreateDevice() called.

 

is there any idea?

 

DirectX SDK version is 2010JUNE.

is there some problem with compatibility between OCX and DirectX or VB6?

do i need to downgrade directX SDK? like DirectX 9.0b.. or lower. Or source code has a problem?

 

 

 m_d3dpp.BackBufferWidth            = 100;
 m_d3dpp.BackBufferHeight           = 100;
 m_d3dpp.BackBufferFormat           = D3DFMT_X8R8G8B8;
 m_d3dpp.BackBufferCount            = 1;
 m_d3dpp.MultiSampleType            = D3DMULTISAMPLE_NONE;
 m_d3dpp.MultiSampleQuality         = 0;
 m_d3dpp.SwapEffect                 = D3DSWAPEFFECT_COPY;
 m_d3dpp.hDeviceWindow              = m_hwnd;
 m_d3dpp.Windowed                   = m_bWindowed;
 m_d3dpp.Flags                      = 0;
 m_d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
  m_d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE;

 hr = m_pD3D9->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL , m_hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED , &m_d3dpp , &m_pD3Ddevice );
 

 

 

Thank you.


Edited by SunkistOrange, 08 April 2013 - 08:37 PM.


Sponsor:

#2 darrenmarklines   Members   -  Reputation: 200

Like
1Likes
Like

Posted 08 April 2013 - 05:52 AM

Your problems are floating point precision releated, try passing the flag 'D3DCREATE_FPU_PRESERVE' to the CreateDevice call.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS