tupeltaja

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

105 Neutral

About tupeltaja

  • Rank
    Member
  1. Texture zooming on ATI card jumpy

    Excellent brainworking! Seems to work, the u,v coordinates needs some fine-tuning for the texture to be on exactly correct position. Thank you very much!
  2. Texture zooming on ATI card jumpy

    Tested a bit more.. When zoomin in enough, a single texture pixel is drawn on window at size of 16x32 pixels, it won't get any larger after that. With NVidia at this level, the zooming is fine and one can zoom in more.
  3. Morning all, When drawing a texture, which is zoomed in a lot (get pixelated), the texture starts jumping all around on ATI Radeon HD 4600 card. Same application with NVidia Geforce 9500 GT and some Quadro card seems to be zoomable in a lot deeper before similar glitch. Also on NVidia the jumpyness begins smoother. Window size is normal desktop, no dual screen, no fullscreen. It seems, when drawing coordinates for texture are at about to exceed 16 bit limits, the behaviour start to occur. Texture size 2048x1024. When the width of draw rectangle is about 33k x 25k (varies due zooming), the jumping starts. We use SlimDx, if that should matter, and this occurs at least on Win7 64bit. Any quick workarounds or should we crop the image on certain zoom level when ATI cards are used? Thank you in advance.
  4. Morning all, I have a simple question and couldn't find certain answer. FYI, I could get SlimDX example using mixture of DirectX9 & DirectX10 and WPF D3DImage class working fine. Is it possible to use pure DirectX9 to render to D3DImage surface? Using DX10 would require too much rewriting, so it's not an option at this time. Thank you very much.
  5. I'd like to optimize drawing of more or less static visual items to layers, so that a layer could be drawn with a single call e.g. using a Surface for a layer. What is the suggested technique to draw layers in such a case?
  6. The problem was, that I didn't draw the transparent item to the valid buffer at all..
  7. Morning all, I draw to a separate Surface with ordinary methods (which will draw transparency properly if not using surface). When using the surface as render target, there is no transparency in the result. Otherwise it seems good. Can't tell whether this is due drawing to this surface or drawing the surface to buffer. So I'm doing something wrong. Any hints? Here are the related code snippets: Creation of target surface (buffer to draw to) [code] Surface surfaceCurrent = m_dxDevice.GetRenderTarget(0); SurfaceDescription desc = surfaceCurrent.Description; m_surface = Surface.CreateRenderTarget( m_dxDevice, m_iClientSizeW, m_iClientSizeH, Format.A8R8G8B8, desc.MultisampleType, desc.MultisampleQuality, false); m_rd.m_dxDevice.SetRenderTarget(0, m_surface); m_rd.m_dxDevice.Clear(ClearFlags.All, 0xffffff, 0, 0); // draw as usual ... // restore render target m_dxDevice.SetRenderTarget(0, surfaceCurrent); [/code] Render to buffer: [code] // get buffer Surface buffer = m_dxDevice.GetBackBuffer(0, 0); // draw to buffer m_dxDevice.StretchRectangle( m_surface, drawRect, buffer, drawRect, TextureFilter.None); [/code] Thanks.
  8. [quote name='Mike.Popoloski' timestamp='1300108537' post='4785587'] How are you passing UTF7 data to the MeasureString function? [/quote] I read the passed String as follows: [code]String strField = m_enc.GetString(aField).Trim();[/code] where m_enc is System.Text.Encoding.UTF7 and aField is byte array (byte[]). aField byte value range is between 32 (space)..117(w) for "L. Edward" (if i remember correctly, but in the limits of 7-bit ASCII anyway).
  9. Morning all, I'm trying to calculate text rectangle using SlimDX.Direct3D9X.Font method MeasureString. Usually it works well, but for some strings with "MS Outlook" font it crashes with "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Some other fonts works as expected. Tried with SlimDX SDK (August 2009) and SlimDX SDK (February 2010), Visual Studio 2008, Windows 7 64bit. Here are some examples of failed strings: L. Edward Laguna Mar Chiquita Lago Colhué Huapi Lagoa Minim O. Chërnoye Üüreg Nuur Works with these (and many more): Lago Ranco Lago Llanquihue Lake Äbaya Lake Turkana, (Lake Rudolf) The source data is in UTF7 format (dBase) and Strings look good in debugger. Any suggestions? Thank you.
  10. Morning everybeing, I noticed when developing graphing control, that when using SlimDX.Direct3D9.Device.DrawUserPrimitives(..) method with PrimitiveType.LineList and PrimitiveType.TriangleList starting from same x-coordinate, the actual drawn locations on x-axis are not always in the same display coordinates. I.e. when drawing line (359.2,10)-(359.2,20) and rectangle (359.2,22)-(370.2,32) (diagonal) the rectangle is drawn one pixel right of the line. I checked that the x-coordinates are same in the vertices list, so the error is at the slimdx or below. The error does not occur always and may depend on display/window size and its noticed on couple of ATI and NVidia cards. Workaround could be using same primitive (TriangleList) type for lines and rectangles, but that's a bit silly. Just curious, that have anybody else noticed issues like this?