private ColorMask ( System.Boolean red, System.Boolean green, System.Boolean blue, System.Boolean alpha ) : void | ||
red | System.Boolean | |
green | System.Boolean | |
blue | System.Boolean | |
alpha | System.Boolean | |
return | void |
public void Enable() { GL.ColorMask(desc.renderTargetWriteMaskR, desc.renderTargetWriteMaskG, desc.renderTargetWriteMaskB, desc.renderTargetWriteMaskA); if (desc.blendEnable) { GL.Enable(GL.BLEND); if (desc.blendEnableAlpha) { GL.BlendEquationSeparate(desc.blendOp, desc.blendOpAlpha); GL.BlendFuncSeparate(desc.srcBlend, desc.dstBlend, desc.srcBlendAlpha, desc.dstBlendAlpha); } else { GL.BlendEquation(desc.blendOp); GL.BlendFunc(desc.srcBlend, desc.dstBlend); } } else { GL.Disable(GL.BLEND); } #if DEBUG Video.checkForError(); #endif }
public void Present() { #if WIN32 WGL.SwapBuffers(dc); #endif #if RPI EGL.SwapBuffers(dc, surface); #elif LINUX /*unsafe * { * if (vSync) * { * uint retraceCount = 0; * GLX.GetVideoSyncSGI(&retraceCount); * GLX.WaitVideoSyncSGI(2, ((int)retraceCount+1)%2, &retraceCount); * } * }*/ GLX.SwapBuffers(dc, handle); #endif #if OSX CGL.FlushDrawable(ctx); #endif #if NaCl GL.ColorMask(false, false, false, true); ClearColor(0, 0, 0, 1); GL.ColorMask(true, true, true, true); #endif }