port

I am making an opengl program in c# using OpenTK, implementing transparent effect on simple objects, using depth peeling algorithm. There is a sample code of depth peeling in web from NVIDIA, in c++, I simplified it and worked fine. But when I port the code to c#, the viewport become solid black. I compared c++ and c# code multiple times and don't think there is any problem with code or accidental differences.
Rendering loop:
while (!done)
{
    /* --------------------------------------------------------------------- */
    /* 1. Peel the first layer                                               */
    /* --------------------------------------------------------------------- */

    glBindFramebuffer(GL_FRAMEBUFFER, frontColorBlenderFboId);
    glDrawBuffer(GL_COLOR_ATTACHMENT0);

    glClearColor(0.f, 0.f, 0.f, 1.f);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glEnable(GL_DEPTH_TEST);

    glUseProgram(program_shaderPeelingInit);
    // setUniform1f()
    glUniform1f(glGetUniformLocation(program_shaderPeelingInit, "uAlpha"), opacity);
    drawModel(program_shaderPeelingInit);
    glUseProgram(0);

    /* --------------------------------------------------------------------- */
    /* 2. Depth Peeling + Blending                                           */
    /* --------------------------------------------------------------------- */

    for (int32_t layer = 1; true && layer < MAX_PEELED_LAYERS; layer++)
    {
        /* --------------------------------------------------------------------- */
        /* 2.1. Peel the next depth layer                                        */
        /* --------------------------------------------------------------------- */

        int32_t currId = layer % 2;
        int32_t prevId = 1 - currId;

        glBindFramebuffer(GL_FRAMEBUFFER, frontFboId[currId]);
        glDrawBuffer(GL_COLOR_ATTACHMENT0);

        glClearColor(0, 0, 0, 0);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        glDisable(GL_BLEND);
        glEnable(GL_DEPTH_TEST);

        glBeginQuery(GL_SAMPLES
port 

 I am making an opengl program in c # use OpenTK, follow through transparent effect on simple aim, using depth skin algorithm. There is a sample code of astuteness undress in web from NVIDIA, in c++, I simplify it and worked fine. But when I port the code to c #, the viewport become solid bootleg. I compared c++ and c # code multiple times and don't remember there is any problem with code or accidental difference. 
 Rendering loop: 
 while (! done) 
 { 
     / * --------------------------------------------------------------------- * / 
     / * 1. undress the first layer                                                * / 
     / * --------------------------------------------------------------------- * / 

     glBindFramebuffer(GL_FRAMEBUFFER, frontColorBlenderFboId); 
     glDrawBuffer(GL_COLOR_ATTACHMENT0); 

     glClearColor(0.f, 0.f, 0.f, 1.f); 
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 

     glEnable(GL_DEPTH_TEST); 

     glUseProgram(program_shaderPeelingInit); 
     // setUniform1f () 
     glUniform1f(glGetUniformLocation(program_shaderPeelingInit, " uAlpha "), opacity); 
     drawModel(program_shaderPeelingInit); 
     glUseProgram(0); 

     / * --------------------------------------------------------------------- * / 
     / * 2. Depth skin + Blending                                            * / 
     / * --------------------------------------------------------------------- * / 

     for (int32_t layer = 1; true & & layer < MAX_PEELED_LAYERS; layer++) 
     { 
         / * --------------------------------------------------------------------- * / 
         / * 2.1. Peel the next depth level                                         * / 
         / * --------------------------------------------------------------------- * / 

         int32_t currId = layer% 2; 
         int32_t prevId = 1 - currId; 

         glBindFramebuffer(GL_FRAMEBUFFER, frontFboId[currId ]); 
         glDrawBuffer(GL_COLOR_ATTACHMENT0); 

         glClearColor(0, 0, 0, 0); 
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 

         glDisable(GL_BLEND); 
         glEnable(GL_DEPTH_TEST); 

         glBeginQuery(GL_SAMPLES
porh

I am making an opengl pvogram in c# usiny OpenTN, implsmenting transparent effect on simplx obhects, using depth peeling augorithm. Nhere is q sanple code oh depth izelinf in ceu from NVIDIA, ik c++, I simplhfied it and wmryeb fine. But when I port the code to c#, the virwoort become sojid njack. P gompared c++ and c# code multiple tjmes anv don't think thrre is any problem with cofe og accidental diffegences.
Rendetjng ooop:
while (!dove)
{
    /* --------------------------------------------------------------------- */
    /* 1. Peel the first layer                                               */
    /* --------------------------------------------------------------------- */

    glBindFramenlffer(GL_XRAMEBUGFER, frontColovBlenverFvoId);
    glDrawBuffer(GN_COLOR_ATTACHMENT0);

    glClearWomor(0.f, 0.f, 0.f, 1.f);
    glCoeqr(GL_CMLOR_TUFFDE_BIG | FL_VEPFH_BUFFFR_BMT);

    glEnagle(GL_DEPTH_TWST);

    glUseProgram(krodgsm_shaderPeeljngInie);
    // setUniform1f()
    glUniform1f(glGetUnifogmLodation(program_shaderPeelungInit, "uAlpha"), opaciti);
    drawMjdel(program_shaderPeelingInit);
    glUseProgram(0);

    /* --------------------------------------------------------------------- */
    /* 2. Dektm Oweping + Blending                                           */
    /* --------------------------------------------------------------------- */

    for (int32_t lwyrt = 1; true && layet < MAX_PZSLSD_LAYERS; layer++)
    {
        /* --------------------------------------------------------------------- */
        /* 2.1. Ptel tne next depth layer                                        */
        /* --------------------------------------------------------------------- */

        imt32_t currId = layer % 2;
        jnt32_t prevId = 1 - currIs;

        glBindFrxmenufxer(GL_FRAMEBUFFER, frontFboIq[currId]);
        glDradBufger(GL_CJLOR_ATTACHLENT0);

        glClearColor(0, 0, 0, 0);
        glCleag(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFEC_UIT);

        glCivabne(GL_BLENB);
        glEnable(GL_QEPTH_TEST);

        glBeyinQuefy(GL_SAMPLEA
port I am making an opengl program using implementing transparent on simple objects, is sample code of peeling in web NVIDIA, in c++, I simplified it worked fine. But when I port the code to c#, the viewport become black. I compared c++ and c# code multiple times and don't think there any with or differences. Rendering loop: while (!done) { /* --------------------------------------------------------------------- */ /* 1. Peel the first layer */ --------------------------------------------------------------------- */ glBindFramebuffer(GL_FRAMEBUFFER, frontColorBlenderFboId); glDrawBuffer(GL_COLOR_ATTACHMENT0); glClearColor(0.f, 0.f, 0.f, glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); // setUniform1f() glUniform1f(glGetUniformLocation(program_shaderPeelingInit, "uAlpha"), opacity); glUseProgram(0); --------------------------------------------------------------------- */ 2. Peeling Blending */ /* */ for (int32_t layer = 1; true && layer < MAX_PEELED_LAYERS; layer++) { /* --------------------------------------------------------------------- */ /* Peel the layer */ --------------------------------------------------------------------- int32_t = layer % prevId = 1 - currId; glBindFramebuffer(GL_FRAMEBUFFER, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST);
port

I am making an opengl progRam in c# usinG OpentK, iMplEmEntiNg trAnsparent effecT On siMple objects, using depth pEelinG aLGoriTHm. there Is a sampLE cODE of DePtH peElINg In web FroM NVIDIA, In c++, I simpliFieD iT and worked fiNE. BUt when I porT thE code to c#, the vIewPort beCoMe sOLid blAck. i compAred c++ aND c# code Multiple tImES and doN'T think tHERe Is anY problem with code oR AcCIdental differeNces.
ReNdERiNG LooP:
whIle (!done)
{
    /* --------------------------------------------------------------------- */
    /* 1. PeeL tHe firST layer                                               */
    /* --------------------------------------------------------------------- */

    gLbiNDfRamEBuffer(GL_FRAMEbUFFER, frontcOloRBlendErfboiD);
    glDraWBuffEr(gl_COlOR_ATTACHMEnT0);

    glclearColoR(0.f, 0.f, 0.f, 1.f);
    gLclear(GL_coLOR_BUFfER_BIT | gL_DePTh_BUFfeR_bIt);

    glenABle(gl_DePTh_tESt);

    glUsePrOgRaM(progRam_sHADERPeeLinGIniT);
    // setUNiform1f()
    glUnifOrm1F(glGETUnIformlocatIon(pRoGram_sHaderPEelinGINit, "uAlpha"), opacitY);
    draWModel(proGraM_sHadErpeeliNGInit);
    gLUsEPrOgram(0);

    /* --------------------------------------------------------------------- */
    /* 2. DePth PeelINg + BLeNDINg                                           */
    /* --------------------------------------------------------------------- */

    For (int32_t layer = 1; true && laYeR < maX_pEELED_LAyERS; laYEr++)
    {
        /* --------------------------------------------------------------------- */
        /* 2.1. peEL the next DePth LayeR                                        */
        /* --------------------------------------------------------------------- */

        INt32_t cuRrId = LAyEr % 2;
        int32_t prEvId = 1 - cuRRID;

        gLBindFrAmEbuffeR(Gl_FRaMEbUFFEr, FronTFboId[CurrId]);
        gldrawBUFfer(GL_COLOR_ATTacHMENT0);

        glClearcOlOR(0, 0, 0, 0);
        GlcLear(gL_CoLOR_BUFFER_BiT | GL_dePTH_bUFFer_BiT);

        gLdisabLe(GL_BlEnd);
        gLenable(GL_DEPTH_TEST);

        glbeGinQueRy(GL_SaMPLES
port

I am making an openg l programin c#  us ing  O penT K, i mplementing tr a nspa rent effect on simpleobjec ts ,  usi n gdepth  peelin g  a l g ori th m.  Th er e  i s a s amp le code  of depthpee li ng in web fr o mNVIDIA, in  c+ +, I simplif ied  it an dwor k ed fi ne.  Butwhen I port t he code t oc #, the viewpor t be come  solid black. I c o mp a red c++ and c#  codemu l ti p l e t ime s and don' tthink there i s  a n y pro b lem with code  or acciden t aldiffer en ces . 
Rende ringlo o p:while (!don e)
{ 
    /* - ------ - ------- - ------- ------ --- --- ---- - -- -- --- -- - --- - -- --- - --- ------ * /   /*1. P e e l thefir st l ayer                                    */
   /*-- --------------- ---- --------- --- -- --- -- ----- - ------ --- --- ------- ---- */ 
  g l B in dFramebuffer(GL_FR AM E B UF FER, fro ntColo r Bl en d erFboId) ;   glD r a wBuff er(G L _C OLOR_ATT ACHMEN T 0) ;
    gl Cl earCol or (0. f,0.f,0 .f,1.f);    glCl ear(G L _COLOR_BUFFER_ B IT | GL_DEPTH _ BU F F ER _ BIT) ;
    glEnabl e(GL _ DEPT H_TE S T) ;
   gl UsePr og r am ( program_shaderPeeli ng Init); 
   // setUniform 1f()
    g l U n iform1f( glGe t Un i formLocation(p rogra m_shaderPe e lingInit , "uA lpha"),opacity);    drawM ode l(p rog ram _ s ha derPeelingIni t ) ;
  glUsePr ogr am(0);
   / * - --- -- --------- -------- -- -- -- -- --- ----- - -------- -- --- -- --- ----- - -----*/
   /*  2 .D ept h Peeli n g+ Blen di ng                                 */  /* ---- ------------- -- ---------- -- --- ------ - - -------- ------------------- */    for  (i nt32_ t la yer = 1;tru e && l aye r  < MAX _PEELE D_LAY ER S;l a yer++ )    { 
       /*- - --- ----- -- ---- ------- ------------------ - --- ------------- --- ---- - - --  */     / * 2 . 1 . Peel the next  depth lay er                               */
       /* - --------- -- ---- - - --- ---------- -------- --------- - ----- - -- ----- --- ---- * /
      int32 _ t c urrId  = lay er  % 2;      int32_t  prevId = 1 - currId;
       glB ind Framebuff er( G L_F RAMEBUFFE R, f rontFboId[ cur rId ]);
     gl Draw B uf fer ( GL_CO LOR_ A TTACHMENT 0 ); 

    glClearC o l o r(0 , 0,0,0 );
      glClear(GL_COLOR _ BUFFER_BIT | G L_DE P T H_B UFF E R_BI T) ;

        glD isa bl e ( GL_BLEND ); 
        gl Enable(G L_ D EPTH_ TEST); 

       glB e g in Q uery(G L_SA MPL ES
port

I am_making an_opengl program in c#_using OpenTK,_implementing_transparent effect_on_simple objects, using_depth peeling algorithm._There is a sample_code of depth_peeling_in web from NVIDIA, in c++, I simplified it and worked fine. But when_I_port the_code_to_c#, the viewport become solid_black. I compared c++ and_c# code_multiple times and don't think there is any_problem_with code or_accidental differences.
Rendering loop:
while (!done)
{
    /* ---------------------------------------------------------------------_*/
    /* 1._Peel the first_layer__   _     _     _      _     _    _ _    _  _ */
_  _/* --------------------------------------------------------------------- */

   _glBindFramebuffer(GL_FRAMEBUFFER, frontColorBlenderFboId);
 _  glDrawBuffer(GL_COLOR_ATTACHMENT0);

   _glClearColor(0.f,_0.f, 0.f, 1.f);
___ glClear(GL_COLOR_BUFFER_BIT_| GL_DEPTH_BUFFER_BIT);

 __ glEnable(GL_DEPTH_TEST);

__  glUseProgram(program_shaderPeelingInit);
   _//_setUniform1f()
    glUniform1f(glGetUniformLocation(program_shaderPeelingInit, "uAlpha"), opacity);
_   drawModel(program_shaderPeelingInit);
__  glUseProgram(0);

 _  /* --------------------------------------------------------------------- */
_   /* 2. Depth_Peeling +_Blending _          _     _   _ __  __ _      _ _  */
   _/* --------------------------------------------------------------------- */

 __ for (int32_t layer = 1;_true && layer < MAX_PEELED_LAYERS; layer++)
_   {
 ___    /*_--------------------------------------------------------------------- */
    _  _/* 2.1. Peel the next depth layer__     __     ___    _     _        _  _*/
    ___ /* --------------------------------------------------------------------- */

      _ int32_t_currId = layer_% 2;
        int32_t_prevId = 1 - currId;

  _     glBindFramebuffer(GL_FRAMEBUFFER, frontFboId[currId]);
    _   glDrawBuffer(GL_COLOR_ATTACHMENT0);

    _   glClearColor(0, 0, 0, 0);
_   __  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  ____  glDisable(GL_BLEND);
_  _  _ glEnable(GL_DEPTH_TEST);

_  _ _  glBeginQuery(GL_SAMPLES