Click here to Skip to main content
15,918,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Class Library and VS.NET standard Pin
Kevin McFarlane27-Oct-03 5:41
Kevin McFarlane27-Oct-03 5:41 
GeneralRe: C# Class Library and VS.NET standard Pin
John Arlen27-Oct-03 9:17
John Arlen27-Oct-03 9:17 
GeneralFocus and Button :eek: Pin
oOomen26-Oct-03 7:37
oOomen26-Oct-03 7:37 
GeneralRe: Focus and Button :eek: Pin
leppie26-Oct-03 10:33
leppie26-Oct-03 10:33 
GeneralRe: Focus and Button Pin
oOomen26-Oct-03 20:29
oOomen26-Oct-03 20:29 
GeneralCommand Promt window Pin
livss26-Oct-03 3:26
livss26-Oct-03 3:26 
GeneralRe: Command Promt window Pin
Ark26-Oct-03 4:08
Ark26-Oct-03 4:08 
GeneralDirectX and System.Math Pin
Ark26-Oct-03 2:56
Ark26-Oct-03 2:56 
Hi,

i have got some wired problem, for which i can not find the easy answer since i am new to c#. I wrote and application that uses Direct3D to render the mechanism. To drive the mechanism i use complex 6D numerical algorithm that uses System.Math to get solutions. Both graphical and mathematical parts work fine seperately. However when i want to run graphical interface and numerical engine in paralel in a single application i get the following problem(note if i compile two seperate aplications they run fine):

The System.Math starts to behave in a wired way, round function does not work well (i.e. if i try to round to two deciml places, it rounds to 10, or if i try to roung number 999 it rounds it to 1).

I tired to backtrack what causes the problem, and apaprently the probelm comes once create the d3d device is executed:

// Create the device<br />
device = new Device(graphicsSettings.AdapterOrdinal, graphicsSettings.DevType, windowed ? RenderTarget : this , createFlags, presentParams);


To write Direct3D engine, i directly adopted example 'Enhanced Mesh' provided by DirectXSDK.

I think something happens to memory or to recources, but not sure about it. Anyone has any ideas on how to solve this sort of problem?? Anything would be a value to me. IF someone is willing to look at the code files let me know by email to ark@centras.lt, and i will send them to you.

Thanks



ARK
Generalstatic constructors Pin
R. Thomas26-Oct-03 0:55
R. Thomas26-Oct-03 0:55 
GeneralRe: static constructors Pin
Blake Coverett26-Oct-03 2:10
Blake Coverett26-Oct-03 2:10 
GeneralRe: static constructors Pin
R. Thomas26-Oct-03 2:24
R. Thomas26-Oct-03 2:24 
GeneralRe: static constructors Pin
Blake Coverett26-Oct-03 2:39
Blake Coverett26-Oct-03 2:39 
GeneralRe: static constructors Pin
R. Thomas26-Oct-03 3:46
R. Thomas26-Oct-03 3:46 
GeneralRe: static constructors Pin
Blake Coverett26-Oct-03 4:09
Blake Coverett26-Oct-03 4:09 
GeneralRe: static constructors Pin
Heath Stewart26-Oct-03 5:58
protectorHeath Stewart26-Oct-03 5:58 
Generalstack and heap Pin
R. Thomas26-Oct-03 0:49
R. Thomas26-Oct-03 0:49 
GeneralRe: stack and heap Pin
Blake Coverett26-Oct-03 2:27
Blake Coverett26-Oct-03 2:27 
GeneralRe: stack and heap Pin
R. Thomas26-Oct-03 2:38
R. Thomas26-Oct-03 2:38 
GeneralRe: stack and heap Pin
Blake Coverett26-Oct-03 3:31
Blake Coverett26-Oct-03 3:31 
GeneralRe: stack and heap Pin
R. Thomas26-Oct-03 3:44
R. Thomas26-Oct-03 3:44 
GeneralRe: stack and heap Pin
Blake Coverett26-Oct-03 3:55
Blake Coverett26-Oct-03 3:55 
Generalremainder Pin
R. Thomas26-Oct-03 0:40
R. Thomas26-Oct-03 0:40 
GeneralRe: remainder Pin
leppie26-Oct-03 0:51
leppie26-Oct-03 0:51 
GeneralRe: remainder Pin
R. Thomas26-Oct-03 0:53
R. Thomas26-Oct-03 0:53 
GeneralRe: remainder Pin
Rakesh Rajan26-Oct-03 1:08
Rakesh Rajan26-Oct-03 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.