Why the OpenTK(C#) based rendering to texture showed nothing

190 Views Asked by At

My project aims to render to texture based on OpenTK (Version 3.0.1.0, C#). Most codes were translated from this tutorial which using C++.

I just want to use an texture(int backfaceTex) in the default render frame (pass#1). The texture backfaceTex stores the rendering results in an offline frame buffer. But when call the rendered buffer(pass#2), I can only see a black window right now. It seems that all elements of the backfaceTex are zero. Why? There should be a colored cube on the screen. A correct image

The code is short and simple, all relevant data/shaders were also attached for reproducing this issue. The private function Display() is the real rendering part.(2-pass rendering) render pipeline

I want to know which part of my implementation is wrong? Any ideas are welcome.

0

There are 0 best solutions below