Jump to content

Bill

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Bill

  1. I have a 5750 card with Intel I5 Win7. Both old CCC drivers (12.1) and latest drivers just installed(12.8) did not cause any lockups
  2. I can only speak to the code above - glancing at it, it looks fine to me. I can't help you with the other part of your message.
  3. Got it; Reply sent. Will follow up with messaging.
  4. Roland, if you ever need header updates for your testing or if there is something currrently missing I can provide something for you. I can auto-build you anything you need with TVec, Vector, float[] (it's all just a configuration for me); Leadwerks objects(TCamera, TLight), IntPtr... whatever. I can also provide header files with optional parameter support - currenly I only support VS10, but the old code for VS which doesn't support optional arguments directly should be commented out and available (not required for what you are doing as I believe that code requires VS10). I don't know how long you'll be playing with C# but at this time I plan on supporting LW 3.x. Forgot to mention I support command lines (DLL calls) as well as the Interface commands as in the engine.h.
  5. Just for closure, I had Leadwerks 2.25, 2.26, and 2.27 on my backup drive from my old PC. 2.2.5 is the only one which ran ZioRed's post and the Spectator tutorial 100% (all in C#) besides 2.40. The other versions had the issue I mentioned. I don't have 2.24 (or earlier?) and won't download it as it's meaningless to do so.
  6. I had a little bit of time to test more. I copied ZioRed's code, but I'm fairly certain it's right from the tutorial: Background: - Renamed 'C:\Program Files\Leadwerks Engine SDK' to 'C:\Program Files\zzzLeadwerks Engine SDK' and rebooted PC so I'm not having any version conflict with paths. - Leadwerks Am renaming currently used Leadwerks Engine SDK version to 'C:\Leadwerks Engine SDK' with a path to that directory -Am still testing with C# -Added class prefixes to code (for C#) -I have a C compatibility class so I don't need modify code with casts, changes, etc. such as 'while (!LW_CC.KeyHit(KEY.KEY_ESCAPE))' --Changed the scene file path from ZioRed's code. Verified on the Wiki tutorial it's what I have - most likely just a file name change for ZioRed //TModel scene = LW.LoadModel("abstract::tutorial_spectator.gmf"); TModel scene = LW.LoadModel("abstract::scene.gmf"); -Used my existing C# code for the barrels which drop. for (int n = 1; n <= 100; n++) { TEntity modelCopy = LW.CopyEntity(model.Entity); LW.PositionEntity(modelCopy, LW.Vec3(random.Next(-5, 5), random.Next(5, 15), random.Next(-5, 5))); LW.RotateEntity(modelCopy, LW.Vec3(random.Next(0, 360), random.Next(0, 360), random.Next(0, 360))); } -Other than that, ZioRed's code gave me the same result as I got from the Wiki - everything works except the barrels stay in mid-air. Leadwerks Engine 2.28 Initializing Renderer... OpenGL Version: 4.0.10151 Compatibility Profile Context GLSL Version: 4.00 Render device: ATI Radeon HD 5700 Series Vendor: ATI Technologies Inc. DrawBuffers2 supported: 1 16 texture units supported. GPU instancing supported: 1 Max batch size: 1024 Shader model 4.0 supported: 1 Conditional render supported: 0 Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//query.vert", ""... Loading model "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/scene.gmf"... Loading mesh "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/scene.gmf"... Loading material "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/concrete_floor01.mat"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/concrete_floor01.dds"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/concrete_floor01dot3.dds"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap.vert", "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap.frag"... Loading material "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/brickwall06.mat"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/brickwall06.dds"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/brickwall06dot3.dds"... Loading model "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrum.gmf"... Loading mesh "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrum.gmf"... Loading material "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrum.mat"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrum.dds"... Loading texture "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrumdot3.dds"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap.vert", "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_diffuse_bumpmap_specular.frag"... Loading mesh "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrumlod1.gmf"... Loading mesh "c:/users/bill/documents/projects/leadwerks/tutorials/spectator/making_a_spectator_files/oildrumlod2.gmf"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//mesh/mesh_shadow.vert", ""... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/depthblit.frag"... Loading texture "incbin::noise.dds"... Loading shader "zip::c:/leadwerks engine sdk/shaders.pak//postfilters/postfilter.vert", "zip::c:/leadwerks engine sdk/shaders.pak//lighting/directionallight.frag"... Terminate function Press any key to continue . . . [/Code] If I have time this evening, I'll try the following: -Retrieve my Leadwerks 2.28 engine backup and test that -Download VS2008 C++ (my real motivation here!) -Verify there is not an issue with my C# code for copying entities (I don't believe so as it works in 2.40)
  7. Yes, there appears to be something wrong here. I downloaded Leadwerks 2.8 and then found I already had it on my PC. Oops... I forgot it was in the Program Files directory! It would have been nice to test my original Leadwerks 2.8 but I have now overridden it. I tested against my C# code which is working against Leadwerks 2.40 and found errors. In the Making a Spectator tutorial I found the barrels created in the CopyEntity loop just hang in the air. If you don't do that loop things seem to work. I had tried the Load Scene tutorial. At this point I had switched the tutorial to a test scene for PureLight (an external scene not from the tutorial) and that is definately broken now. I'll try the original tutorial file but expect it to also be broken. I'll try ZioRed's code and also try to get any additional general information I can from testing. If i have time, I'll get my original 2.28 from my backup and test. I still seem to believe these worked at one time under 2.28, but I'm not confident to say that without testing.
  8. No, not really, if you just consider the parameter data for the function call on the stack passed to the engine DLL. It just depends on how you want to describe the data. Sorry if you thought I was telling you to interface to the DLL the way I described that. I should have stated more clearly that I don't use the Core framework. I try to pick and chose when I respond in these forums so I don't create confusion such as this. I was just trying to show I use the 'ref' keyword instead of unsafe code and was curious about performance differences between those. This is something I can easily test (and probably should have in the past) if I wasn't so lazy.
  9. Makes perfect sense. The worst that happens is you don't need/use it.
  10. This is sort of off topic... apologies. Here is an alternative if you don't want to mess with field offsets - I haven't found any issues but would appreciate to know if I'm wrong: [structLayout(LayoutKind.Sequential)] public struct TVec3 { public float X; public float Y; public float Z; } I don't know if setting the StructLayout atttribute is really needed as I don't know why the member order would be moved around because they are all the same data type, but it makes me feel better to add it. According to Microsoft when using Layout.Sequential with default packing: "Note that the default platform alignment will always pack identical types contiguously." Also... Do you find real speed advantages when using unsafe pointers vs safe code in this context? I did some small scale/limited C vs. C# speed tests early on and was pleasantly surprised using safe code. Note at my application level you don't need to use the 'ref' keyword, so it doesn't look klunky. Here's what I currently do for the raw call: [DllImport(EngineDll] public static extern void CameraUnproject(TCamera camera, ref TVec3 position);
  11. Note in my original post I mentioned some weird initial position. I re-watched the first part of the video and the behavior was identical to what I saw running the tutorial n my PC. So, I *assume* the second piece would also behave the same way. In that case, ignore my original comments as this tutorial works fine. Are we really talking about the "Making a spectator" tutorial here or am I confused (very possible)? I see it as the 13th tutorial from the top in the Wiki. I can't find 'CreateMaterial' or 'SetMaterialColor' in the tutorial, so I'm a little confused here. Please correct me (I was very much confused all day yesterday for whatever reason). As mentioned, I've recently gone through the tutorials and can easilly tell you what is working (the vast majority does work). If the errors are in your tutorial code and *not* in engine.h or related stuff as Mumbles mentioned I can compare notes for you.
  12. I think there may be something else wrong here. Unfortunately, I don't have c++ on this PC to test. But, I'm fairly certain the tutorial will mostly work. I have recently tested this tutorial in C# as I updated my compiler and needed to re-qual some code. As part of this process I re-download the files on 10/04/2010 so I had fresh files. Note: I've ran this with older versions of Leadwerks engine also. I've ran this tutorial in 4 sections based strongly on the lesson,where one section is uncommented at a time for testing: Note: C# code only for explanation to show 4 different tests performed based on lessons class Program { static void Main(string[] args) { Tutorial tutorial = new Tutorial(); tutorial.NoPhysics(); //tutorial.PhysicsBody(); //tutorial.Movement(); //tutorial.Collision(); } } The only issue I had was in the Physics Body and Movement segment where the spectator/camera initialized at a slightly wierd position and I didn't bother to figure it out as I was only concerned with compiler errors for the testing I was doing. Edit: I should mention I use Engine 2.40 Edit: removed double word Edit:spelling error
  13. This won't answer your question directly, but I can tell you how I do it: Inputs and outputs are of a given type, such as int, TVec3, bool, etc (uh...really?). Each input is registered to a delegate which will perform whatever is needed. In this sense, all inputs for a given node are non-related. Similarly, the outputs are non-related to each other. I just have a list of input connections and a list of output connections. When an input gets wired to an output, it's delegate is registered to the output it's connected to. So, the general flow is when an input receives data, it's delegate is fired. In turn, processing occurs, perhaps outputs are fired, so on and so on. So, how my stuff would work if I understand the Compare Int function (assuming 'In' is a trigger), when the A and B inputs receive data they will store off the data. When 'In' gets triggered if there is valid data at A and B the delegate registered to "In" would set the appropriate data in all the outputs and all the delegates registered to each of the outputs would in turn be fired.
  14. Will do (will test this weekend; a little bit behind due to scope creep) - I'll let you know if I have any issues related to what you advertise. Before I left, after I finished my thin OO layer with Leo equivalent API I decided I was tired of checking my naming conventions against the Wiki and Leo headers, not to mention I'd need to at least re-verify, if not have to do some modifications on every LW update. It worked out that what I had was 95% identical to Leo (how many different ways can you call entity.Move code?), language differences aside, so I decided to just auto-generate the code from the Leo headers. That said, working application code isn't as critical now as the compiler will complain when I go to use the generated code if there is an issue. Not to mention, I now get the advantange of using tested Leo code which saves me tons of testing. I will still use yours as the first test, however. As of now (unless it changes this weekend or I find existing code), my plan going forward is to port the C examples to Leo equivalent. That way I can test raw C# against equivalent OO. I do need to thank Lumooja and Roland Strålberg for the C header and Leo. I must admit I feel a little dirty generating code from Leo, but in both cases the effort is appreciated. I should have asked first; aplogies. But since the main goal here is matching API at the raw C# interface and thin OO layer it made sense.
  15. I just wanted to thank you for this. I'm just finishing up my C# Leo equivalent layer and was looking for some Leo code to use for testing. I was considering porting GameLib or searching for some other more Leo-focused code, but this will be an excellent first test. Although I've used the tutorials in the past for testing my C equivalent engine interface, this will be good for testing mixed mode. Although I probably won't use this until towards the end of the month (After backing up tomorrow morning I won't be developing again until towards the end of August) I will make use of it. Thanks again.
  16. Thanks Lazlo... sounds good. I won't need it until beginning of September. ZioRed mentioned it will be released soon, so this will work great for me.
  17. Sorry for this post as I am awaiting my 2.3 key and can't see the 2.3x downloads at this time. I've been away and am holding up getting access to the protected forum until I receive my new key. I am in the process of creating a C# wrapper with identical API to Leo C++ wrapper based on the 2.28 version and current Wiki. I will update as needed after getting the 2.3x download. I'm curious if such a thing already exists for 2.3x and I'm wasting my time as this is a three day effort for me based on what I currently have, not counting testing time. Last I know, the official c# engine interface used IntPtrs and float[]s, so I *assume* a C# Leo API equivalent does not exist at this time. Of course, I'm one day into this project(I'm up to joints!) before I realized I could post in the general section! Thanks for the help...Bill
×
×
  • Create New...