opengl-es

Forcing OpenGL Buffer to use GL 1.0 or 1.1?

我怕爱的太早我们不能终老 提交于 2019-12-07 06:22:44
问题 I've been working on a project in which a user can interact with a GLSurfaceView to draw shapes on a screen. This all works fine and dandy, but now I'm attempting to do two things: 1) create a thumbnail of their drawing, and 2) save their drawing. It's important to note that the user can draw an image which is larger than the screen. As far as my research shows, this is best achieved using a Bitmap (which can be 1) rendered to a Canvas for a thumbnail, and 2) be saved to the file system,

Using gl_FragDepth in WebGL

喜夏-厌秋 提交于 2019-12-07 04:39:33
问题 I am writing a 3D application in webgl, and need to provide my own depth data that is contained within a texture, my current code does this: VS: varying vec2 vUv; void main() { vUv = uv; } FS: uniform sampler2D depthTex; varying vec2 vUv; void main() { gl_FragDepth = texture2D(depthTex, vUv).r; } however gl_FragDepth is disabled in opengl-es (and therefor webgl) is there anyway to somehow enable it, or any way to provide my own depth data that doesnt involve heavy manipulation of render

Implementing depth testing for semi-transparent objects

你离开我真会死。 提交于 2019-12-07 03:38:42
I've been carefully trolling the internet for the past two days to understand depth testing for semi-transparent objects. I've read multiple papers/tutorials on the subject and in theory I believe I understand how it works. However none of them give me actual example code. I have three requirements for my depth testing of semi-transparent objects: It should be order independant. It should work if two quads of the same objects are intersection each other. Both semi-transparent. Imagine a grass object that looks like a X when viewed from above: It should correctly render a semi-transparent

Display error with Visual Studio Code under Ubuntu

久未见 提交于 2019-12-07 03:33:50
问题 I have a problem with Visual Studio Code for several days: it is impossible to launch it (in fact, the window is almost totally black), and here is the console output when I start it from a terminal: bash: impossible de régler le groupe de processus du terminlal (-1): Ioctl() inapproprié pour un périphérique bash: pas de contrôle de tâche dans ce shell [3267:0609/135005:ERROR:buffer_manager.cc(361)] [.CommandBufferContext.Compositor-0xc0a90cb29a0]GL ERROR :GL_INVALID_ENUM : glBufferData: <-

Issue with shaders/matrices - can't see object

自作多情 提交于 2019-12-07 03:27:29
问题 I'm attempting to put a cube on the screen and light it. I'd like a phong shading on the cube. When I run my code, I can see a background image but no cube. I'm fairly sure the cube itself is correct as I've managed to display it with a solid-colour shader. I've managed to get the shader program to compile but I can't see the cube at all. I don't know if GLES/LibGdx have a mechanism for run-time exceptions but I can't see anything in the logs. I'm assuming that The model is out of the field

OpenGL ES black texture on Nexus S

有些话、适合烂在心里 提交于 2019-12-07 02:51:57
问题 OpenGL code that works on the Nexus One will not work properly on the Nexus S. Textures don't seem to render and I'm left with just black where textures should be. Anyone got any ideas? 回答1: The accepted answer given here addresses this issue in slightly more depth than I will, but while this black screen issue does arise from the Nexus S (and some other devices) being strict about power-of-two textures, it does not mean that textures need to have dimensions that are a Po2 . In the texture

How many Android devices support GLSurfaceView.setPreserveEGLContextOnPause today?

你。 提交于 2019-12-07 02:35:56
问题 I don't need the exact number, the percentage would be enough. For example, if I develop an app with 4.0 min SDK version, how can I assure that the context will be preserved? May it depend on the OpenGL-ES version? I tried to find information about chips with limited EGL context but couldn't find any. The reason I need to know - I don't want to implement a special cache subsystem which will reload my textures after the app is resumed. I'm ready to drop some devices that don't support

gluUnProject Android OpenGL ES 1.1 Usage

爷,独闯天下 提交于 2019-12-07 02:32:08
问题 I'm trying to use gluUnProject to convert windows coords to world coords. I'm not trying to get working sample in emulator or older Android systems (with OpenGL ES v1.0) and this is not question about GL function availability. I'm trying to work on the real device with OpenGL ES 1.1 and glGet functions return non-zero results. There is sample: public Vector3 translateScreenCoordsToWorld(Vector2 screenCoords) { gl.glLoadIdentity(); final Matrix4x4 modelViewMatrix = new Matrix4x4(); final

Render to texture, then render texture to screen in iOS

风格不统一 提交于 2019-12-07 02:19:28
I am trying to render a simple scene into a FBO that is backed by a texture as a color attachment and then draw a quad to the screen using this texture in iOS. This will help me do some post processing of the final scene. There are a few questions on SO that address similar (but not quite the same) questions and I've tried whatever I could understand. Nothing works. I have two shader programs. The first one _program simply takes the vertex positions and renders them with a single color. The second one quadProgram takes a texture, the texture coords and the quad Coords. (In the interest of

Drawing a concave polygon in OpenGL

二次信任 提交于 2019-12-07 01:51:52
问题 I have a concave polygon I need to draw in OpenGL. The polygon is defined as a list of points which form its exterior ring, and a list of lists-of-points that define its interior rings (exclusion zones). I can already deal with the exclusion zones, so a solution for how to draw a polygon without interior rings will be good too. A solution with Boost.Geometry will be good, as I already use it heavily in my application. I need this to work on the iPhone, namely OpenGL ES (the older version with