Jump to content

  • Log In with Google      Sign In   
  • Create Account


thmfrnk

Member Since 17 Mar 2013
Offline Last Active Aug 09 2013 12:06 PM

Topics I've Started

DX9 Getting a Video on Texture

08 August 2013 - 02:49 PM

Hey,

 

so I'm looking for a way to render multiple video files (at the same time) on textures in realtime. In my old OpenGL applications I did in delphi I was using an AVI API to read the Framebuffer directly to the TextureMemory. This was ok, but with a lot of codec problems.. So for now SlimDX and DirectX 9 in .NET I'm looking for a better and cleaner way. I have found a lot about DirectShow.NET but its not really clear to me how to use it with SlimDX.  Does anybody have a tutorial or Demo shows me how to use it? 

 

Thx,

 

Thomas


DX9 Resize Window

05 July 2013 - 06:25 AM

Hi,

 

I know there are a lot of threads around the internet about that problem. I know that DirectX needs a Device Reset if Backbuffer needs to be resized. But I din't found any good solution to workaround that problem. I have windows application including also some dockingPanels.. so a lot of posibilities where the user can change the size of my directX window (i'm using a panel).

 

So actually I'm doing something like this to do one Reset:

1. Backup all Textures and Meshes with reading them back in a MemoryStream

2. Destroy all Objects Textures, Buffers, Targets..

3. Do a Device Reset

4. Recreate all Textures and Meshes by reading from MemoryStream

 

This procedure needs (with a small scene) around 2-3 Seconds on my monster PC.. I have no Idea how its on a small laptop..  This is very bad, because I saw some similar applications (also DX) where the resize seems to needs no time.. 

 

So I think there might be some possible solutions:

1. I heard about that the used Pool also defines that DirectX can make a copy on system memory automaticly but I have no Idea how to do this...

2. I was thinking about to create a fullscreen BackBuffer one time, and just render in a ViewPort which has correct Size/Position of my RenderPanel on Screen. But here I have no Idea how to get the output correct on the panel... and this could also reduce performance..

 

 

Finally I think this is a biggest problem of DirectX..., because before I was using OpenGL and there is no Problem like this.. Is that maybe fixed in DirectX10 or 11?

 

Hope somebody can help me..

 

 

 


Camera rotation around selected object

27 April 2013 - 09:13 AM

Hey,

 

I have the same problem like this guy here: http://www.gamedev.net/topic/175029-rotate-around-point-ala-cinema4d-problem/

So just want the same camera like in C4D. So i'm doing something like this:

 

MatCenterRotation * MatRotY * MatRotX * MatCamPos..

 

It works, but for sure, the camera will not stay at the same position while i'm selecting other objects..

I also tried to subtract the CenterRotationPoint from the MatCamPos, but this seems only work for one axis..

 

Any Idea to solve this problem?

 

Thx,

Thomas


GetSurfaceLevel or CreateRenderTarget - Performance

30 March 2013 - 01:48 AM

Hey,

 

I have to render a lot of textures as a prepass for my lighting pipeline. So in OpenGL I was creating one FBO and just attaching new textures, this is much faster than always binding an another FBO. In DX9 I know I have two posibilities.. First is just binding the Surface of the Texture to the Pipeline using SetRenderTarget(0, tex.GetSurfaceLevel(0)).. The other one is to Create a seperate RenderTarget and using StretchRectangle to blit it the result on a texture.. Which one would be faster? Or is there an another way?

 

Thanks,

Thomas


Change Effect Value while Shader is bounded

26 March 2013 - 12:27 PM

Hey,

 

I'm wondered that it is not possible to change a Shader Value (SetValue) of an Effect which was already bound.. In OpenGL it is possible to update any Uniform Variable even the shader still enabled. I think in some reasons this could cause a lot of CPU load. In my example I have a Scene graph including some meshes and each mesh haves a couble of subs with different materials. So I need to load (begin) and disable the shader for each sub, because of changing material and matrix... Same for my lighting pipeline.

 

I'm right or doing something wrong ?

 

Cheers,

Thomas


PARTNERS