textures

JOGL white texture?

◇◆丶佛笑我妖孽 提交于 2019-12-12 12:19:48
问题 I am trying to load earth.png and place it over a triangle. The image is 256x256. I have followed an online tutorial and played around with this for hours, but the triangle still remains white. Can any one point me in the right direction. import java.awt.Frame; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.IOException; import java.io.InputStream; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.texture

Sampling from a texture which is also a render target

回眸只為那壹抹淺笑 提交于 2019-12-12 11:41:02
问题 I know this technically isn't supported (and as far as I can tell it's undefined behavior) but is it really a fatally horrible thing to sample from a texture which is also being written to? I ask because I need to read from a depth texture which I also need to write to, if I can't do this it means I will have to copy the depth texture and if it isn't that big of a deal I don't see the harm in simply copying it? Thanks for any help! 回答1: Yes, it's fatal and triggers undefined behaviour. Just

Threejs DataTexture Not Updating

天涯浪子 提交于 2019-12-12 10:16:30
问题 UPDATE: Issue was that texData object was recreated each time and thus reference for DataTexture was lost. Solution by WestLangley was to overwrite the data in texData instead of recreating texData object. I have a simple threejs scene with a DataTexture in a ShaderMaterial . The data array passed to it once during initialization is updated on mouse events. However the DataTexture does not seem to update. Did i assign uniforms or texture data wrongly? Or using the needsUpdate flags wrongly?

Explain how OpenGL ES background images work

拈花ヽ惹草 提交于 2019-12-12 10:10:06
问题 Could someone please explain how you render background images on an OpenGL ES view? From the basics of setting up the OpenGL environment. I'm a newbie to OpenGL here. I'm seeing a few questions/answers on stackoverflow about creating background images, but I'm trying to modify existing code at the moment (Apple's GLPaint in particular), and I'm not sure what is needed and what is not. Having tried the solutions, with no success, I thought I should take a step back and actually try and

How do you convert opengl texture back to bitmap in android?

折月煮酒 提交于 2019-12-12 09:59:51
问题 I wanted to apply image-filter to my image and used android HelloEffects sample It converts the image data from bitmap to texture. After applying the image filter effect, I'd like to get the image back in jpeg format, but don't know how to do that. 回答1: Check the saveFrame() method mentioned in http://bigflake.com/mediacodec/ExtractMpegFramesTest_egl14.java.txt 回答2: I did this in one way like , I converted the texture image into bitmap using glreadpixles() method I then saved the bitmap to

Binding Video Texture on OpenGL Sphere on Android

孤街浪徒 提交于 2019-12-12 09:55:29
问题 I'm trying to create a 360 video sphere (like the ones for cardboard) on Android. I have done this with a photo by rendering a sphere in OpenGL ES1.0 and than attaching a texture to it. Afterwards I can use the sensor values to rotate the sphere. However, I can't figure out how to change the picture to a video . I've tried frame by frame rendering using texSubImage2D() but it's SUPER SLOW. My video is probably going to be about 4k density as I need a good quality even when only small portion

Three.js materialLoader doesn't load embedded texture image

本秂侑毒 提交于 2019-12-12 09:06:39
问题 I'm exporting a three.js material using material.toJSON() provided method, this is the result: { "metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"}, "uuid":"8E6F9A32-1952-4E12-A099-632637DBD732", "type":"MeshStandardMaterial", "color":11141120, "roughness":1, "metalness":0.5, "emissive":0, "map":"876D3309-43AD-4EEE-946F-A8AE8BA53C9E", "transparent":true,"depthFunc":3,"depthTest":true,"depthWrite":true, "textures":[ { "uuid":"876D3309-43AD-4EEE-946F-A8AE8BA53C9E", "name

Minimum required Texture Size for compliance with OpenGL-ES 2.0 on Android?

别来无恙 提交于 2019-12-12 08:33:51
问题 is there a minimum texture size a certain hardware needs to support to be compliant with the OpenGL-ES 2.0 specification ? Something like the GL_MAX_TEXTURE_SIZE value has to be at least 1024 or 2048 or something like that ? The reason I would like to know this is because I work on something that uses shaders and as such has to be OpenGL-ES 2.0. Therefore I would like to make the textures as big as possible without having to consider each and every hardware texture limitation (like the old

Combine Array of Sprite objects into One Sprite - Unity

筅森魡賤 提交于 2019-12-12 08:22:54
问题 I have an array of Sprite objects in Unity. Their size vary depending on the image loaded. I want to combine them side by side like a tiled map into one image. I want them to be layout like your are forming a line of images, one after the other. (note: NOT one on top of the other) How may I be able to do this? The reason why I'm combining (just for those who want to know) is because I'm using a polygon2D Collider. Since there are some weird behaviors happening when I use multiple colliders

How Do I Use an HTML5 Canvas as a WebGL Texture

送分小仙女□ 提交于 2019-12-12 07:33:44
问题 I want to: Set Uniform values for case i. Render compute shader for case i to an HTML5 <canvas> tag. Use the <canvas> contents (case i render output) as a texture in the next render pass. Repeat for all cases. Extract answers into JS from color data. I'm trying to make a compute shader and need to carry a value per pixel (fragment) on each render pass. A simple example would be incrementing the blue value of a pixel on each render call. I.e. pass 1: b=1 pass 2: b=2 pass 2: b=3 etc. Is this