这篇教程C++ unbind函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中unbind函数的典型用法代码示例。如果您正苦于以下问题:C++ unbind函数的具体用法?C++ unbind怎么用?C++ unbind使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了unbind函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: bind_asVertexArrayObjectPtr VaoFactory::create(const VaoLayout& vao_layout){ auto vao = std::make_shared<VertexArrayObject>(); vao->bind(); for (const BufferUse &used_buffer : vao_layout.get_used_buffers()) { if (used_buffer.type != GL_ARRAY_BUFFER) { // activate used_buffer.name with type used_buffer.type used_buffer.buffer->bind_as(used_buffer.type); } } BufferObjectPtr active_buffer = nullptr; for (const BufferVertexAttribDefinition &def : vao_layout.get_definitions()) { if (active_buffer != def.buffer) { def.buffer->bind(); // or bind_as(GL_ARRAY_BUFFER)? active_buffer = def.buffer; } glVertexAttribPointer(def.index, def.size_per_index, def.data_type, def.normalized, def.stride, reinterpret_cast<const void*>(def.offset)); glEnableVertexAttribArray(def.index); if (def.divisor > 0) { glVertexAttribDivisor(def.index, def.divisor); } } vao->unbind(); for (const BufferUse &used_buffer : vao_layout.get_used_buffers()) { // deactivate used_buffer used_buffer.buffer->unbind(); } return vao;}
开发者ID:eoma,项目名称:gm-engine,代码行数:42,
示例2: DBG_ENTRY_LVL/// This method is called when the (remote) subscriber is being/// released. This method will return a 0 if the subscriber_id is/// successfully disassociated with the publisher_id *and* there/// are still other subscribers associated with the publisher_id./// This method will return 1 if, after the disassociation, the/// publisher_id is no longer associated with any subscribers (which/// also means it's element was removed from our map_).intOpenDDS::DCPS::ReceiveListenerSetMap::release_subscriber(RepoId publisher_id, RepoId subscriber_id){ DBG_ENTRY_LVL("ReceiveListenerSetMap","release_subscriber",6); ReceiveListenerSet_rch listener_set; if (OpenDDS::DCPS::find(map_, publisher_id, listener_set) != 0) { GuidConverter converter(publisher_id); ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ReciveListenerSetMap::release_subscriber: ") ACE_TEXT("publisher %C not found in map_./n"), OPENDDS_STRING(converter).c_str())); // Return 1 to indicate that the publisher_id is no longer associated // with any subscribers at all. return 1; } int result = listener_set->remove(subscriber_id); // Ignore the result ACE_UNUSED_ARG(result); if (listener_set->size() == 0) { if (unbind(map_, publisher_id) != 0) { GuidConverter converter(publisher_id); ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ReceiveListenerSetMap::release_subscriber: ") ACE_TEXT("failed to remove empty ReceiveListenerSet for ") ACE_TEXT("publisher %C./n"), OPENDDS_STRING(converter).c_str())); } // We always return 1 if we know the publisher_id is no longer // associated with any ReceiveListeners. return 1; } // There are still ReceiveListeners associated with the publisher_id. // We return a 0 in this case. return 0;}
开发者ID:oschwaldp-oci,项目名称:OpenDDS,代码行数:49,
示例3: unbind// simple support, only for rgba imagesPBO& PBO::setup(int nWidth, int nHeight, GLenum nColorType) { width = nWidth; height = nHeight; color_type = nColorType; buffer_size = width * height * 4; unbind(); // see note in header. glBindTexture(GL_TEXTURE_2D, texture_id); eglGetError(); glEnable(GL_TEXTURE_2D); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); eglGetError(); glTexImage2D( GL_TEXTURE_2D, 0 ,GL_RGBA, width, height, 0 ,color_type, GL_UNSIGNED_BYTE, NULL );eglGetError(); //unbind(); return *this;}
开发者ID:arneboon,项目名称:roxlu,代码行数:21,
示例4: quadvoid Texture :: quad(Graphics& gl, double w, double h, double x0, double y0){ //Graphics::error(id(), "prebind quad texture"); bind(); Mesh& m = gl.mesh(); m.reset(); //Graphics::error(id(), "reset mesh quad texture"); m.primitive(gl.TRIANGLE_STRIP); m.texCoord ( 0, 0); m.vertex (x0, y0, 0); m.texCoord ( 1, 0); m.vertex (x0+w, y0, 0); m.texCoord ( 0, 1); m.vertex (x0, y0+h, 0); m.texCoord ( 1, 1); m.vertex (x0+w, y0+h, 0); //Graphics::error(id(), "set mesh quad texture"); gl.draw(m); //Graphics::error(id(), "draw mesh quad texture"); unbind();}
开发者ID:gitelope,项目名称:AlloSystem,代码行数:20,
示例5: ofLogWarning//--------------------------------------------------------------void ofVbo::drawElementsInstanced(int drawMode, int amt, int primCount) { if(bAllocated){ bool hadVAOChnaged = vaoChanged; bool wasBinded = bBound; if(!wasBinded) bind(); if(bUsingIndices){ if((supportVAOs && hadVAOChnaged) || !supportVAOs) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexId);#ifdef TARGET_OPENGLES // todo: activate instancing once OPENGL ES supports instancing, starting with version 3.0 // unfortunately there is currently no easy way within oF to query the current OpenGL version. // https://www.khronos.org/opengles/sdk/docs/man3/xhtml/glDrawElementsInstanced.xml ofLogWarning("ofVbo") << "drawElementsInstanced(): hardware instancing is not supported on OpenGL ES < 3.0"; // glDrawElementsInstanced(drawMode, amt, GL_UNSIGNED_SHORT, NULL, primCount);#else glDrawElementsInstanced(drawMode, amt, GL_UNSIGNED_INT, NULL, primCount);#endif } if(!wasBinded) unbind(); }}
开发者ID:TheAtomicBen,项目名称:openFrameworks,代码行数:21,
示例6: bindFBO& FBO::addTexture(int nAttachmentPoint) { bind(); // we only use RGBA, 2D textures for now. GLuint tex_id; glGenTextures(1, &tex_id); eglGetError(); glBindTexture(GL_TEXTURE_2D, tex_id); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); eglGetError(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); eglGetError(); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width , height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); eglGetError(); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 +nAttachmentPoint, GL_TEXTURE_2D, tex_id, 0); eglGetError(); eglCheckFramebufferStatus(); glBindTexture(GL_TEXTURE_2D,0); // unbind texture textures.insert(std::pair<int, GLuint>(nAttachmentPoint, tex_id)); unbind(); return *this;}
开发者ID:danzeeeman,项目名称:roxlu,代码行数:20,
示例7: DBG_ENTRY_LVL// This version removes an entire RepoIdSet from the map_.OpenDDS::DCPS::RepoIdSet*OpenDDS::DCPS::RepoIdSetMap::remove_set(RepoId key){ DBG_ENTRY_LVL("RepoIdSetMap","remove_set",6); RepoIdSet_rch value; if (unbind(map_, key, value) != 0) { if (DCPS_debug_level > 4) { RepoIdConverter converter(key); ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) RepeIdSetMap::remove_set: ") ACE_TEXT("RepoId %C not found in map./n"), std::string(converter).c_str())); } return 0; } return value._retn();}
开发者ID:svn2github,项目名称:OpenDDS,代码行数:21,
示例8: commit void commit(size_t plane_index) { if(plane_index >= buffers_.size()) return; auto buffer = std::move(buffers_[plane_index]); // Release buffer once done. if(!buffer) return; auto texture = textures_.at(plane_index); ogl_->begin_invoke([=] { buffer->unmap(); buffer->bind(); texture->begin_read(); buffer->unbind(); }, high_priority); }
开发者ID:AKinanS,项目名称:Server,代码行数:20,
示例9: DarwinGlRenderFramebuffer Gre::RenderFramebufferHolder DarwinGlContext::iCreateFramebuffer(const std::string &name) const { // We create a DarwinGlRenderFramebuffer object here, using this object as the binded // RenderContext. This allows us to be sure the RenderFramebuffer is created under the // correct RenderContext , and not another RenderContext ( like the global one ). if ( iGetCurrentBindedContext() == iContext ) { return Gre::RenderFramebufferHolder ( new DarwinGlRenderFramebuffer(name) ); } else { bind(); Gre::RenderFramebufferHolder fbo ( new DarwinGlRenderFramebuffer(name) ); unbind(); return fbo; } }
开发者ID:luk2010,项目名称:GRE,代码行数:21,
示例10: bindvoid ShaderPhong::unsetAttributeColor(){ m_vboColor = NULL; if (m_with_color) { m_with_color = false; // unbind the VA bind(); unbindVA("VertexColor"); unbind(); // recompile shader std::string gl3vert(GLSLShader::defines_gl()); gl3vert.append(vertexShaderText); std::string gl3frag(GLSLShader::defines_gl()); gl3frag.append(fragmentShaderText); loadShadersFromMemory(gl3vert.c_str(), gl3frag.c_str()); // and treat uniforms getLocations(); sendParams(); }}
开发者ID:goldnd,项目名称:CGoGN,代码行数:21,
示例11: glUnmapNamedBuffervoid ofBufferObject::unmap(){ if(!this->data) return;#ifdef GLEW_ARB_direct_state_access if (GLEW_ARB_direct_state_access) { glUnmapNamedBuffer(data->id); return; }#endif /// --------| invariant: direct state access is not available if(!data->isBound){ glBindBuffer(data->lastTarget, data->id); } glUnmapBuffer(data->lastTarget); if(!data->isBound){ unbind(data->lastTarget); }}
开发者ID:RebelMoogle,项目名称:openFrameworks,代码行数:21,
示例12: data_pbool RTexture::set(GLsizei width, GLsizei height, const GLvoid *pixels, int index, int level, GLint format, GLint border, GLenum type){ data_p().mWidth = width; data_p().mHeight = height; if (!this->data_p().create()) { return false; } bind(index); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); RCheckGLError(); glTexImage2D(GL_TEXTURE_2D, level, format, width, height, border, format, type, pixels); RCheckGLError(); GLenum error = glGetError(); if (error != GL_NO_ERROR) { rLogE() << "glGetError() " << error << std::endl; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, this->data_p().mMagFilter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, this->data_p().mMinFilter); if (this->data_p().mGenerateMipmap) { glGenerateMipmap(GL_TEXTURE_2D); } RCheckGLError(); unbind(); return true;}
开发者ID:trsquarelab,项目名称:csscene,代码行数:40,
示例13: bind// generates a red/green image mask: red = x-coordinate, gren = y-coordinatevoid Texture::genImageMask(GLsizei w, GLsizei h, bool linearFilter){ bind(); // generate image std::vector<float> image; image.resize(w*h*4); for (GLsizei y = 0; y < h; ++y) { for (GLsizei x = 0; x < w; ++x) { Gs::Vector4f color( static_cast<float>(x) / (w - 1), static_cast<float>(y) / (h - 1), 0.0f, 1.0f ); if (x == 0 || x + 1 == w || y == 0 || y + 1 == h) color = Gs::Vector4f(0.1f, 0.2f, 0.8f, 1); auto idx = (y*w + x)*4; image[idx ] = color.x; image[idx + 1] = color.y; image[idx + 2] = color.z; image[idx + 3] = color.w; } } glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_FLOAT, image.data()); // setup texture parameters glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (linearFilter ? GL_LINEAR : GL_NEAREST)); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (linearFilter ? GL_LINEAR : GL_NEAREST)); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); unbind();}
开发者ID:LukasBanana,项目名称:GeometronLib,代码行数:41,
示例14: applyint apply(int func, int args){ int symaddr,lamlis,body,res; symaddr = findsym(func); if(symaddr == 0) error(CANT_FIND_ERR, "apply", func); else { switch(GET_TAG(symaddr)){ case SUBR: return((GET_SUBR(symaddr))(args)); case FSUBR: return((GET_SUBR(symaddr))(args)); case LAMBDA: { lamlis = car(GET_BIND(symaddr)); body = cdr(GET_BIND(symaddr)); bindarg(lamlis,args); while(!(IS_NIL(body))){ res = eval(car(body)); body = cdr(body); } unbind(); return(res); } } }}
开发者ID:sasagawa888,项目名称:Mono-Lisp,代码行数:22,
示例15: destroy void VAO::create() { if (m_vao) { destroy(); } glGenVertexArrays(1, &m_vao); bind(); for (int i = 0; i < m_buffers.size(); ++i) { glBindBuffer(m_buffers[i].m_desc.m_bufferType, m_buffers[i].m_obj->getId()); for (int j = 0; j < m_buffers[i].m_desc.m_attributes.size(); ++j) { glEnableVertexAttribArray(m_buffers[i].m_desc.m_attributes[j].m_index); glVertexAttribPointer( m_buffers[i].m_desc.m_attributes[j].m_index, m_buffers[i].m_desc.m_attributes[j].m_numComponents, m_buffers[i].m_desc.m_attributes[j].m_type, GL_FALSE, m_buffers[i].m_desc.m_attributes[j].m_interleave, (char*)0 + m_buffers[i].m_desc.m_attributes[j].m_offset); } } unbind(); //It seems like state dangles after this... for (int i = 0; i < m_buffers.size(); ++i) { glBindBuffer(m_buffers[i].m_desc.m_bufferType, 0); for (int j = 0; j < m_buffers[i].m_desc.m_attributes.size(); ++j) { glDisableVertexAttribArray(m_buffers[i].m_desc.m_attributes[j].m_index); } } }
开发者ID:mr-mo,项目名称:oplo,代码行数:39,
示例16: qtObjectSignalIndexvoid QtSignalForwarder::unbind(QObject* sender, const char* signal){ int signalIndex = qtObjectSignalIndex(sender, signal); QHash<QObject*,int>::iterator iter = m_senderSignalBindingIds.find(sender); while (iter != m_senderSignalBindingIds.end() && iter.key() == sender) { Q_ASSERT(m_signalBindings.contains(*iter)); const Binding& binding = m_signalBindings.value(*iter); if (binding.signalIndex == signalIndex) { m_freeSignalBindingIds << *iter; QObject* context = m_signalBindings.take(*iter).context; m_contextBindingIds.remove(context, *iter); iter = m_senderSignalBindingIds.erase(iter); } else { ++iter; } } if (!isConnected(sender)) { // disconnect destruction notifications unbind(sender); }}
开发者ID:robertknight,项目名称:qt-signal-tools,代码行数:22,
示例17: applyint apply(char *symname, int args){ int symaddr,lamlis,body,res; symaddr = findsym(symname); if(symaddr == NIL) return(NIL); else { switch(GET_FTYPE(symaddr)){ case SUBR: return((heap[symaddr].subr)(args)); case FSUBR: return((heap[symaddr].subr)(args)); case LAMBDA: { lamlis = car(heap[symaddr].bind); body = cdr(heap[symaddr].bind); bind(lamlis,args); while(!(IS_NIL(body))){ res = eval(car(body)); body = cdr(body); } unbind(); return(res); } } }}
开发者ID:kmizumar,项目名称:Mono,代码行数:22,
示例18: glGenTexturesDepthTexture::DepthTexture(QSize& res, string name) { this->name = name; glGenTextures(1, &handle); bind(); LogDebug << "Creating FBO Depth texture #" << handle << " " << name; filterMinMag(GL_NEAREST, GL_NEAREST); // Specifies the texture comparison mode for currently bound depth textures. // That is, a texture whose internal format is GL_DEPTH_COMPONENT_* glTexParameteri(target, GL_TEXTURE_COMPARE_MODE, GL_NONE); // shadowmap // No need to force GL_DEPTH_COMPONENT24, // drivers usually give you the max precision if available glTexImage2D(target, 0, GL_DEPTH_COMPONENT32F, res.width(), res.height(), 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0); unbind(); glError;}
开发者ID:martinruenz,项目名称:liblub,代码行数:22,
示例19: bindvoid GLRenderTarget::recreate(math::vector2di newSize,EPixelFormat format,bool depthBuffer){ m_size=newSize; core::string tmpStr; bind(); for (int i{}i<m_ColorTex.size();++i) { if(m_ColorTex[i]){ //glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT+i,GL_TEXTURE_2D, m_ColorTex[i]->getTextureID(),0); m_ColorTex[i]->recreate(format,newSize.x,newSize.y,m_numSamples); m_ColorTex[i]->bind(GL_COLOR_ATTACHMENT0_EXT+i); } else{ //glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,GL_RENDERBUFFER_EXT, 0); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT+i,GL_RENDERBUFFER_EXT, 0,0); } } if(depthBuffer){ if(!m_DepthTex){ m_DepthTex=new RenderTextureBuffer(m_device,EPixel_DEPTH,m_size.x,m_size.y,m_numSamples); tmpStr=m_name+L"_DepthTex"; m_DepthTex->setResourceName(tmpStr.c_str()); }else m_DepthTex->recreate(EPixel_DEPTH,m_size.x,m_size.y,m_numSamples); m_DepthTex->bind(GL_DEPTH_ATTACHMENT_EXT); } else glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, 0); //glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,GL_TEXTURE_2D, 0,0); //glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, 0); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, 0,0); checkFrameBufferStatus(); unbind();}
开发者ID:yingzhang536,项目名称:mrayy-Game-Engine,代码行数:38,
示例20: heightchaos::FBO::FBO(GLuint w, GLuint h, GLuint textureBuffersCount, std::initializer_list<std::pair<GLenum,GLenum> > rboList):width(w), height(h){ for(GLuint i = 0; i < vecTextures.size(); i++) delete vecTextures[i]; vecRBO.clear(); vecTextures.clear(); glGenFramebuffers(1, &id); glBindFramebuffer(GL_FRAMEBUFFER, id); for(GLuint i = 0; i < textureBuffersCount; i++){ GLuint textureId; glGenTextures(1, &textureId); glBindTexture(GL_TEXTURE_2D, textureId); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, GL_TEXTURE_2D, textureId, 0); vecTextures.push_back(new chaos::Texture(textureId, width, height)); } for(auto rboIt: rboList){ GLuint rbo; glGenRenderbuffers(1, &rbo); glBindRenderbuffer(GL_RENDERBUFFER, rbo); glRenderbufferStorage(GL_RENDERBUFFER, rboIt.first, width, height); glBindRenderbuffer(GL_RENDERBUFFER, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, rboIt.second, GL_RENDERBUFFER, rbo); vecRBO.push_back(rbo); } /*if(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE){ } else{ }*/ unbind();}
开发者ID:stawrocek,项目名称:chaos_engine,代码行数:38,
示例21: bind bool Texture::loadFromImage(const Image& img) { if(img.getSize().x > 0 && img.getSize().y > 0) { size = img.getSize(); bind(); glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0)); glCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0)); glCheck(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, size.x, size.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.getPixels())); glCheck(glPixelStorei(GL_UNPACK_ALIGNMENT, 1)); unbind(); created_ = true; } else { created_ = false; std::cerr << "Error loading texure from image: dimension of 0" << std::endl; } return created_; }
开发者ID:Dante12129,项目名称:Pancake,代码行数:23,
示例22: glDrawBuffersvoid nFrameBuffer::setTextureAttachment(nSRPointer<nTexture> t, uint slot) { if(!t) { attachments[slot] = 0; drawBuffers[slot] = GL_NONE; if(nGL::getState()->getFrameBufferBinding() == this) { glDrawBuffers(nGL::getState()->getHWInt(nGLState::MaxFboAttachements), drawBuffers); } setModified(); return; } nSRPointer<nTexture> attachment = attachments[slot]; if(attachment && attachment->getSize() != t->getSize()) { throw nInvalidSizeException(); } attachments[slot] = t; drawBuffers[slot] = GL_COLOR_ATTACHMENT0 + slot; bind(); t->bind(0, 0, true); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + slot, GL_TEXTURE_2D, t->getInternal()->getGLHandle(), 0); glDrawBuffers(nGL::getState()->getHWInt(nGLState::MaxFboAttachements), drawBuffers); setModified(); unbind();}
开发者ID:gan74,项目名称:nGine2,代码行数:23,
示例23: bind void VertexArray::drawInstanced(GLsizei primitiveCount, ePrimitives mode_) { bind(); GLenum mode = static_cast<GLenum>(mode_); if (mIndexBufferType == 0) glDrawArraysInstanced( mode, 0, mVertexBufferSize, primitiveCount ); else glDrawElementsInstanced( mode, mIndexBufferSize, mIndexBufferType, nullptr, primitiveCount ); unbind(); }
开发者ID:grandmaster789,项目名称:Overdrive,代码行数:23,
示例24: bindvoid gle::Texture::setData(const char* data, GLuint width, GLuint height, Target target, bool bindTexture){ if (bindTexture) bind(); if (width && height) { _width = width; _height = height; } glTexImage2D(target, // Texture type 0, // Level of detail (0 = max) _internalFormat, // Internal format _width, // Width _height, // Height 0, // This value must be 0 _internalFormat == Depth ? GL_DEPTH_COMPONENT : GL_RGBA, // Format of the pixel datas GL_UNSIGNED_BYTE, // Data type of the pixel datas data); gle::Exception::CheckOpenGLError("Texture::setData"); generateMipmap(); if (bindTexture) unbind();}
开发者ID:marianstan7,项目名称:gl-engine-42,代码行数:23,
示例25: whilevoid Babar::go_down(){ m_pos.y += 2 * BOX_SIZE; m_speed.y += BOX_SIZE; if (binded() ) { while (CollisionsManager::is_down_coll (m_bind->down_collision_type (m_rel_pos) ) ) { if (m_bind->double_collision (m_rel_pos) ) { m_rel_pos.y -= BOX_SIZE; break; } else { m_rel_pos.y += BOX_SIZE; } } } else { while (CollisionsManager::is_down_coll (gCollision->get_matrix()->down_collision_type (m_pos) ) ) { if (gCollision->get_matrix()->double_collision (m_pos) ) { m_pos.y -= BOX_SIZE; break; } else { m_pos.y += BOX_SIZE; } } } unbind(); PRINT_TRACE (1, "Descente d'une plateforme");}
开发者ID:joetde,项目名称:SuperBadbar,代码行数:37,
注:本文中的unbind函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ unbind_from_irqhandler函数代码示例 C++ unbecome_root函数代码示例 |