×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    17

    DirectX speeding up CreateTexture2d

    Hello,
    porting a game from android/ios to winRT and win phone 8.
    works perfect on winRT.
    however on win phone 8 on the nokia 920 we see a lot of slow down dealing with CreateTexture2D. mainly since we have to convert a lot of palleted textures to full RGBA images. could anyone recommend the best format to use to get the most performance? we already have 80% of our textures in DXT3 and DXT1 format (BC1 and BC2 in directx) however we simply have some images which are 16 color palleted images which we for one reason or another can not convert to dxt3 or dxt1

    Thank you very much.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,765

    Re: DirectX speeding up CreateTexture2d

    You may consider delivering the same images in a pre-processed format too. Full RGBA is certainly a bloated format for a 16-color image, but it is pretty probable that even a simple deflate will shrink it a lot.

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    17

    Re: DirectX speeding up CreateTexture2d

    i really wish we could pre-bloat them to full RGBA images. as i said though we can't change the format of the image. it seems though that CreateTexture2d takes a really long time. on the order of 34 milliseconds to create 26 textures. compared to opengl on the same adreno 225 chipset. this is very much hurting our product. guess i'll have to find someway to pre-load them....ugh.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,765

    Re: DirectX speeding up CreateTexture2d

    How about reducing the number of textures then? I admit I do not do much realtime graphics, but whenever I read about performance optimization techniques, the list usually contains this. The aim is usually not to speed up initialization, but to reduce the number of texture switches in rendering state. But it also affects initialization.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    968

    Re: DirectX speeding up CreateTexture2d

    Are you using the exact same textures as in WinRT? Given that the screen size of the phone is much smaller (despite having high-resolution) I would strongly suggest to reduce the size of the textures. Have you tried that?


    Also have you tried DirectX Toolkit? It Supports WP8:

    http://directxtk.codeplex.com/

    One of the features is a lightweight DDS texture loader.

    Features:

    SpriteBatch - simple & efficient 2D sprite rendering
    SpriteFont - bitmap based text rendering
    Effects - set of built-in shaders for common rendering tasks
    PrimitiveBatch - simple and efficient way to draw user primitives
    GeometricPrimitive - draws basic shapes such as cubes and spheres
    Model - draws simple meshes loaded from CMO or SDKMESH files
    CommonStates - factory providing commonly used D3D state objects
    VertexTypes - structures for commonly used vertex data formats
    DDSTextureLoader - light-weight DDS file texture loader
    WICTextureLoader - WIC-based image file texture loader

    ScreenGrab - light-weight screen shot saver

    I dont know if the WICTextureLoader works on the phone. As far as I know Windows Phone does not support WIC. But the DDSTextureLoader may be something to look at.

  6. #6
    Registered User
    Join Date
    Jan 2013
    Posts
    17

    Re: DirectX speeding up CreateTexture2d

    DDSTextureLoader converts to DXT1/3/5 which we are already doing. we've done numerous speed ups in other sections of the code and have gotten acceptable performance. so for now we are ok.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    968

    Re: DirectX speeding up CreateTexture2d

    Quote Originally Posted by hdxpete View Post
    DDSTextureLoader converts to DXT1/3/5 which we are already doing. we've done numerous speed ups in other sections of the code and have gotten acceptable performance. so for now we are ok.
    Thats great to know. Please do let us know when your project is published. Would love to take a look

Similar Threads

  1. Speeding up touch input.
    By linternet in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2011-04-04, 10:01
  2. Speeding up 1000% emulator startup
    By rubi13133 in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2008-07-29, 21:30
  3. mwldsym2.exe: Internal linker error for directx
    By fish_h in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-09-16, 18:03
  4. Replies: 0
    Last Post: 2005-01-13, 08:48
  5. Replies: 0
    Last Post: 2005-01-13, 08:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×