Example #1
0
        private static void generateBuffers()
        {
            if (Chat.fb != null)
            {
                return;
            }
            Chat.fb = new ThreadSafeFrameBuffer();

            Chat.db = new ThreadSafeDepthBuffer(150, 150);
            DisplayManager.getDisplayManager().addThreadSafeDepthBufferToMake(Chat.db);
            while (Chat.db.getDepthBuffer() == null)
            {
                continue;
            }

            Chat.bufferTexture = new LoadableTexture(Chat.db.getWidth(), Chat.db.getHeight());
            bufferTexture.loadNow();

            Chat.fb.setLoadableTextureToBind(Chat.bufferTexture);
            Chat.fb.setThreadSafeDepthBufferToBind(Chat.db);

            DisplayManager.getDisplayManager().addThreadSafeFrameBufferToMake(Chat.fb);
            while (Chat.fb.getFrameBuffer() == null)
            {
                continue;
            }
        }
		public void addThreadSafeFrameBufferToMake(ThreadSafeFrameBuffer tsfb) {lock(this.frameBuffersToMake) {this.frameBuffersToMake.Add(tsfb);}}