Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1379 DX11 enchantments and Unicode build support

open
nobody
5
2012-03-11
2012-03-11
Bastian
No

- Unicode Build Support added
- DX11 minimizing the renderwindow works now without problems
- DX11 alpha blending support added
- DX11 Texture source cleanup

Discussion

1 2 > >> (Page 1 of 2)
  • Bastian
    Bastian
    2012-03-11

    • labels: --> enhancement
     
  • Memory leak in Ogre::MultibyteToWidechar(...)

     
  • Patch is not complete - it is based on some other patch, as it modifies not existed file OgreMain\include\Win32\OgreMultiByteToWideCharacter.h

    Also, function Ogre::OgreMultiByteToWideCharacter has confusing name as it returns narrow string if UNICODE is not defined.

     
  • Also, patch contains many modifications not related to its purpose.

    Another problem is with narrow strings interpretation - in one place in the Ogre it is interpreted as CP_OEM, that is wrong too, and you hardcoded CP_ACP interpretation. Things became little more complicated as modern C runtimes converts narrow strings to wide before wide OS call, and legacy C runtimes directly uses narrow OS calls that are sensitive to SetFileApisAnsi/Oem calls.

    I suggest to rewrite Ogre::MultiByteToWideChar function to always return wide string. Codepage must be selected between CP_OEM and CP_ACP based on AreFileApisAnsi() call, and all Win32 file system calls should be made explicitly to XxxW variants instead of just Xxx. And of course, memory leak needs to be fixed.

     
  • Was wrong about modifications not related to patch purpose - it seems that thay are declared, and this is just multi-purposed patch.

    Anyway, IMHO it`s better to split it to several patches, as their destiny can be different.

     
  • David Rogers
    David Rogers
    2012-03-27

    Yeah, could you separate at least the unicode patch out?

     
  • Bastian
    Bastian
    2012-03-28

    Sry for answering so late, I didn't had time.

    Yeah I will fix the memory leak and separate the patches.

     
  • Bastian
    Bastian
    2012-04-12

    DX11 Patches

     
  • Bastian
    Bastian
    2012-04-12

    Unicode Build Support

     
  • Bastian
    Bastian
    2012-04-12

    Now I had time to split it up.

    The Ogre Trunk Patches_3507.patch contains all Unicode Build Support Changes and the Ogre Trunk Patches_3506.patch contains all Patches from me for DX11.

     
1 2 > >> (Page 1 of 2)