Jump to content

Masterxilo

Members
  • Posts

    379
  • Joined

  • Last visited

Everything posted by Masterxilo

  1. LoadScene should allow some kind of progress callback...
  2. I guess it checks the display modes available on the current system, that is, display and graphics card modes combined.
  3. The base model matrix (scaling, rotation, offset) starts at 0x1c in gmf files (and is 4*4*4 bytes in size obviously). It should be easy enough to write a program that can change this in case MeshBox doesn't work (I think the dl. link over there is broken).
  4. "Yes, for the theoretical aspect" Making a dll work in Java is a pretty difficult and annoying task. I think you even have to write some of wrapper dll with their API. Let me know how you'll do it. Once you get the base working, automating the conversion of the c headers shouldn't be too difficult and LE would have one more supported language!
  5. I don't think there's a way to do #1 directly in place, but you can copy the surface vertex by vertex... For #2 see any lua scrip that sets up a particle effect or transparent material. And for #3, use lua.
  6. It is a very bad idea to limit supported resolutions. It's so sad that many old games only support a limited amount of resolutions. But modern games should (and all I know do) support every resolution the user's system supports (no matter what resolutions are possible in like 10 years).
  7. That wouldn't exactly do what he wants.
  8. I('d) use this: http://www.hurricane-eye.webs.com/vms.html
  9. Masterxilo

    Strings

    All the std:: (template) classes are guaranteed to work in any complete C++ implementation.
  10. I just happened to be in need of this function myself and noticed that the current function I posted above limits the functionality that the generic "function()" might implement. With the above function, it wasn't possible to make it modify the hierarchy since that would lead to errors. In order to allow the called function to do pretty much anything, ForEachChildDo should rather look like: void ForEachChildDo(TEntity entity, void (*function)(TEntity,byte*), byte* extra = NULL, bool recursive = true, bool includeSelf = true) { // Store current children to allow function() to modify the hirarchy without causing any severe errors. int iChildren = CountChildren(entity); if (iChildren > 0) { TEntity* children = new TEntity[iChildren]; for (int i = 0; i < iChildren; i++) children[i] = GetChild(entity, i + 1); // Execute for (int i = 0; i < iChildren; i++) { if (recursive) ForEachChildDo(children[i], function, extra); else function(children[i], extra); } delete[] children; } if (includeSelf && EntityExists(entity))function(entity, extra); }
  11. Who puts all the media in the exe file?
  12. Can't you make all of them for the different compilers or whatever?
  13. Just use SetEntityMatrix. Here's the code I used for my physx wrapper for le (physx also gives you just a matrix): float nxMat[16]; actor->getGlobalPose().getColumnMajor44(nxMat); TVec16* mat = (TVec16*)nxMat; SetEntityMatrix(TEntity(actor->userData),*mat);
  14. Nisop is right. This fantastic base in combination with a good blurring method will look much better than current "low-res too few pixels linear interpolation blur and noise" you see in most realtime applications presently.
  15. Wow, very sharp shadows, looks great.
  16. If you have vista or 7, fraps should be able to record the whole desktop at least. There's an option called "monitor DWM". You must have aero theme enabled for this to work though.
  17. Hmm you shouldn't use raycasts on animated meshes, they don't hit the transformed triangles anyways.
  18. Yeah you can render to any buffer just fine with the opengl commands.
  19. As Pixel Perfect said you can modify some material keys at runtime using GetMaterialKey and SetMaterialKey. This doesn't work for all keys however. So you'd be better off writing a class that creates a temp material file, loads and deletes it to create materials at runtime. That's what I did anyway. Yes.
  20. I guess your problem is character encoding. You convert a pointer to an ASCII string to a wstr: WritePrivateProfileString((LPCWSTR)"Section", (LPCWSTR)"Key", "1", (LPCWSTR)"C:\Test.ini"); int result=GetPrivateProfileInt((LPCWSTR)"Section", (LPCWSTR)"Key", 0, (LPCWSTR)"C:\Test.ini"); So it won't understand where you want the file to be created because the bytes from "C:\Test.ini" interpreted as a wide char string are just garbage. For sure not an existing directory's name xD. In your case, you should have preceded all literals with L, like (L"Section", L"Key", L"1", L"C:\Test.ini"), then the casting wouldn't even be necessary. But is better to always provide string literals enclosed in the _T() macro (which adds the L"" when compiling unicode). Include "<tchar.h>" to use this. Also, never use LPCWSTR, LPCSTR, CHAR (= char), WCHAR explicitly when dealing whit text, but implicitly through LPCTSTR and TCHAR. And since this is probably for le, switch your Character Set (project options) to Multi-Byte (= ASCII). This will make windows.h to define WritePrivateProfileString as WritePrivateProfileStringA instead of WritePrivateProfileStringW as it is now. Your code should then look like this: WritePrivateProfileString(_T("Section"), _T("Key"), "1", _T("C:\Test.ini")); int result=GetPrivateProfileInt(_T("Section"), _T("Key"), 0, _T("C:\Test.ini")); PS: Simply casting pointer types is usually a bad idea most of times when the compiler complains about wrong argument types. This is a good read about character encoding with C/C++ and win api: http://msdn.microsoft.com/en-us/library/06b9yaeb.aspx
  21. Write a shader that makes use of the second uv set. The varying vec2 texcoord1; value is already calculated in the default .vert shader, so you only need to modify the pixel shader. Just add another texture lookup somewhere and use that color however you like. E.g. uniform sampler2D TEX_PRECALCLIGHT; ... precalculatedLighting = texture2D(TEX_PRECALCLIGHT,texcoord1); ... diffuse *= precalculatedLighting; And the wrapper .frag shader defines TEX_PRECALCLIGHT as texture1 or so.
  22. Wait so vegetation could be individually placed? So why doesn't the editor allow doing this then?
  23. Masterxilo

    3D Pixels

    CPU. I think a CUDA accelerated version of Newton is in dev., but I don't think this is used in LE.
×
×
  • Create New...