I have only a line to load particle.png, and the texture is embedded in it.
Sometimes the texture is seen and somethimes it does not appear.
I noticed I get a warning message:
cocos2d: Warning: File not found: particleTexture.png
My just code to load plist particle is this :
CCParticleSystemQuad emitter=[CCParticleSystemQuad particleWithFile:#"rain.plist"];
This is interesting:
Sometimes the texture is seen: sometimes it is not, and instead of the texture I see gradient balls.
Related
6.3.0 MinGW Using Qt3DRender::QMesh to load my obj file:
Qt3DRender::QMesh *planeModel = new Qt3DRender::QMesh(rootEntity);
planeModel->setSource(QUrl("qrc:/tu-154/Tu154.obj"));
rootEntity->addComponent(planeModel);
File load correct but i don't see textures:
It should be:
Using QTextureLoader says me:
Failed to load textureImage data using QImage
[Qt3DRender::GLTexture] No QTextureData generated from Texture Generator yet. Texture will be invalid for this frame
Qt3DRender::QMesh::Ready
What else might be right way here?
Github
I am trying to view textures in Point Cloud Library (PCL). I have a texture data file (.obj) and corresponding wavefront meterial file (.mtl) along with 5 images.
When I load this data in Meshlab, the texture is mapped but when I load it in pcl using following code;
pcl::TextureMesh mesh7;
pcl::io::loadOBJFile("textured_mesh.obj", mesh7);
pcl::visualization::PCLVisualizer viewer_pre7("PCL Viewer_pre7");
viewer_pre7.addTextureMesh(mesh7, "texture", 0);
viewer_pre7.spin();
I get following error in vtkOutputWindow. Although I can see the mesh structure but the texture is not mapped.
ERROR: In ..\vtkOpenGLProperty.cxx, line 607
vtkOpenGLProperty (000002420C804BA0): Hardware does not support the number of textures defined.
Mesh without texture in PCL
Same file when loaded in Meshgrid
Where shall I look for solving this error? Is PCL good enough for loading and viewing textures (.obj, .mtl)?
I'm working on a university project and it requires us to load up a cube model, texture it and do some other stuff with it.
We have been provided with a basic framework that uses SOIL to load up textures into OpenGL.
However, when I call the function:
SOIL_load_OGL_texture("Barren Reds.JPG", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS);
I get the following error:
OpenGL Debug Output: Source(OpenGL), Type(Error), Priority(High), Error has been generated. GL error GL_INVALID_ENUM in GetString: (ID: 491340553) Generic error
OpenGL Debug Output: Source(OpenGL), Type(Error), Priority(High), Error has been generated. GL error GL_INVALID_ENUM in TexParameteri: (ID: 2102148481) Generic error
OpenGL Debug Output: Source(OpenGL), Type(Error), Priority(High), Error has been generated. GL error GL_INVALID_ENUM in TexParameteri: (ID: 2102148481) Generic error
The thing is, I have another framework that uses SOIL too and when I run the same function with the same texture, it works fine. So I figured my SOIL build is not good, so I copied the working SOIL build to my project and still the same error.
I get these 3 lines of error whenever I call the function, so if I call it to create 3 textures I get it 3 times.
If you're using a Core context be aware that SOIL's query_tex_rectangle_capability() unconditionally calls glGetString(GL_EXTENSIONS) (GL_EXTENSIONS is not a valid argument for glGetString() in Core contexts and will generate a GL_INVALID_ENUM) instead of using glGetStringi() to iterate over extension strings.
Your options are:
Fix SOIL, or
Use stb_image.h directly and handle texture upload yourself, or
Use a Compatibility context (where glGetString(GL_EXTENSIONS) is still valid usage)
I have created cocos2d game. During testing i got some memory warnings, i solved all memory warnings in ipad3(New ipad) but i couldnt solve the below memory warning in ipad 1. Can you guys please help me....
1.
2012-08-01 22:19:16.399 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Animation.png' as texture
2012-08-01 22:19:16.662 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Ani.png' as texture
2012-08-01 22:19:16.681 Game[238:707] cocos2d: CCSpriteFrameCache: Trying to use file 'Faces.png' as texture
2012-08-01 22:19:16.753 Game[238:707] cocos2d: removeChildByTag: child not found!
2012-08-01 22:19:16.819 Game[238:707] Received memory warning.
2.
2012-08-01 22:23:11.573 Game[238:707] cocos2d: Received memory warning.
2012-08-01 22:23:11.573 Game[238:707] cocos2d: CCTextureCache: removing unused texture: img.jpg
2012-08-01 22:23:11.576 Game[238:707] cocos2d: CCTextureCache: removing unused texture: play.png
2012-08-01 22:23:11.582 Game[238:707] cocos2d: CCTextureCache: removing unused texture: img1.png
2012-08-01 22:23:11.585 Game[238:707] cocos2d: CCTextureCache: removing unused texture: youNeedToPopup.png
2012-08-01 22:23:11.590 Game[238:707] cocos2d: CCTextureCache: removing unused texture: popup.png
2012-08-01 22:23:11.599 Game[238:707] cocos2d: CCTextureCache: removing unused texture: conti.png
thanks
Memory warnings are completely normal. Indeed, this is the mechanism that allow iOS to retake back used memory that can be freed and continue working without crashing.
You can observe that in Instruments Allocation tools: memory is gradually filled up; then a memory warning is sent, and you will see memory quickly to be freed (up to a point). This is the sign of a healthy application.
What you should worry about is that, when a memory warning is sent out, memory is not recovered. But then your app would promptly be killed.
So, memory warnings + app not crashing is no worry at all.
I'm having issues with -hd suffixed files in Cocos2d. My SD tilesize is 52x52 with a map that's 6 wide x 9 high, and the HD tilesize is 104x104. Everything's resized appropriately, and I have both SD and HD versions of both my TMX map and my tileset.
In the Retina simulator, everything works fine, despite getting the following nonsensical lines in the log:
Filename(sprites-hd.PNG) contains -hd suffix. Removing it. See cocos2d issue #1040
cocos2d: CCFileUtils: Warning HD file not found: sprites-hd.PNG
But on the device, it does what you'd expect given the errors, and uses the original SD file which looks awful and messes up collision detection. It also generates no #1040 errors on the TMX file, and I suspect it's never using the -hd TMX file at all; when I removed it, I never saw a line warning me that it was missing.
What's going on here, and how do I fix it?