texture

GL error from OpenGLRenderer: 0x502

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Our code is performing very simple operations on a Canvas (entirely in UI thread): drawText, translate, save, restore. Occasionally, we get this (on Nexus 4 running 4.3): W/Adreno200-ES20(22118): <gl_draw_error_checks:550>: GL_INVALID_OPERATION D/OpenGLRenderer(22118): GL error from OpenGLRenderer: 0x502 E/OpenGLRenderer(22118): GL_INVALID_OPERATION and the corresponding text is not drawn to the canvas. One problem is that it happens randomly. The code will work without error for maybe 10-20 calls, then there will be this error, then back to

WebGL - wait for texture to load

匿名 (未验证) 提交于 2019-12-03 02:43:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How do I test if the WebGLTexture object is 'complete' ? Currently I get this message: [WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete' I get this warning because the render-loop is trying to use the texture before its image has finished loading, so how to fix that? 回答1: The easiest way to fix that is to make a 1x1 texture at creation time. var tex = gl . createTexture (); gl . bindTexture ( gl .

Is three.js ObjectLoader capable of loading textures?

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: three.js version 0.0.70, blender version 2.73a I have a scene exported from blender to three.js json format using new io_three (not io_three_mesh ) exporter. I'm able to import the scene into three.js using ObjectLoader : var objectLoader = new THREE.ObjectLoader(); objectLoader.load('assets/models/exportedScene.json', function(imported) { scene.add(imported); }); Unfortunatelly, no texture is applied to an object, only the material. As I see from exportedScene.json file, there is an info about texture in file: "images": [{ "url": "blue.jpg"

How to take high-res picture while sensing depth using project tango

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How take picture using project tango ? I read this answer: Using the onFrameAvailable() in Jacobi Google Tango API which works for grabbing a frame but picture quality is not great. Is there any takePicture equivalent ? Note that java API public void onFrameAvailable ( int cameraId ) { if ( cameraId == TangoCameraIntrinsics . TANGO_CAMERA_COLOR ) { mTangoCameraPreview . onFrameAvailable (); } } does not provide rgb data. If I use android camera to take picture, tango can not sense depth. There I will have to use TangoCameraPreview.

Three.js multiple materials on object loaded via OBJMTLLoader

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have ".obj" and ".mtl" files of a model and I'm loading it via OBJMTLLoader . ".mtl" specifies texture to apply to a model, and three.js loads model and renders it with applied texture just fine. But here's the thing. Once an object is loaded, I would like to apply another texture onto it. This is because first texture represents surface material of an object. And second texture is a drawing, that I'd like to position at a specific location on a model. My question is: how to apply a second texture onto already loaded (and texturized)

GLSL sampler2DShadow deprecated past version 120? What to use?

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to implement percentage closer filtering for my shadow mapping as described here Nvidia GPU Gems When I try to sample my shadow map using a uniform sampler2DShadow and shadow2D or shadow2DProj the GLSL compile fails and gives me the error shadow2D deprecated after version 120 How would I go about implementing an equivalent solution in GLSL 330+? I'm currently just using a binary texture sample along with Poisson Sampling but the staircase aliasing is pretty bad. 回答1: Your title is way off base. sampler2DShadow is not

Possible to glTexImage2d an NPOT image onto a Pow-2 texture without extra allocation?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have discovered that there are still a fair number of drivers out there that don't support NPOT textures so I'm trying to retro-fit my 2D engine (based on OpenTK, which is in turn based on OpenGL) with Texture2D support instead of relying on GL_ARB_texture_rectangle. As part of this I am forcing all NPOTS texture bitmaps to allocate extra space up to the next power-of-2 size so they won't cause errors on these drivers. My question is, do I really have to resize the real bitmap and texture and allocate all that extra memory, or is there a

Is it possible to use WebGL max texture size?

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on an app where higher resolution is always better. But I'm stuck with WebGL max_texture_size problems. I create an image of size exactly this dimension (16384x16384 on my laptop) and WebGL crashes saying that: GL_INVALID_ENUM : glBindFramebuffer: target was GL_READ_FRAMEBUFFER_ANGLE GL_INVALID_ENUM : glBindFramebuffer: target was GL_READ_FRAMEBUFFER_ANGLE WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost And the same happen when I try with 0.75 of the max values. Only working at half the max resolution works but that means

GLSL sampler2D in struct

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In GLSL there seems to be linking error of shaders when I try to pass a uniform struct with a sampler2D attribute to a function which is forward declared. The code works if I remove forward declaration and move the function above main. Is this illegal code? #version 330 core in vec2 texcoords; out vec4 color; struct Material{ sampler2D tex; // Sampler inside a struct }; uniform Material material; // Forward Declaration vec4 add(Material m); void main() { color = add(material); } // Function Definition vec4 add(Material m) { return vec4

Avoid CPU side conversion with texImage2D in Firefox

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I use textures in webgl Firefox (Firefox Developer Edition 50.0a2 for OSX, to be excact) outputs these warnings in the console: Error: WebGL: texSubImage2D: Incurred CPU-side conversion, which is very slow Error: WebGL: texSubImage2D: Incurred CPU pixel conversion, which is very slow Error: WebGL: texSubImage2D: Chosen format/type incurred an expensive reformat: 0x1908/0x1401 Is there any way to avoid that? I have tried all combinations of allowed formats and types for the texImage2D call, but I get conversion on the CPU no matter