void Mesh::initStrip(GLuint shader, GLuint w, GLuint h, const glm::vec3 *verts, const glm::vec3 *norms) { assert(w > 1 && h > 1); m_w = w; m_h = h; setMappings(); GLuint memsize = m_mappingSize * 8 * sizeof(float); createBuffers(shader, memsize); setVerts(verts, norms); }
void Menu::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) { float pf = rootView().viewRes().pixelFactor(); boo::SWindowRect rect = sub; rect.size[0] = m_cWidth; if (rect.location[1] - m_cHeight < 0) { rect.location[1] += ROW_HEIGHT * pf; rect.size[1] = std::min(root.size[1] - rect.location[1], m_cHeight); } else { rect.location[1] -= m_cHeight; rect.size[1] = m_cHeight; } View::resized(root, rect); m_scroll.m_view->resized(root, rect); setVerts(rect.size[0], rect.size[1], pf); rect.location[0] += 5 * pf; rect.location[1] += rect.size[1] - (ROW_HEIGHT + ITEM_MARGIN - 5) * pf; rect.size[0] = m_headText->nominalWidth(); rect.size[1] = m_headText->nominalHeight(); m_headText->resized(root, rect); }