org.lwjgl.opengl.GL30.glFramebufferTexture2D java code ...

文章推薦指數: 80 %
投票人數:10人

public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment ... HowtouseglFramebufferTexture2Dmethodinorg.lwjgl.opengl.GL30BestJavacodesnippetsusingorg.lwjgl.opengl.GL30.glFramebufferTexture2D(Showingtop20resultsoutof315)@Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2DEXT(finalinttarget,finalintattachment,finalinttexTarget, finalinttexture,finalintlevel){ GL30.glFramebufferTexture2D(target,attachment,texTarget,texture,level); } @Override publicvoidglFramebufferTexture2DEXT(intparam1,intparam2,intparam3,intparam4,intparam5){ GL30.glFramebufferTexture2D(param1,param2,param3,param4,param5); } publicLwjglFrameBufferObject(ResourceUrnurn,BaseVector2isize){ this.size=ImmutableVector2i.createOrUse(size); IntBufferfboId=BufferUtils.createIntBuffer(1); GL30.glGenFramebuffers(fboId); frame=fboId.get(0); Texturetexture=generateTexture(urn); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER,frame); GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER,GL30.GL_COLOR_ATTACHMENT0,GL11.GL_TEXTURE_2D,texture.getId(),0); intresult=GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER); if(result!=GL30.GL_FRAMEBUFFER_COMPLETE){ thrownewIllegalStateException("Somethingwentwrongwithframebuffer!"+result); } GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER,0); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextureTarget,inttexture,intlevel) { GL30.glFramebufferTexture2D(target,attachment,textureTarget,texture,level); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2D(inttarget,intattachment,inttextarget,inttexture,intlevel){ GL30.glFramebufferTexture2D(target,attachment,textarget,texture,level); } @Override publicvoidglFramebufferTexture2DEXT(intparam1,intparam2,intparam3,intparam4,intparam5){ GL30.glFramebufferTexture2D(param1,param2,param3,param4,param5); } publicvoidcreateColorTextureAttachment(inttexture,inti) { glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER,GL_COLOR_ATTACHMENT0+i,GL_TEXTURE_2D,texture,0); } publicvoidcreateColorTextureMultisampleAttachment(inttexture,inti){ glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0+i,GL_TEXTURE_2D_MULTISAMPLE,texture,0); } publicvoidcreateDepthTextureMultisampleAttachment(inttexture){ glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D_MULTISAMPLE,texture,0); } publicShadowBuffer()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptextures depthMap=newArrTexture(ShadowRenderer.NUM_CASCADES,SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getIds()[0],0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } publicShadowMap()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptexture depthMap=newTexture(SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getId(),0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } publicShadowMap()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptexture depthMap=newTexture(SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getId(),0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } publicShadowMap()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptexture depthMap=newTexture(SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getId(),0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } publicShadowBuffer()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptextures depthMap=newArrTexture(ShadowRenderer.NUM_CASCADES,SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getIds()[0],0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } publicShadowMap()throwsException{ //CreateaFBOtorenderthedepthmap depthMapFBO=glGenFramebuffers(); //Createthedepthmaptexture depthMap=newTexture(SHADOW_MAP_WIDTH,SHADOW_MAP_HEIGHT,GL_DEPTH_COMPONENT); //AttachthethedepthmaptexturetotheFBO glBindFramebuffer(GL_FRAMEBUFFER,depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,depthMap.getId(),0); //Setonlydepth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if(glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE){ thrownewException("CouldnotcreateFrameBuffer"); } //Unbind glBindFramebuffer(GL_FRAMEBUFFER,0); } org.lwjgl.openglGL30glFramebufferTexture2DJavadocAttachesalevelofa2Dtextureobjectasalogicalbuffertothecurrentlyboundframebufferobject. PopularmethodsofGL30glBindVertexArrayBindsavertexarrayobjectglGenVertexArraysArrayversionof:#glGenVertexArraysglDeleteVertexArraysArrayversionof:#glDeleteVertexArraysglGenerateMipmapGeneratemipmapsforaspecifiedtexturetarget.glBindFramebufferBindsaframebuffertoaframebuffertarget.glCheckFramebufferStatusChecksthecompletenessstatusofaframebuffer.glGenFramebuffersArrayversionof:#glGenFramebuffersglDeleteFramebuffersArrayversionof:#glDeleteFramebuffersglBlitFramebufferCopiesablockofpixelsfromthereadframebuffertothedrawframebuffer.glBindRenderbufferBindsarenderbuffertoarenderbuffertarget.glFramebufferRenderbufferAttachesarenderbufferasalogicalbuffertothecurrentlyboundframebuffer object.glGenRenderbuffersArrayversionof:#glGenRenderbuffersglFramebufferRenderbuffer,glGenRenderbuffers,glRenderbufferStorageMultisample,glBindBufferBase,glRenderbufferStorage,glDeleteRenderbuffers,glFramebufferTextureLayer,glGetStringi,glVertexAttribIPointerPopularinJavaUpdatingdatabaseusingSQLpreparedstatementfindViewById(Activity)onCreateOptionsMenu(Activity)compareTo(BigDecimal)Enumeration(java.util)Alegacyiterationinterface.NewcodeshoulduseIteratorinstead.Iterator replacestheenumerationTreeMap(java.util)Walkthenodesofthetreeleft-to-rightorright-to-left.Notethatin descendingiterations,nextExecutorService(java.util.concurrent)AnExecutorthatprovidesmethodstomanageterminationandmethodsthatcan produceaFuturefortrJButton(javax.swing)Logger(org.apache.log4j)Thisisthecentralclassinthelog4jpackage.Mostloggingoperations,except configuration,aredOption(scala)21BestIntelliJPluginsProductsSearchforJavacodeSearchforJavaScriptcodeIDEPluginsIntelliJIDEAWebStormVisualStudioAndroidStudioEclipseVisualStudioCodePyCharmSublimeTextPhpStormVimAtomGoLandRubyMineEmacsJupyterNotebookJupyterLabRiderDataGripAppCodeCompanyAboutUsContactUsCareersResourcesFAQBlogTabnineAcademyStudentsTermsofusePrivacypolicyJavaCodeIndexJavascriptCodeIndexGetTabnineforyourIDEnow



請為這篇文章評分?