textures

Texture from hard disk not loading in three.js - showing black

霸气de小男生 提交于 2019-12-13 17:10:33
问题 I encountered problem on trying to load images from the local machine. If I give a link in internet to a jpeg file it works okay, but if I replace with path from my local machine - the texture is black. var texture = THREE.ImageUtils.loadTexture( 'http://ewgl.erbix.com/js/nodes2/textures/sun.jpg', {}, function(){ renderer.render(scene, camera); } ); paintMaterial = new THREE.MeshBasicMaterial({map: texture}) So instead of 'http://ewgl.erbix.com/js/nodes2/textures/sun.jpg' if I load the same

Are this textures?

别等时光非礼了梦想. 提交于 2019-12-13 15:46:15
问题 Now my app looks like this What I did http://i56.tinypic.com/6577zd.png (it is a image set as background and an ImageView. Every time the ImageView is touch, the background is changing, so the person is "rotating"). How can I mach some regions from image to look like this: What i Want http://i56.tinypic.com/2dipm3m.jpg Are this textures? I mention that there areas are changing when the person is rotating (background is changed)...so this means that the dimension of this images is changing

How to share textures between an NSOpenGLView and a full screen context in Mac OS?

社会主义新天地 提交于 2019-12-13 14:42:10
问题 I am working on an app that uses 2D textures to create animated kaleidoscopes. It starts out displaying to an NSOpenGLView. I am adding an option to switch to full-screen mode. I would prefer to use the OS 10.5 approach to full screen so I can support 10.5, but I think I would face the same issue if I was using the approach described in the docs under "Creating a Full-Screen Application in Mac OS X v10.6". The NSOpenGLContext init method initWithFormat:shareContext: takes an optional pointer

How to get notified when glTexImage2D finished upload?

不羁岁月 提交于 2019-12-13 14:22:12
问题 I want to render after a texture is uploaded to OpenGL, but I cannot get notified about the completition. I do want to avoid using animation, or any kind of repetitive rendering. Is glTexImage2D asynchronous at all? As far as I know, almost every OpenGL call is async. It would be great anyway, if I could be informed about a glDrawArrays completition as well. 回答1: The answer is, just continue after the call to glTexImage2D returns. From your point of view it is a synchronous call in the sense

Java3d: Texture is not applied to OBJ model properly

久未见 提交于 2019-12-13 14:14:25
问题 I load a 3d model of a torus (obj file) into my program, using these lines: Shape3D torus=null; Scene t1 = getSceneFromFile("Some local path\torus.obj"); Then I grab the model from the scene using this code: BranchGroup branchGroup = t1.getSceneGroup(); torus = (Shape3D) branchGroup.getChild(0); The following piece of code set an image as texture and then apply that texture to an Appearance object. TextureLoader textureLoader=new TextureLoader("Another local path\myImage.jpg",null);

Full screen background texture with OpenGL performance issue (iPad)

試著忘記壹切 提交于 2019-12-13 11:44:19
问题 I am quite puzzled with the poor performance I'm seeing when drawing a full screen background using a textured triangle mesh in OpenGL: drawing just the background and nothing else maxes out at 40 fps using the most basic shader, and 50 fps using the default pipeline. While 40 fps doesn't seem too bad, adding anything else on top of that makes the fps drop, and considering I need to draw 100-200 other meshes on top of that, I end up with a paltry 15 fps that is simply not usable. I have

What does this error message mean, it's caused by the rokonandroid game engine

谁说胖子不能爱 提交于 2019-12-13 10:52:12
问题 I'm having problems with an app engine now that I have my whole game set up, it kind of sucks. What's this error message mean? I really don't understand what the problem is. Is the problem with one of my sprites that is causing the game engine to get mad? 12-13 12:48:15.389: ERROR/Rokon(1776): addToActive(1505553220) 12-13 12:48:15.389: WARN/System.err(1776): java.lang.Exception: addToActive(1505553220) 12-13 12:48:15.389: WARN/System.err(1776): at com.stickycoding.rokon.Debug.error(Debug

how to do particles texture mapping with three.js shaderMaterial?

我与影子孤独终老i 提交于 2019-12-13 06:14:09
问题 what I'm trying to achieve is having a particle system where each particle have a portion of a given texture. Below is a example of a particles's buffergeometry using a shader material. so far I can make it look almost as it should, nonetheless, I dont know how to properly program the fragment shader in order to have the correct offset of the texture on each particle. the texture is 500x500px which is the same amount of particles. http://www.pruebasmemo.co.nf/ fragment shader code: uniform

Coord texture array does not works correctly with glDrawElements

陌路散爱 提交于 2019-12-13 06:10:04
问题 the purpose of my program is to load and display a simple cube with the same texture on each face. But the problem is that the output is not very good (just 4 faces are textured correctly).I tried lots of combinations of coordinates in the textures array but most of the time it's worse. Is it possible to set textures correctly with the function glDrawElements or not? #define OFFSET_BUFFER(bytes) ((GLfloat *)NULL + bytes) GLfloat vertices[] = { -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0

How to scroll two different textures(in a scrolling manner- fiddle attached for reference) one after the other in WebGL?

落爺英雄遲暮 提交于 2019-12-13 05:51:55
问题 I am trying to achieve something i.e. a scrolling texture one after the other same as a marquee in HTML that just scrolls the text. Here's is what I have done so far : Fiddle , if you load it you will see first texture scrolling correctly and the second texture just comes over it after sometime(I kept 10 seconds for this). But ideally, it should behave like one after the other, for eg: if "This is a test" is a marquee, then they come one after the other. Similarly , "Image1 must be followed