opengl-es

Opengl Augmented Reality in Android from solvepnp

我们两清 提交于 2019-12-08 06:50:50
问题 I am trying to project a 3D surface in opengl on top of a camera view in Android. I am using opencv function solvepnp in native code to get the rotation and translation vectors of the device camera. I use these vectors to calculate the modelView matrix and modelViewProjection matrix as given in the following link: http://spottrlabs.blogspot.com/2012/07/opencv-and-opengl-not-always-friends.html Finally, I pass these matrices to the java code in a float array but when I use these matrices in my

Mapping a square texture to a triangle

*爱你&永不变心* 提交于 2019-12-08 06:40:35
问题 I started to play with a OpenGL ES 1.0 and I run into some (beginners) problem: I tried to map a square texture to the cube described by triangles. // Turn necessary features on glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_SRC_COLOR); glEnable(GL_CULL_FACE); //glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Bind the number of textures we need, in this case one. glGenTextures(1, &texture[0]); glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D

How to set the Open GLES effect on android Camera?

天涯浪子 提交于 2019-12-08 06:40:18
问题 I want to set the Android Camera with the OpenGLES effect. But i dont know how to set that. So is there any Demo Example to that Uses OpenGLES and Android Camera ?? Or Help me in how to make it possible to done some normal effect in Android Camera with OpenGLES support. Thanks. 回答1: Some basic effects can be done with Camera.Parameters.setColorEffect(). 来源: https://stackoverflow.com/questions/7976032/how-to-set-the-open-gles-effect-on-android-camera

Applying Effect to iPhone Camera Preview “Video” Using OpenGL

风格不统一 提交于 2019-12-08 06:09:25
问题 My goal is to write a custom camera view controller that: Can take photos in all four interface orientations with both the back and, when available, front camera. Properly rotates and scales the preview "video" as well as the full resolution photo. Allows a (simple) effect to be applied to BOTH the preview "video" and full resolution photo. My previous effort is documented in this question. My latest attempt was to modify Apple's sample GLVideoFrame (from WWDC 2010). However, I have not been

Marker based AR android application using Qualcomm SDK

末鹿安然 提交于 2019-12-08 06:09:21
问题 I am developing an android application in which a specific video is played when the poster of a specific movie is shown infront of the camera in android. Earlier i was using AndAr project for this stuff and i did some changes in draw() function of customObject and got it working. But now my client wants me to use Qualcomm sdk . I was playing with image targets application but couldnt find anything to get in my head. 回答1: Ok i got it working. The following is the solution to it which i got

Drawing with with blur effect on image using opengl

旧时模样 提交于 2019-12-08 05:26:35
问题 I have the same requirement as this question I am right now at situation where i set UIImage on my opengl view. Below is the complete code i used to set uiimage. Also it includes the drawing code. Using below code I am able to set image and drawing on it. when i do not set image in background it allows me to draw blur and smooth drawing but if i set background image it draws solid drawing I want smooth drawing on background image. I have used some of GLPaint code of apple for drawing. - (id

Drawing multiple cubes at random positions in opengl es android

笑着哭i 提交于 2019-12-08 05:15:29
Using OpenGL ES I am rendering a simple cube class that draws it at the centre of the screen. However, I want to be able to draw multiple such cubes on the screen at random positions but don't know how to. Here is the my custom surface view that renders the cube as a private class. I haven't included my main ActivityManager since its not the concern. public class TouchSurfaceView extends GLSurfaceView { private final float TRACKBALL_SCALE_FACTOR=52.0f; private final float TOUCH_SCALE_FACTOR=100.0f/320; private MyGLRenderer mRenderer; private float mPreviousX; private float mPreviousY; public

3D free rotation of object

一曲冷凌霜 提交于 2019-12-08 05:06:18
问题 I have a 3D CAD file of a set of products. I want to create a viewer so that the user can freely rotate the object in 3D. How would I best go about this? 1) I had thought about exporting a series of 360 degree images every 30 degrees around the image, but that would be around 360 images per product. Then right the code to handle the matrix that would be required to handle rotation of the object. Seems very excessive, but doable. 2) OpenGL - I have never done any 3d animation using this,

What is the exact performance cost when mixing OpenGL with UIKit in iPhone?

天大地大妈咪最大 提交于 2019-12-08 05:00:53
问题 I need to make a design decision of how to approach an app which needs to render few 3D objects on top of an image texture. Result needs to be rendered and saved as an UIImage. Graphical design (client) expects standard UIKit controls to manipulate 3D world. OpenGL view (CAEAGLLayer layer) needs to be inside UIScrollView for cheap and natural scroll and zooming implementation. There are just few extra controls to manipulate rotation scale and transition of the few 3D objects. There is not

What Clever Solutions are There for Including Resources in a Static Lib?

≡放荡痞女 提交于 2019-12-08 04:36:12
问题 I have a static library Xcode 4 project that includes a home-brewed rendering engine, and I re-use this engine in multiple apps. This engine uses OpenGL ES 2.0, and by extension, shaders. As shaders got more complicated, I moved away from storing them as NSStrings in a source file, and now store them as standalone text files with the .vert and .frag extensions. This works fine for apps that include the rendering engine in their own source; the shaders are simply added to the app's "Copy