Need help implementing 3D engine in C# using FBXSharp – Viewport won’t load; stays black; can’t import models

Ok, I need help because right now I’m clueless about what I’m supposed to do here. I am making an animation program in C# (.NET Framework 4.8) and so far it only has 2D functionality implemented on it (which works correctly and is not connected to the rest of the code for now), but I want it to have 3D functionality as well. So far I’ve been coding a 3D viewport on a new form (Form3.cs) with the following purpose:

  • Display a viewport.
  • Import FBX files.
  • Manipulate the camera.
  • Manipulate bones of said FBX files.
  • Allow the user to create keyframes to move/rotate said bones.
  • No modelling whatsoever: I want the models as is; just imported into the viewport.

The code seems correct and fine, the shaders are compiled correctly and the program imports them successfully, but for some reason, the viewport is completely blank. The viewport sometimes displays a black screen initially and turns gray when the form is reopened. Seems to me like the render target might not be updating correctly or the swap chain might not be presenting the content properly. Attempts to import FBX models result in an InvalidOperationException with the message “Operation is not valid due to the current state of the object” at FBXSharp.dll, which may suggest that the FBX model importer may not be handling certain states or inputs correctly. Even if the model is imported successfully, I need to make sure it is prepared correctly for rendering, which I haven’t been able to test.

The rendering loop reports that it renders the grid and models, but nothing is visible. I don’t know if it’s a problem with the actual draw calls, camera setup, or viewport settings. The viewport color clearing and depth stencil clearing are set, but the expected visual output (grid and models) is not appearing. The camera’s movement and rotation are supposed to be controlled via keyboard and mouse input; nothing happens. A few tries ago, I got it to only display a weird white line in the middle of a black window (maaaaaybe that was the viewport?); but I can’t even get that to show up now.

The renderForm is sometimes displayed with a black or gray screen. It is initialized multiple times when the form is reopened, which I assure you leads to resource conflicts. But also I need to keep it updated so that it is validated everytime and shows me the model in real time, right? So it’s either redundant initialization or incorrect handling of the swap chain and render target view.

The pressing issue I have here is that the rendering pipeline isn’t setup correctly, probably due to incorrect draw calls, improper camera setup, or issues with vertex and index buffers.

No idea what’s going on or why any of this is happening. I assure you the shaders (VertexShader.cso and PixelShader.cso) are compiled correctly with FXC. Thoughts?

Form3.cs is dependant on FBXSharp and ChamberLib as well as a project called FBXModelImporter which you may find at: https://github.com/izrik/ChamberLib.FbxSharp/tree/master — untouched in my project as is.

Here’s the complete code of Form3.cs:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using SharpDX;
using SharpDX.Direct3D;
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using Device = SharpDX.Direct3D11.Device;
using Buffer = SharpDX.Direct3D11.Buffer;
using _FbxSharp = global::FbxSharp;
using ChamberLib.Content;
using ChamberLib.FbxSharp;

namespace Intelligencecasinos_Animation_Maker
{
    public partial class Form3 : Form
    {
        private Device device;
        private SwapChain swapChain;
        private CustomRenderForm renderForm;
        private RenderTargetView renderTargetView;
        private ModelContent importedModel;
        private List<DirectXMesh> directXMeshes = new List<DirectXMesh>();
        private VertexShader vertexShader;
        private PixelShader pixelShader;
        private DepthStencilView depthStencilView;
        private InputLayout inputLayout;
        private Camera camera;
        private Buffer constantBuffer;

        public Form3()
        {
            InitializeComponent();
            this.Load += Form3_Load;
            this.KeyDown += Form3_KeyDown;
            this.MouseMove += Form3_MouseMove;
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            InitializeViewport();
            InitializeDepthStencil();
            LoadShaders();
            InitializeCamera();
            InitializeConstantBuffer();
            Application.Idle += Application_Idle;
        }

        private void InitializeViewport()
        {
            try
            {
                if (renderForm != null)
                {
                    return; // Prevent multiple initializations
                }

                Console.WriteLine("Initializing viewport...");

                renderForm = new CustomRenderForm();
                renderForm.ClientSize = viewportPanel.Size;
                renderForm.TopLevel = false;
                renderForm.FormBorderStyle = FormBorderStyle.None;
                viewportPanel.Controls.Add(renderForm);

                Console.WriteLine("Render form initialized with size: " + renderForm.ClientSize);

                var factory = new Factory1();
                Adapter1 adapter = null;

                foreach (var a in factory.Adapters1)
                {
                    var description = a.Description;
                    long dedicatedVideoMemory = (long)description.DedicatedVideoMemory;

                    Console.WriteLine($"Adapter: {description.Description}, Dedicated Video Memory: {dedicatedVideoMemory}");

                    if (dedicatedVideoMemory > 0)
                    {
                        adapter = a;
                        break;
                    }
                }

                if (adapter == null)
                {
                    throw new InvalidOperationException("A suitable adapter with positive DedicatedVideoMemory hasn't been found.");
                }

                Console.WriteLine("Selected adapter: " + adapter.Description.Description);

                var swapChainDescription = new SwapChainDescription()
                {
                    BufferCount = 1,
                    ModeDescription = new ModeDescription(renderForm.ClientSize.Width, renderForm.ClientSize.Height, new Rational(60, 1), Format.R8G8B8A8_UNorm),
                    IsWindowed = true,
                    OutputHandle = renderForm.Handle,
                    SampleDescription = new SampleDescription(1, 0),
                    SwapEffect = SwapEffect.Discard,
                    Usage = Usage.RenderTargetOutput
                };

                Device.CreateWithSwapChain(adapter, DeviceCreationFlags.None, swapChainDescription, out device, out swapChain);

                Console.WriteLine("Device and SwapChain created successfully.");

                using (var backBuffer = swapChain.GetBackBuffer<Texture2D>(0))
                {
                    renderTargetView = new RenderTargetView(device, backBuffer);
                }

                var context = device.ImmediateContext;
                context.OutputMerger.SetRenderTargets(renderTargetView);

                context.Rasterizer.SetViewport(new Viewport(0, 0, renderForm.ClientSize.Width, renderForm.ClientSize.Height));

                Console.WriteLine("Render target view and viewport set.");

                renderForm.Show();

                Console.WriteLine("Render form shown.");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception during viewport initialization: " + ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void InitializeDepthStencil()
        {
            try
            {
                var depthStencilDesc = new Texture2DDescription()
                {
                    Width = renderForm.ClientSize.Width,
                    Height = renderForm.ClientSize.Height,
                    MipLevels = 1,
                    ArraySize = 1,
                    Format = Format.D24_UNorm_S8_UInt,
                    SampleDescription = new SampleDescription(1, 0),
                    Usage = ResourceUsage.Default,
                    BindFlags = BindFlags.DepthStencil,
                    CpuAccessFlags = CpuAccessFlags.None,
                    OptionFlags = ResourceOptionFlags.None
                };

                using (var depthStencil = new Texture2D(device, depthStencilDesc))
                {
                    depthStencilView = new DepthStencilView(device, depthStencil);
                }

                device.ImmediateContext.OutputMerger.SetTargets(depthStencilView, renderTargetView);
                Console.WriteLine("Depth stencil initialized.");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception during depth stencil initialization: " + ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void LoadShaders()
        {
            try
            {
                Console.WriteLine("Loading shaders...");

                string vertexShaderPath = "D:/experimentz/FrameForge/FrameForge/Shaders/VertexShader.cso"; //temporary filepath
                string pixelShaderPath = "D:/experimentz/FrameForge/FrameForge/Shaders/PixelShader.cso"; //temporary filepath

                if (!File.Exists(vertexShaderPath))
                {
                    throw new FileNotFoundException("Vertex shader file not found.", vertexShaderPath);
                }

                if (!File.Exists(pixelShaderPath))
                {
                    throw new FileNotFoundException("Pixel shader file not found.", pixelShaderPath);
                }

                byte[] vertexShaderByteCode = File.ReadAllBytes(vertexShaderPath);
                byte[] pixelShaderByteCode = File.ReadAllBytes(pixelShaderPath);

                Console.WriteLine("Vertex Shader Bytecode (first 16 bytes): " + BitConverter.ToString(vertexShaderByteCode.Take(16).ToArray()));
                Console.WriteLine("Pixel Shader Bytecode (first 16 bytes): " + BitConverter.ToString(pixelShaderByteCode.Take(16).ToArray()));

                Console.WriteLine($"Vertex Shader Bytecode Length: {vertexShaderByteCode.Length}");
                Console.WriteLine($"Pixel Shader Bytecode Length: {pixelShaderByteCode.Length}");

                vertexShader = new VertexShader(device, vertexShaderByteCode);
                Console.WriteLine("Vertex shader created successfully.");

                pixelShader = new PixelShader(device, pixelShaderByteCode);
                Console.WriteLine("Pixel shader created successfully.");

                inputLayout = new InputLayout(device, vertexShaderByteCode, Vertex_PNT.InputElements);
                device.ImmediateContext.InputAssembler.InputLayout = inputLayout;
                Console.WriteLine("Input layout created and set successfully.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during shader loading: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void ImportFbxModel(string filePath)
        {
            try
            {
                var importer = new FbxModelImporter();
                Console.WriteLine($"Attempting to import FBX file: {filePath}");

                importedModel = importer.ImportModel(filePath, null);
                Console.WriteLine("FBX file imported successfully.");

                PrepareModelForRendering(importedModel);
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error importing FBX file: {ex.Message}");
                MessageBox.Show($"Error importing FBX file: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void PrepareModelForRendering(ModelContent model)
        {
            try
            {
                foreach (var mesh in model.Meshes)
                {
                    var directXMesh = new DirectXMesh(mesh);

                    foreach (var part in mesh.Parts)
                    {
                        var vertices = part.Vertexes.Vertices.Cast<Vertex_PNT>().ToArray();
                        var indexes = part.Indexes.Indexes.Select(i => (ushort)i).ToArray();

                        var vertexBufferDescription = new BufferDescription()
                        {
                            Usage = ResourceUsage.Default,
                            SizeInBytes = Utilities.SizeOf<Vertex_PNT>() * vertices.Length,
                            BindFlags = BindFlags.VertexBuffer,
                            CpuAccessFlags = CpuAccessFlags.None,
                            OptionFlags = ResourceOptionFlags.None,
                            StructureByteStride = 0
                        };

                        var vertexBufferDX = Buffer.Create(device, vertices, vertexBufferDescription);
                        directXMesh.VertexBuffersDX.Add(vertexBufferDX);

                        var indexBufferDescription = new BufferDescription()
                        {
                            Usage = ResourceUsage.Default,
                            SizeInBytes = Utilities.SizeOf<ushort>() * indexes.Length,
                            BindFlags = BindFlags.IndexBuffer,
                            CpuAccessFlags = CpuAccessFlags.None,
                            OptionFlags = ResourceOptionFlags.None,
                            StructureByteStride = 0
                        };

                        var indexBufferDX = Buffer.Create(device, indexes, indexBufferDescription);
                        directXMesh.IndexBuffersDX.Add(indexBufferDX);
                    }

                    directXMeshes.Add(directXMesh);
                }
                Console.WriteLine("Model prepared for rendering.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during model preparation: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void InitializeConstantBuffer()
        {
            try
            {
                constantBuffer = new Buffer(device, Utilities.SizeOf<Matrix>(), ResourceUsage.Default, BindFlags.ConstantBuffer, CpuAccessFlags.None, ResourceOptionFlags.None, 0);
                Console.WriteLine("Constant buffer initialized.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during constant buffer initialization: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void RenderModel(ModelContent model)
        {
            if (model == null)
            {
                Console.WriteLine("No model to render.");
                return;
            }

            try
            {
                var context = device.ImmediateContext;
                var viewProjectionMatrix = Matrix.Multiply(camera.ViewMatrix, camera.ProjectionMatrix);
                context.UpdateSubresource(ref viewProjectionMatrix, constantBuffer);
                context.VertexShader.SetConstantBuffer(0, constantBuffer);

                foreach (var directXMesh in directXMeshes)
                {
                    var mesh = directXMesh.MeshContent;

                    for (int i = 0; i < mesh.Parts.Count; i++)
                    {
                        var part = mesh.Parts[i];
                        var vertexBufferBinding = new VertexBufferBinding(directXMesh.VertexBuffersDX[i], Utilities.SizeOf<Vertex_PNT>(), 0);
                        context.InputAssembler.SetVertexBuffers(0, vertexBufferBinding);
                        context.InputAssembler.SetIndexBuffer(directXMesh.IndexBuffersDX[i], Format.R16_UInt, 0);
                        context.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList;
                        context.VertexShader.Set(vertexShader);
                        context.PixelShader.Set(pixelShader);
                        context.DrawIndexed(part.Indexes.Indexes.Length, 0, 0);
                    }
                }
                Console.WriteLine("Model rendered.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during model rendering: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void RenderGrid()
        {
            try
            {
                var context = device.ImmediateContext;
                context.ClearRenderTargetView(renderTargetView, new Color4(0, 0, 0, 1)); // Change to black
                context.ClearDepthStencilView(depthStencilView, DepthStencilClearFlags.Depth, 1.0f, 0);
                context.VertexShader.Set(vertexShader);
                context.PixelShader.Set(pixelShader);
                context.InputAssembler.InputLayout = inputLayout;
                context.InputAssembler.PrimitiveTopology = PrimitiveTopology.LineList;

                List<VertexPositionColor> gridVertices = new List<VertexPositionColor>();
                float gridSize = 10.0f;
                float gridStep = 1.0f;
                Color gridColor = Color.Gray;

                for (float i = -gridSize; i <= gridSize; i += gridStep)
                {
                    gridVertices.Add(new VertexPositionColor(new Vector3(i, 0, -gridSize), gridColor));
                    gridVertices.Add(new VertexPositionColor(new Vector3(i, 0, gridSize), gridColor));
                    gridVertices.Add(new VertexPositionColor(new Vector3(-gridSize, 0, i), gridColor));
                    gridVertices.Add(new VertexPositionColor(new Vector3(gridSize, 0, i), gridColor));
                }

                DataStream vertexStream = new DataStream(Marshal.SizeOf(typeof(VertexPositionColor)) * gridVertices.Count, true, true);
                vertexStream.WriteRange(gridVertices.ToArray());
                vertexStream.Position = 0;

                var vertexBufferDesc = new BufferDescription()
                {
                    Usage = ResourceUsage.Default,
                    SizeInBytes = (int)vertexStream.Length,
                    BindFlags = BindFlags.VertexBuffer,
                    CpuAccessFlags = CpuAccessFlags.None,
                    OptionFlags = ResourceOptionFlags.None
                };

                var vertexBuffer = new Buffer(device, vertexStream, vertexBufferDesc);
                context.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(vertexBuffer, Marshal.SizeOf(typeof(VertexPositionColor)), 0));
                context.Draw(gridVertices.Count, 0);
                Console.WriteLine("Grid rendered.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during grid rendering: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void Application_Idle(object sender, EventArgs e)
        {
            while (AppStillIdle)
            {
                RenderLoop();
            }
        }

        private bool AppStillIdle
        {
            get
            {
                NativeMethods.Message msg;
                return !NativeMethods.PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);
            }
        }

        public void RenderLoop()
        {
            Render();
        }

        private void Render()
        {
            RenderGrid();
            RenderModel(importedModel);
            swapChain.Present(1, PresentFlags.None);
        }

        private void Form3_KeyDown(object sender, KeyEventArgs e)
        {
            if (camera != null)
            {
                switch (e.KeyCode)
                {
                    case Keys.W:
                        camera.Move(new Vector3(0, 0, 1));
                        break;
                    case Keys.S:
                        camera.Move(new Vector3(0, 0, -1));
                        break;
                    case Keys.A:
                        camera.Move(new Vector3(-1, 0, 0));
                        break;
                    case Keys.D:
                        camera.Move(new Vector3(1, 0, 0));
                        break;
                    case Keys.Q:
                        camera.Move(new Vector3(0, -1, 0));
                        break;
                    case Keys.E:
                        camera.Move(new Vector3(0, 1, 0));
                        break;
                }
                Console.WriteLine("Camera moved.");
            }
        }

        private void Form3_MouseMove(object sender, MouseEventArgs e)
        {
            if (camera != null && e.Button == MouseButtons.Right)
            {
                float yaw = e.X * camera.RotationSpeed;
                float pitch = e.Y * camera.RotationSpeed;
                camera.Rotate(yaw, pitch);
                Console.WriteLine("Camera rotated.");
            }
        }

        private void InitializeCamera()
        {
            try
            {
                var aspectRatio = (float)renderForm.ClientSize.Width / renderForm.ClientSize.Height;
                camera = new Camera(new Vector3(0, 5, -10), Vector3.Zero, aspectRatio);
                Console.WriteLine("Camera initialized.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception during camera initialization: {ex.Message}");
                Console.WriteLine(ex.StackTrace);
            }
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var openFileDialog = new OpenFileDialog())
            {
                openFileDialog.Filter = "FBX files (*.fbx)|*.fbx";
                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    string filePath = openFileDialog.FileName;
                    ImportFbxModel(filePath);
                }
            }
        }

        public struct Vertex_PNT
        {
            public _FbxSharp.Vector3 Position;
            public _FbxSharp.Vector3 Normal;
            public _FbxSharp.Vector2 TextureCoords;

            public static readonly InputElement[] InputElements =
            {
                new InputElement("POSITION", 0, Format.R32G32B32_Float, 0, 0),
                new InputElement("NORMAL", 0, Format.R32G32B32_Float, 12, 0),
                new InputElement("TEXCOORD", 0, Format.R32G32_Float, 24, 0),
            };
        }

        public struct VertexPositionColor
        {
            public Vector3 Position;
            public Color Color;

            public VertexPositionColor(Vector3 position, Color color)
            {
                Position = position;
                Color = color;
            }
        }

        public class DirectXMesh
        {
            public MeshContent MeshContent { get; set; }
            public List<Buffer> VertexBuffersDX { get; set; } = new List<Buffer>();
            public List<Buffer> IndexBuffersDX { get; set; } = new List<Buffer>();

            public DirectXMesh(MeshContent meshContent)
            {
                MeshContent = meshContent;
            }
        }

    }

    public class CustomRenderForm : Form
    {
        public CustomRenderForm()
        {
            this.Text = "Viewport";
            this.ClientSize = new System.Drawing.Size(800, 600);
        }
    }

    public class Camera
    {
        public Vector3 Position { get; private set; }
        public Vector3 Target { get; private set; }
        public Matrix ViewMatrix { get; private set; }
        public Matrix ProjectionMatrix { get; private set; }

        public float MoveSpeed { get; set; } = 0.1f;
        public float RotationSpeed { get; set; } = 0.01f;

        public Camera(Vector3 position, Vector3 target, float aspectRatio)
        {
            Position = position;
            Target = target;
            UpdateViewMatrix();
            ProjectionMatrix = Matrix.PerspectiveFovLH((float)Math.PI / 4.0f, aspectRatio, 0.1f, 100.0f);
        }

        public void Move(Vector3 direction)
        {
            Position += direction * MoveSpeed;
            Target += direction * MoveSpeed;
            UpdateViewMatrix();
        }

        public void Rotate(float yaw, float pitch)
        {
            var forward = Vector3.Normalize(Target - Position);
            var right = Vector3.Normalize(Vector3.Cross(Vector3.UnitY, forward));
            var up = Vector3.Cross(forward, right);

            var rotationMatrix = Matrix.RotationYawPitchRoll(yaw * RotationSpeed, pitch * RotationSpeed, 0);
            var newForward = Vector3.TransformNormal(forward, rotationMatrix);

            Target = Position + newForward;
            UpdateViewMatrix();
        }

        private void UpdateViewMatrix()
        {
            ViewMatrix = Matrix.LookAtLH(Position, Target, Vector3.UnitY);
        }
    }

    internal static class NativeMethods
    {
        [StructLayout(LayoutKind.Sequential)]
        public struct Message
        {
            public IntPtr hWnd;
            public uint message;
            public IntPtr wParam;
            public IntPtr lParam;
            public uint time;
            public System.Drawing.Point p;
        }

        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool PeekMessage(out Message lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, uint wRemoveMsg);
    }
}

And here’s the console output in x64 debug mode:

Initializing viewport…
Render form initialized with size: {Width=1012, Height=619}
Adapter: NVIDIA GeForce GTX 1650, Dedicated Video Memory: 4154458112
Selected adapter: NVIDIA GeForce GTX 1650
Device and SwapChain created successfully.
Render target view and viewport set.
Render form shown.
Depth stencil initialized.
‘Intelligencecasino.exe’ (CLR v4.0.30319: Intelligencecasino.exe): ‘D:experimentzFrameForgeFrameForgebinDebugFbxSharp.dll’ cargado. El módulo se compiló sin símbolos.
Loading shaders…
Vertex Shader Bytecode (first 16 bytes): 44-58-42-43-60-FB-09-25-39-49-7F-E7-E4-1E-D0-3D
Pixel Shader Bytecode (first 16 bytes): 44-58-42-43-1F-A6-C1-D7-6B-24-4D-2C-6C-C2-7B-0C
Vertex Shader Bytecode Length: 1236
Pixel Shader Bytecode Length: 552
Vertex shader created successfully.
Pixel shader created successfully.
Input layout created and set successfully.
Camera initialized.
Constant buffer initialized.
Depth stencil initialized.
Loading shaders…
Vertex Shader Bytecode (first 16 bytes): 44-58-42-43-60-FB-09-25-39-49-7F-E7-E4-1E-D0-3D
Pixel Shader Bytecode (first 16 bytes): 44-58-42-43-1F-A6-C1-D7-6B-24-4D-2C-6C-C2-7B-0C
Vertex Shader Bytecode Length: 1236
Pixel Shader Bytecode Length: 552
Vertex shader created successfully.
Pixel shader created successfully.
Input layout created and set successfully.
Camera initialized.
Constant buffer initialized.
‘Intelligencecasino.exe’ (CLR v4.0.30319: Intelligencecasino.exe): ‘D:experimentzFrameForgeFrameForgebinDebugChamberLib.dll’ cargado.
Grid rendered.
No model to render.
Grid rendered.
No model to render.
Grid rendered.
No model to render.
Grid rendered.
No model to render.
Grid rendered.
No model to render. (…ad nauseam)

I tried initializing a custom render form (CustomRenderForm) within the main form (Form3). I created a Direct3D device and swap chain, set up a render target view and depth stencil view, configured the viewport to match the render form’s size.

The render form should’ve displayed a correctly initialized viewport, showing the background color initially and then rendering the grid and models. Instead, all it is showing me is a black screen which turns gray when the form is reopened.

Also implemented some logic to load vertex and pixel shaders from specified file paths, which would then create shaders and input layouts using the loaded shader bytecode to then set the input layout and shaders in the rendering context. And although said shaders were reported as successfully created, no visual output was seen on the viewport.

Then I implemented an FBX model importer using ChamberLib.FbxSharp and attempted to import FBX models and prepare them for rendering by creating vertex and index buffers. The FBX models should have been imported successfully and prepared for rendering, but the import process throws an InvalidOperationException, which I believe means that the viewport maybe isn’t correctly prepared.

Implemented a rendering loop that clears the render target and depth stencil view, attempted to render a grid and the imported models. Updated and presented the swap chain. Rendering loop reports that it rendered the grid and models, but nothing is visible on the viewport. Implemented keyboard and mouse controls to move and rotate the camera, nothing.

New contributor

aten intelligencecasino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật