//************************************************************************************************************** LLTextureAtlas::LLTextureAtlas(U8 ncomponents, S16 atlas_dim) : LLViewerTexture(atlas_dim * sSlotSize, atlas_dim * sSlotSize, ncomponents, TRUE), mAtlasDim(atlas_dim), mNumSlotsReserved(0), mMaxSlotsInAtlas(atlas_dim * atlas_dim) { generateEmptyUsageBits() ; //generate an empty texture generateGLTexture() ; LLPointer<LLImageRaw> image_raw = new LLImageRaw(mFullWidth, mFullHeight, mComponents); createGLTexture(0, image_raw, 0); image_raw = NULL; }
//************************************************************************************************************** LLTextureAtlas::LLTextureAtlas(U8 ncomponents, S16 atlas_dim) : LLImageGL(), mAtlasDim(atlas_dim) { setComponents(ncomponents) ; mCanAddToAtlas = FALSE ;//do not add one atlas to another. mNumSlotsReserved = 0 ; mMaxSlotsInAtlas = mAtlasDim * mAtlasDim ; generateEmptyUsageBits() ; //generate an empty texture S32 dim = mAtlasDim * sSlotSize ; //number of pixels per dimension LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim, dim, getComponents()); createGLTexture(0, image_raw, 0); image_raw = NULL; dontDiscard(); }