Jump to content

  • Log In with Google      Sign In   
  • Create Account


tupeltaja

Member Since 31 May 2010
Offline Last Active Oct 04 2012 06:52 AM

Topics I've Started

Texture zooming on ATI card jumpy

02 October 2012 - 02:05 AM

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.

DirectX9 and WPF D3DImage

25 June 2012 - 07:01 AM

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.

How to draw layers with a single pass

05 May 2011 - 08:34 AM

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?

[SlimDX] Surface not properly drawn with transparency

05 May 2011 - 04:26 AM

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)
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);

Render to buffer:

// get buffer
Surface buffer = m_dxDevice.GetBackBuffer(0, 0);

// draw to buffer
m_dxDevice.StretchRectangle(
	m_surface,
	drawRect,	
	buffer,
	drawRect,
	TextureFilter.None);
Thanks.

[SlimDX] MeasureString with "MS Outlook" font crashes

14 March 2011 - 04:50 AM

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.

PARTNERS