Search the Community
Showing results for tags 'image'.
-
Hello, I try to load a RAW texture that I have in DTX1 format. I don't found a way to load a RAW texture. I try to load as image but log an error loading int format = ::Unigine::Image::FORMAT_DXT1; ::Unigine::ImagePtr image = ::Unigine::Image::create(); image->create2D(textureSize, textureSize, format); const ::Unigine::Ptr<::Unigine::Blob> stream = ::Unigine::Blob::create(); stream->write(textureData, textureLen); // textureData=RAW DTX1 Buffer, textureLen=size image->load(stream->getStream()); /roberto
-
[SOLVED] Unigine::Image does not reflect file color channel number
sebastian.vesenmayer posted a topic in C++ Programming
Hi, I am using Unigine::Image to load tga files with rgb and rgba channels. The getFormat() does always return rgba8. How do I determine the correct number/format of color channels? Regards Sebastian -
I need to capture rendered images from camera. The code: image.clear(); viewport.renderImage2D(camera, image); Where are pixels has been stored?
-
Hi all, my question is about how image scale should be defined in rich text tag. I've tried different versions of the same definition in my .ui file but it always fails as unknown image option. Here is my last code. <?xml version="1.0" encoding="utf-8"?> <ui version="1.0"> <window name="rpci_wnd" export="1" height="539"> <hbox align="expand" background="1"> <label align="expand" width="579"> <text rich="1"> <image src="gui/gui_white.png" scale=%40 color="#00ff00"/>FS4<right/>This is right aligned text</text> </label> </hbox> </window> </ui> Thanks in advance.
-
HI! I create a earth model.and add image for it. add image for Node code: ObjectMeshDynamic* pTile = new ObjectMeshDynamic(); Image* image; image = getImage(...); if(image != NULL) { Material* matTex = pTile->getMaterialInherit(0); matTex->setImageTextureImage(matTex->findTexture("diffuse"),*image,1); } Now i create next layer,so i want to remove the old node.remove node code: string meshName = "mesh_"+xyw_replace(tt_tileKey,pattern,dstPattern); if(engine.materials->findMaterial(meshName.c_str())) { int retv = engine.materials->removeMaterial(meshName.c_str()); } _pGlobeRoot->removeChild(tileNode); // NodeDummy *_pGlobeRoot = new NodeDummy(); _pGlobeRoot is tree root node. if (engine.editor) { engine.editor->removeNode(tileNode); } But i find my computer's memory that go up,not go down. removeMaterial() function ,can it remove it's image? i think that the image is not remove???