glCheckFramebufferStatus - OpenGL ES 2 - docs.gl
文章推薦指數: 80 %
glCheckFramebufferStatus returns a symbolic constant that identifies whether or not the currently bound framebuffer is framebuffer complete, and if not, which ... Light|Darkdocs.GLOpenGL2.1OpenGL3.0OpenGL3.1OpenGL3.2OpenGL3.3OpenGL4.0OpenGL4.1OpenGL4.2OpenGL4.3OpenGL4.4OpenGL4.5OpenGLES2.0OpenGLES3.0OpenGLES3.1GLSL4.0GLSL4.1GLSL4.2GLSL4.3GLSL4.4GLSL4.5GLSLES3.0GLSLES3.1HideunavailableTexturesglActiveTextureglBindImageTextureglBindImageTexturesglBindTextureglBindTextureUnitglBindTexturesglClearTexImageglClearTexSubImageglCompressedTexImage1DglCompressedTexImage2DglCompressedTexImage3DglCompressedTexSubImage1DglCompressedTexSubImage2DglCompressedTexSubImage3DglCopyImageSubDataglCopyTexImage1DglCopyTexImage2DglCopyTexSubImage1DglCopyTexSubImage2DglCopyTexSubImage3DglCreateTexturesglDeleteTexturesglGenTexturesglGetCompressedTexImageglGetCompressedTextureSubImageglGetTexImageglGetTexLevelParameterglGetTexParameterglGetTextureSubImageglInvalidateTexImageglInvalidateTexSubImageglIsTextureglTexBufferglTexBufferRangeglTexImage1DglTexImage2DglTexImage2DMultisampleglTexImage3DglTexImage3DMultisampleglTexParameterglTexStorage1DglTexStorage2DglTexStorage2DMultisampleglTexStorage3DglTexStorage3DMultisampleglTexSubImage1DglTexSubImage2DglTexSubImage3DglTextureViewRenderingglClearglClearBufferglClearColorglClearDepthglClearDepthfglClearStencilglDrawBufferglFinishglFlushglReadBufferglReadPixelsFrameBuffersglBindFramebufferglBindRenderbufferglBlitFramebufferglCheckFramebufferStatusglCreateFramebuffersglCreateRenderbuffersglDeleteFramebuffersglDeleteRenderbuffersglDrawBuffersglFramebufferParameteriglFramebufferRenderbufferglFramebufferTextureglFramebufferTexture2DglFramebufferTextureLayerglGenFramebuffersglGenRenderbuffersglGenerateMipmapglGetFramebufferAttachmentParameterglGetFramebufferAttachmentParameterivglGetFramebufferParameterglGetFramebufferParameterivglGetRenderbufferParameterglGetRenderbufferParameterivglInvalidateFramebufferglInvalidateSubFramebufferglIsFramebufferglIsRenderbufferglRenderbufferStorageglRenderbufferStorageMultisampleglSampleMaskiShadersglAttachShaderglBindAttribLocationglBindFragDataLocationglBindFragDataLocationIndexedglCompileShaderglCreateProgramglCreateShaderglCreateShaderProgramglDeleteProgramglDeleteShaderglDetachShaderglGetActiveAtomicCounterBufferivglGetActiveAttribglGetActiveSubroutineNameglGetActiveSubroutineUniformglGetActiveSubroutineUniformNameglGetActiveUniformglGetActiveUniformBlockglGetActiveUniformBlockNameglGetActiveUniformBlockivglGetActiveUniformNameglGetActiveUniformsivglGetAttachedShadersglGetAttribLocationglGetFragDataIndexglGetFragDataLocationglGetProgramglGetProgramBinaryglGetProgramInfoLogglGetProgramResourceglGetProgramResourceIndexglGetProgramResourceLocationglGetProgramResourceLocationIndexglGetProgramResourceNameglGetProgramStageglGetProgramivglGetShaderglGetShaderInfoLogglGetShaderPrecisionFormatglGetShaderSourceglGetShaderivglGetSubroutineIndexglGetSubroutineUniformLocationglGetUniformglGetUniformBlockIndexglGetUniformIndicesglGetUniformLocationglGetUniformSubroutineglIsProgramglIsShaderglLinkProgramglMinSampleShadingglProgramBinaryglProgramParameterglProgramParameteriglProgramUniformglReleaseShaderCompilerglShaderBinaryglShaderSourceglShaderStorageBlockBindingglUniformglUniformBlockBindingglUniformSubroutinesglUseProgramglUseProgramStagesglValidateProgramBufferObjectsglBindBufferglBindBufferBaseglBindBufferRangeglBindBuffersBaseglBindBuffersRangeglBindVertexBufferglBindVertexBuffersglBufferDataglBufferStorageglBufferSubDataglClearBufferDataglClearBufferSubDataglCopyBufferSubDataglCreateBuffersglCreateVertexArraysglDeleteBuffersglDisableVertexAttribArrayglDrawArraysglDrawArraysIndirectglDrawArraysInstancedglDrawArraysInstancedBaseInstanceglDrawElementsglDrawElementsBaseVertexglDrawElementsIndirectglDrawElementsInstancedglDrawElementsInstancedBaseInstanceglDrawElementsInstancedBaseVertexglDrawElementsInstancedBaseVertexBaseInstanceglDrawRangeElementsglDrawRangeElementsBaseVertexglEnableVertexAttribArrayglFlushMappedBufferRangeglGenBuffersglGetBufferParameterglGetBufferParameterivglGetBufferPointervglGetBufferSubDataglGetVertexArrayIndexedglGetVertexArrayivglGetVertexAttribglGetVertexAttribPointervglInvalidateBufferDataglInvalidateBufferSubDataglIsBufferglMapBufferglMapBufferRangeglMultiDrawArraysglMultiDrawArraysIndirectglMultiDrawElementsglMultiDrawElementsBaseVertexglMultiDrawElementsIndirectglPatchParameterglPrimitiveRestartIndexglProvokingVertexglUnmapBufferglVertexArrayElementBufferglVertexAttribglVertexAttribBindingglVertexAttribDivisorglVertexAttribFormatglVertexAttribPointerglVertexBindingDivisorStateManagementglBlendColorglBlendEquationglBlendEquationSeparateglBlendFuncglBlendFuncSeparateglClampColorglClipControlglColorMaskglCullFaceglDepthFuncglDepthMaskglDepthRangeglDepthRangeArrayglDepthRangeIndexedglDepthRangefglDisableglEnableglFrontFaceglGetglGetErrorglHintglIsEnabledglLineWidthglLogicOpglPixelStoreglPixelStoreiglPointParameterglPointSizeglPolygonModeglPolygonOffsetglSampleCoverageglScissorglScissorArrayglScissorIndexedglStencilFuncglStencilFuncSeparateglStencilMaskglStencilMaskSeparateglStencilOpglStencilOpSeparateglViewportglViewportArrayglViewportIndexedTransformFeedbackglBeginTransformFeedbackglBindTransformFeedbackglCreateTransformFeedbacksglDeleteTransformFeedbacksglDrawTransformFeedbackglDrawTransformFeedbackInstancedglDrawTransformFeedbackStreamglDrawTransformFeedbackStreamInstancedglEndTransformFeedbackglGenTransformFeedbacksglGetTransformFeedbackglGetTransformFeedbackVaryingglIsTransformFeedbackglPauseTransformFeedbackglResumeTransformFeedbackglTransformFeedbackBufferBaseglTransformFeedbackBufferRangeglTransformFeedbackVaryingsUtilityglDispatchComputeglDispatchComputeIndirectglGetGraphicsResetStatusglGetInternalformatglGetInternalformativglGetMultisampleglGetMultisamplefvglGetStringglMemoryBarrierQueriesglBeginConditionalRenderglBeginQueryglBeginQueryIndexedglCreateQueriesglDeleteQueriesglEndConditionalRenderglEndQueryglEndQueryIndexedglGenQueriesglGetQueryIndexedglGetQueryObjectglGetQueryObjectuivglGetQueryivglIsQueryglQueryCounterSyncingglClientWaitSyncglDeleteSyncglFenceSyncglGetSyncglGetSyncivglIsSyncglTextureBarrierglWaitSyncVertexArrayObjectsglBindVertexArrayglDeleteVertexArraysglGenVertexArraysglIsVertexArraySamplersglBindSamplerglBindSamplersglCreateSamplersglDeleteSamplersglGenSamplersglGetSamplerParameterglIsSamplerglSamplerParameterProgramPipelinesglActiveShaderProgramglBindProgramPipelineglCreateProgramPipelinesglDeleteProgramPipelinesglGenProgramPipelinesglGetProgramPipelineglGetProgramPipelineInfoLogglIsProgramPipelineglValidateProgramPipelineImmediateModeglArrayElementglBeginglColorglEndglEvalCoordglEvalMeshglEvalPointglFogCoordglIndexglMaterialglMultiTexCoordglNormalglSecondaryColorglTexCoordglVertexGL2RasterizationglBitmapglClearIndexglClipPlaneglCopyPixelsglDrawPixelsglFeedbackBufferglFogglGetClipPlaneglGetMapglGetPixelMapglGetPolygonStippleglInitNamesglLineStippleglLoadNameglMap1glMap2glMapGridglPassThroughglPixelZoomglPolygonStippleglPopNameglPushNameglRasterPosglRectglRenderModeglSelectBufferglWindowPosClientArraysglColorPointerglDisableClientStateglEnableClientStateglFogCoordPointerglIndexPointerglInterleavedArraysglNormalPointerglPopClientAttribglPushClientAttribglSecondaryColorPointerglTexCoordPointerglVertexPointerFixedFunctionglAccumglAlphaFuncglClearAccumglColorMaterialglEdgeFlagglEdgeFlagPointerglGetLightglGetMaterialglGetTexEnvglGetTexGenglIndexMaskglLightglLightModelglPopAttribglPushAttribglShadeModelglTexEnvglTexGenMatrixStateglFrustumglLoadIdentityglLoadMatrixglLoadTransposeMatrixglMatrixModeglMultMatrixglMultTransposeMatrixglOrthoglPopMatrixglPushMatrixglRotateglScaleglTranslateGL2TexturesglAreTexturesResidentglClientActiveTextureglPixelMapglPixelTransferglPrioritizeTexturesCallListsglCallListglCallListsglDeleteListsglEndListglGenListsglIsListglListBaseglNewListDebugglDebugMessageCallbackglDebugMessageControlglDebugMessageInsertglGetDebugMessageLogglGetObjectLabelglGetObjectPtrLabelglGetPointervglGetProgramInterfaceglObjectLabelglObjectPtrLabelglPopDebugGroupglPushDebugGroupTrigonometryacosacoshasinasinhatanatanhcoscoshdegreesradianssinsinhtantanhMathematicsabsceilclampdFdxdFdyexpexp2floorfloorfmafractfwidthinversesqrtisinfisnanloglog2maxminmixmodmodfnoisepowroundroundEvensignsmoothstepsqrtsteptruncFloating-PointfloatBitsToIntfrexpintBitsToFloatldexppackDouble2x32packHalf2x16packUnormunpackDouble2x32unpackHalf2x16unpackUnormBuilt-InVariablesgl_ClipDistancegl_CullDistancegl_FragCoordgl_FragDepthgl_FrontFacinggl_GlobalInvocationIDgl_HelperInvocationgl_InstanceIDgl_InvocationIDgl_Layergl_LocalInvocationIDgl_LocalInvocationIndexgl_NumSamplesgl_NumWorkGroupsgl_PatchVerticesIngl_PointCoordgl_PointSizegl_Positiongl_PrimitiveIDgl_PrimitiveIDIngl_SampleIDgl_SampleMaskgl_SampleMaskIngl_SamplePositiongl_TessCoordgl_TessLevelInnergl_TessLevelOutergl_VertexIDgl_ViewportIndexgl_WorkGroupIDgl_WorkGroupSizeVectorcrossdistancedotequalfaceforwardlengthnormalizenotEqualreflectrefractComponentComparisonallanygreaterThangreaterThanEquallessThanlessThanEqualnotGeometryShaderEmitStreamVertexEmitVertexEndPrimitiveEndStreamPrimitiveTextureSamplinginterpolateAtCentroidinterpolateAtOffsetinterpolateAtSampletexelFetchtexelFetchOffsettexturetextureGathertextureGatherOffsettextureGatherOffsetstextureGradtextureGradOffsettextureLodtextureLodOffsettextureOffsettextureProjtextureProjGradtextureProjGradOffsettextureProjLodtextureProjLodOffsettextureProjOffsettextureQueryLevelstextureQueryLodtextureSamplestextureSizeMatrixdeterminantgroupMemoryBarrierinversematrixCompMultouterProducttransposeIntegerbitCountbitfieldExtractbitfieldInsertbitfieldReversefindLSBfindMSBuaddCarryumulExtendedusubBorrowImageimageAtomicAddimageAtomicAndimageAtomicCompSwapimageAtomicExchangeimageAtomicMaximageAtomicMinimageAtomicOrimageAtomicXorimageLoadimageSamplesimageSizeimageStoreAtomicatomicAddatomicAndatomicCompSwapatomicCounteratomicCounterDecrementatomicCounterIncrementatomicExchangeatomicMaxatomicMinatomicOratomicXorMemoryBarrierbarriergroupMemoryBarriermemoryBarriermemoryBarrierAtomicCountermemoryBarrierBuffermemoryBarrierImagememoryBarrierSharedOpenGL4OpenGL3OpenGLES3OpenGLES2glCheckFramebufferStatusNameglCheckFramebufferStatus—returntheframebuffercompletenessstatusofaframebufferobjectCSpecificationGLenumglCheckFramebufferStatus(GLenumtarget);ParameterstargetSpecifiesthetargetframebufferobject.ThesymbolicconstantmustbeGL_FRAMEBUFFER.DescriptionglCheckFramebufferStatusreturnsasymbolicconstantthatidentifieswhetherornotthecurrentlyboundframebufferisframebuffercomplete,andifnot,whichoftherulesofframebuffercompletenessisviolated.Iftheframebufferiscomplete,thenGL_FRAMEBUFFER_COMPLETEisreturned.Iftheframebufferisnotcomplete,thereturnvaluesareasfollows:GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTNotallframebufferattachmentpointsareframebufferattachmentcomplete.Thismeansthatatleastoneattachmentpointwitharenderbufferortextureattachedhasitsattachedobjectnolongerinexistenceorhasanattachedimagewithawidthorheightofzero,orthecolorattachmentpointhasanon-color-renderableimageattached,orthedepthattachmentpointhasanon-depth-renderableimageattached,orthestencilattachmentpointhasanon-stencil-renderableimageattached.Color-renderableformatsincludeGL_RGBA4,GL_RGB5_A1,andGL_RGB565.GL_DEPTH_COMPONENT16istheonlydepth-renderableformat.GL_STENCIL_INDEX8istheonlystencil-renderableformat.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONSNotallattachedimageshavethesamewidthandheight.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTNoimagesareattachedtotheframebuffer.GL_FRAMEBUFFER_UNSUPPORTEDThecombinationofinternalformatsoftheattachedimagesviolatesanimplementation-dependentsetofrestrictions.Ifthecurrentlyboundframebufferisnotframebuffercomplete,thenitisanerrortoattempttousetheframebufferforwritingorreading.Thismeansthatrenderingcommands(glClear,glDrawArrays,andglDrawElements)aswellascommandsthatreadtheframebuffer(glReadPixels,glCopyTexImage2D,andglCopyTexSubImage2D)willgeneratetheerrorGL_INVALID_FRAMEBUFFER_OPERATIONifcalledwhiletheframebufferisnotframebuffercomplete.NotesItisstronglyadvised,thoughtnotrequired,thatanapplicationcallglCheckFramebufferStatustoseeiftheframebufferiscompletepriortorendering.Thisisbecausesomeimplementationsmaynotsupportrenderingtoparticularcombinationsofinternalformats.Inthiscase,GL_FRAMEBUFFER_UNSUPPORTEDisreturned.Thedefaultwindow-system-providedframebufferisalwaysframebuffercomplete,andthusGL_FRAMEBUFFER_COMPLETEisreturnedwhenGL_FRAMEBUFFER_BINDINGis0.Additionally,ifanerroroccurs,zeroisreturned.ErrorsGL_INVALID_ENUMisgeneratediftargetisnotGL_FRAMEBUFFER.ExamplesCreateaframebufferobjectwithatexture-basedcolorattachmentandatexture-baseddepthattachment.Usingtexture-basedattachmentsallowssamplingofthosetexturesinshaders.//fbo_widthandfbo_heightarethedesiredwidthandheightoftheFBO. //ForOpengl<=4.4oriftheGL_ARB_texture_non_power_of_twoextension //ispresent,fbo_widthandfbo_heightcanbevaluesotherthan2^nfor //someintegern. //Buildthetexturethatwillserveasthecolorattachmentfortheframebuffer. GLuinttexture_map; glGenTextures(1,&texture_map); glBindTexture(GL_TEXTURE_2D,texture_map); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_BORDER); glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,fbo_width,fbo_height,0,GL_RGBA,GL_UNSIGNED_BYTE,NULL); glBindTexture(GL_TEXTURE_2D,0); //Buildthetexturethatwillserveasthedepthattachmentfortheframebuffer. GLuintdepth_texture; glGenTextures(1,&depth_texture); glBindTexture(GL_TEXTURE_2D,depth_texture); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT,fbo_width,fbo_height,0,GL_DEPTH_COMPONENT,GL_UNSIGNED_BYTE,NULL); glBindTexture(GL_TEXTURE_2D,0); //Buildtheframebuffer. GLuintframebuffer; glGenFramebuffers(1,&framebuffer); glBindFramebuffer(GL_FRAMEBUFFER,(GLuint)framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,texture_map,0); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depth_texture,0); GLenumstatus=glCheckFramebufferStatus(GL_FRAMEBUFFER); if(status!=GL_FRAMEBUFFER_COMPLETE) //Error glBindFramebuffer(GL_FRAMEBUFFER,0);TutorialsSongho-OpenGLFrameBufferObject(FBO)open.gl-Framebuffersopen.gl-GeometryShadersopengl-tutorial.org-Tutorial14:RenderToTextureopengl-tutorial.org-Tutorial16:ShadowmappingSeeAlsoglBindRenderbuffer,glCopyTexImage2D,glCopyTexSubImage2D,glDrawArrays,glDrawElements,glReadPixels,glRenderbufferStorageCopyrightCopyright©2008KhronosGroup.ThismaterialmaybedistributedsubjecttothetermsandconditionssetforthintheOpenPublicationLicense,v1.0,8June1999.https://opencontent.org/openpub/.Thinkyoucanimprovethispage?EditthispageonGitHub.docs.glwaswrittenbyJorgeRodríguez.Eachentryisunderindividualcopyrightdisplayedatthebottomofthatentry.Allothercontentisinthepublicdomain.docs.gliscompletelyunaffiliatedwithOpenGLandKhronos.Thesepageswerelastcompiledon17March2022at15:33:59GMT.
延伸文章資訊
- 1GLES2.0中文API-glCheckFramebufferStatus - CSDN博客
名称glCheckFramebufferStatus - 返回帧缓冲区对象的帧缓冲区完整性状态C规范GLenum glCheckFramebufferStatus(GLenum target);...
- 2Python GL.glCheckFramebufferStatus方法代碼示例- 純淨天空
本文整理匯總了Python中OpenGL.GL.glCheckFramebufferStatus方法的典型用法代碼示例。如果您正苦於以下問題:Python GL.glCheckFramebuff...
- 3【android】OpenGL ES glCheckFramebufferStatus返回0
【android】OpenGL ES glCheckFramebufferStatus返回0. 阿新• • 發佈:2020-12-08. 我正在用原生代碼編寫android oepngl程式。 ...
- 4glCheckFramebufferStatus - OpenGL 4 Reference Pages
glCheckFramebufferStatus and glCheckNamedFramebufferStatus return the completeness status of a fr...
- 5Why is glCheckFramebufferStatus always 36054 for ...
But on my Smartphone with OpenGL ES 3.1+ I always get for the depth via glCheckFramebufferStatus(...