gradbot

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

113 Neutral

About gradbot

  • Rank
    Newbie

Personal Information

  1. OpenGL Render Depth to texture

    [quote name='mhagain' timestamp='1348572845' post='4983529'] It's very possible that blank white is actually correct. [/quote] Thanks mhagain! I was just doing that. It turns out all my Z data was between 0.998 and 1. I used the following code to see it. return (1 - Depth.Sample(Sampler, input.cords)) * 500;
  2. I ran into a similar error while using SlimDX with F#. For those of you who don't know what F# is, it's a type inferred functional .net language. Type inference is normally awesome but in this case caused an error. I'm posting this here so others can find this solution. [CODE]let result, device, swapChain = Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.None, swapChainDescription) let resource = Resource.FromSwapChain(swapChain, 0) [/CODE] Causes System.MissingMethodException to be thrown. Building from source I found it dying at this line. [CODE] T result = safe_cast<T>( T::typeid->InvokeMember( "FromPointerReflectionThunk", flags, nullptr, nullptr, args, CultureInfo::InvariantCulture ) ); [/CODE] Which again tells me that the method is missing. Finally I realized (thanks to this thread) that I needed to specify a type that did have the method. Adding <Texture2D> to the return type of FromSwapChain fixed the problem. F# was inferring the type to be Resource. The following works. [CODE]let result, device, swapChain = Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.None, swapChainDescription) let resource = Resource.FromSwapChain<Texture2D>(swapChain, 0)[/CODE]