This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class DebugUtil | |
| { | |
| public static void DumpRenderTexture(RenderTexture rt, string pngOutPath) | |
| { | |
| var oldRT = RenderTexture.active; | |
| var tex = new Texture2D(rt.width, rt.height); | |
| RenderTexture.active = rt; | |
| tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "H264_Decoder.h" | |
| H264_Decoder::H264_Decoder(h264_decoder_callback frameCallback, void* user) | |
| :codec(NULL) | |
| ,codec_context(NULL) | |
| ,parser(NULL) | |
| ,fp(NULL) | |
| ,frame(0) | |
| ,cb_frame(frameCallback) | |
| ,cb_user(user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System; | |
| using System.Runtime.InteropServices; | |
| public class LoadTexture : MonoBehaviour { | |
| [DllImport ("__Internal")] | |
| private static extern IntPtr CreateTexture(string filename, out int w, out int h); | |
| Texture2D tex = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Wizard to convert a cubemap to an equirectangular cubemap. | |
| // Put this into an /Editor folder | |
| // Run it from Tools > Cubemap to Equirectangular Map | |
| using UnityEditor; | |
| using UnityEngine; | |
| using System.IO; | |
| class CubemapToEquirectangularWizard : ScriptableWizard { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string> | |
| #include <ctime> | |
| #include <msgpack.hpp> | |
| struct message | |
| { | |
| std::string tag; | |
| std::time_t time; | |
| std::string text; | |
| MSGPACK_DEFINE(tag, time, text); |
NewerOlder