///////////////////////////////////////////////////////// // startRendering // ///////////////////////////////////////////////////////// void pix_snap2tex :: startRendering(void) { if(GLEW_VERSION_1_1) { glGenTextures(1, &m_textureObj); if(GLEW_VERSION_1_3) { glActiveTexture(GL_TEXTURE0_ARB + m_texUnit); } m_textureType = (m_rectangle?m_canRectangle:GL_TEXTURE_2D); glBindTexture(m_textureType, m_textureObj); setUpTextureState(); } else { glGenTexturesEXT(1, &m_textureObj); glBindTextureEXT(m_textureType, m_textureObj); setUpTextureState(); } if(GLEW_VERSION_1_3) { glActiveTexture(GL_TEXTURE0_ARB); } m_texWidth = m_texHeight = -1; m_init=true; if (!m_textureObj) { error("Unable to allocate texture object"); return; } }
///////////////////////////////////////////////////////// // startRendering // ///////////////////////////////////////////////////////// void pix_snap2tex :: startRendering() { if(GLEW_VERSION_1_1) { glGenTextures(1, &m_textureObj); glBindTexture(m_textureType, m_textureObj); setUpTextureState(); } else { glGenTexturesEXT(1, &m_textureObj); glBindTextureEXT(m_textureType, m_textureObj); setUpTextureState(); } m_oldWidth = m_oldHeight = m_texWidth = m_texHeight = -1; if (!m_textureObj) { error("Unable to allocate texture object"); return; } }
///////////////////////////////////////////////////////// // startRendering // ///////////////////////////////////////////////////////// void pix_movieOS :: startRendering() { glGenTextures(1, &m_textureObj); if ( ! GemMan::texture_rectangle_supported ) { glBindTexture(GL_TEXTURE_2D, m_textureObj); } else { glBindTexture(GL_TEXTURE_RECTANGLE_EXT, m_textureObj); } setUpTextureState(); m_pixBlock.newimage = 1; m_dataSize[0] = m_dataSize[1] = m_dataSize[2] = -1; }
//////////////////////////////////////////////////////// // startRendering // ///////////////////////////////////////////////////////// void pix_cubemap :: startRendering() { glGenTextures(1, &m_realTextureObj); // this crashes sometimes!!!! (jmz) if(GLEW_VERSION_1_3) { glActiveTexture(GL_TEXTURE0_ARB + m_texunit); } glBindTexture(m_textureType, m_realTextureObj); m_textureObj=m_realTextureObj; setUpTextureState(); m_dataSize[0] = m_dataSize[1] = m_dataSize[2] = -1; if (!m_realTextureObj) { error("Unable to allocate texture object"); return; } }