MButchers

Members
  • Content count

    381
  • Joined

  • Last visited

Community Reputation

123 Neutral

About MButchers

  • Rank
    Member
  1. Many thanks .. will give it a go
  2. Hi Folks, i am currently getting to grips with Managed DX and am trying to make the application as resiliant as possible from the ground up, but am having problems when 'Switching the user' on windows. The device behaves properly after window resize/minimize/maximize and screensaver cut-in but I am still getting issues when switching users. What is the common method of handling this scenario? The log for the application ( reduced version ) is below Device successfully created Device Lost Device successfully reset Device Lost Device successfully reset Device Lost Device successfully reset Device Lost Device successfully reset Device Lost Device successfully reset Device Lost Device successfully reset Device Lost A first chance exception of type 'Microsoft.DirectX.Direct3D.DeviceLostException' occurred in Microsoft.DirectX.Direct3D.dll //////loads more ...... A first chance exception of type 'Microsoft.DirectX.Direct3D.DeviceLostException' occurred in Microsoft.DirectX.Direct3D.dll A first chance exception of type 'Microsoft.DirectX.Direct3D.DeviceNotResetException' occurred in Microsoft.DirectX.Direct3D.dll Device successfully reset A first chance exception of type 'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in Microsoft.DirectX.Direct3D.dll Any advice appreciated Mark
  3. Permadeath and why and how it can work

    One way to get around the .. ive died problem and all that time i put into this character is wasted is allow the player to 'save' the character to a sort of backup, this would then save the player specific state ( Inventory, Skills, Stat's etc ). If the player then dies at a later date then they could restore there character from this saved one ( this way they wouldn't loose all they have achieved in the game but they would still be set back! and wouldn't be able to just run in somewhere where they would almost certainly die! just to quickly get one item )
  4. [.net] Memory Woes

    Moving the ASMX web service pages out of the body of the main application and calling a Session.Abandon() on the final call to the service has fixed the problem. Cheers for all the help guys Mark
  5. [.net] Memory Woes

    Cheers Bracket for the input, will take a look at using the Cache as its a possiblility, the amount of data stored in the service varies, in this case it is to populate about 600 bookmarks in the word document. It may be possible for me to restructure the web-service to return the whole dataset to the client however this may cause a loss of speed! Personally I am trying to avoid using ATLAS and am writing my own web-service/javascript interaction functions, as they seem to be a lot faster and are easier to tune to application specific tasks :) Mark
  6. [.net] Memory Woes

    Thanks for the replys folks, The Word application is being instanciated from the Client's browser using javascript so dont have any memory issues with this, the memory is going mad on the server!! Quote: Try using just session.Abandon(). It might solve your problem Unfortunately I have other objects contained within the session which are needed within the application so this is not possible, however sessions do seem to be being abandoned by ASP.NET automatically as it runs out of memory! Quote: Quote:Original post by MButchers Sorry for the obscure title, but obscure problems deserve obscure titles! Just to be contrary, no, obscure problems need clear descriptive titles, so that those who might know about the problem are informed it deals with a topic they know, and which they might be able to help with. See your point :) Am going to look into moving the WebService into its own process, this should at least isolate it from the main application and stop the main app from crashing !! Many Thanks Mark
  7. Sorry for the obscure title, but obscure problems deserve obscure titles! Anyway onto the problem, I have created an ASP.NET web application with a .NET web service embedded within the application, everything runs fine until a call is made into the web service (this is called from the client using javascript to retrieve data to populate a word document), once this is done every page navigation results in an increase in memory usage (typically about 2mb per navigation) for the ASP.NET worker process and as a result it is running out of memory. The WebMethod has EnableSession=true and stores a dataset within the session, however this is removed using the following code so cannot possibly be causing the issue private void ClearOutput(System.Web.SessionState.HttpSessionState session) { DataSet ds = session["OutputData"] as DataSet; if (ds != null) { ds.Clear(); ds.Dispose(); ds = null; session.Remove("OutputData"); GC.Collect(); } } Does anyone have any ideas as to what may be causing this issue? Im wracking my brains but cannot think why the webservice calls should result in this behaviour. Thanks in advance Mark
  8. Why are there lots of Racoons peering over the edge? But seriously, looking very nice :) Mark
  9. OpenGL Help! Adding OpenGL as a reference.

    Unfortunately VB.NET cannot just add a reference to an unmanaged Dll ( The same as all .NET languages ), which OpenGL32.Dll is. The best thing to do is use something like Tao which defines the entry points in the OpenGL32.Dll so they can be called from your .NET application. Cant remember the url but google should find something. I use Tao for all my .NET opengl work and it is generally fine :) My Projects
  10. Hi There, Reflection would be a good way to go on this, basically the simplest way is to create a class ( probably static ) which you get the method from using reflection. e.g. public static class Console { public static object ShowString(object message) { } public static object RunCMDLine(string line) { // //get command to run string command; //get parameters object[] parameters; //get the type of the object System.Type type = System.Type.GetType("MyAssemly.Console",false,true); //check for success if (type != null) { //get the methodinfo for the command System.Reflection.MethodInfo mi = type.GetMethod(command); //check for success if (mi != null) { //invoke the method return mi.Invoke(null, parameters); } } return null; } } hope it helps, theres probably syntax errors etc but should point you in the right direction Mark
  11. Repeating 2D Background

    Hi There, do you want the same tile to appear n x n times tiled or will you eventually have different textures per tile? if you want the same texture you can simply render 1 quad the size of your viewport and tile the texture across it by setting the correct texture state and specifying a glTexCoord of > 1 eg code to tile it 10 times [Source] //bind texture .. ... // //render glBegin(GL_QUADS); glColor3f(0,0,1); //only need to set this once glVertex3f(0,0,0); glTexCoord2f(0,0); glVertex3f(100,100,0); glTexCoord2f(10,10); .. and so on glEnd(); [/Source] you can then scroll the texture using the texture matrix Hope its of some help Mark
  12. Hi there, this is probably being caused by the 'Filtering' of the textures. If you can get away without using filtering try switching off filtering on textures by using GL_NEAREST, this should also give you a slight performance boost. Hope it helps Mark
  13. [.net] Tao users, please respond

    I've been using it for the past couple of years and have found it in the most part trouble free, the main issues I had were early on when trying to use the GLSL methods, however I just wrote my own COM wrapper around these and this now works exactly as I wanted it to. The Tao bindings for the GLSL methods have probably changed since though so I should get around to re-visiting this area :) and removing the COM objects!
  14. multiple heights

    How ive dealt with this is simular too ( if not identical ) to Dungeon Seige Within each model that represents a 'Tile' you mark a group of triangles as being the 'Floor' when the map is loaded these 'Floor' triangles are then built into a navigation mesh for purposes of collision detection and path finding. Hope this is of some help Mark My Projects Page
  15. If your using a database and speed isn't a vital issue you can also do eval calculations using SQL statements In Oracle SELECT 10 * 40 FROM dual In MS SQL Server and Access SELECT 10 * 40 You can then use a object which implements IDbCommand to do an ExecuteScalar to return the value. Mark