org.lwjgl.opengl.GL30.glFramebufferTexture2D java code ...
文章推薦指數: 80 %
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
延伸文章資訊
- 1When binding an fbo do you need to call ...
The attachment bindings are part of the FBO state. You only need to call glFramebufferTexture2D()...
- 2glFramebufferTexture2D - Khronos Group
glFramebufferTexture2D — attach a texture image to a framebuffer object. C Specification. void gl...
- 3glFramebufferTexture2D | Apple Developer Documentation
Declaration. void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLui...
- 4Java GLES20.glFramebufferTexture2D方法代碼示例- 純淨天空
本文整理匯總了Java中android.opengl.GLES20.glFramebufferTexture2D方法的典型用法代碼示例。如果您正苦於以下問題:Java GLES20.glFram...
- 5C++ (Cpp) glFramebufferTexture2D Examples - HotExamples
C++ (Cpp) glFramebufferTexture2D - 30 examples found. These are the top rated real world C++ (Cpp...