opengl-es

OpenGL ES 2.0 solid colour & colour value precision issue

时间秒杀一切 提交于 2019-12-20 07:39:07
问题 Issue partially resolved, leaving previous post & code here for reference, new issue (stated in title) after the strong text at the bottom I am trying to use colour picking to identify objects in OpenGL on Android. My code works fine for the most part, all objects are assigned unique colours in a 0.00f, 0.00f, 0.00f format (Alpha is always 0), and when clicking on the objects they are identified (Most of the time) using glreadpixels and converting/comparing the values. The problem only occurs

Loading model using Jeff Lamarches script

拟墨画扇 提交于 2019-12-20 07:23:31
问题 I'm trying to load 3D model into scene using Jeff Lamarches python script to export 3D model into Objective C header file in Blender. I'm using Blender version : 2.63a Got Lamarche's script from here : https://github.com/jlamarche/iOS-OpenGLES-Stuff What I did Installed the script as it is described in instructions Opened blender with default cube Tried to export Objective C header file of the default 3D The header file is generated without any vertex data, any idea why this happens ? Please

Implementing a 32-bit heightmap vertex shader in threejs

帅比萌擦擦* 提交于 2019-12-20 06:57:43
问题 I am attempting to repurpose the heightmap shader example found here into one that will work with 32-bits of precision instead of 8. The work-in-progress code is on github: https://github.com/bgourlie/three_heightmap The height map is being generated in .NET. The heights are within 0f...200f and converted into a 32-bit color value (Unity's Color struct) using the following method: private static Color DepthToColor(float height) { var depthBytes = BitConverter.GetBytes(height); int enc =

Implementing a 32-bit heightmap vertex shader in threejs

安稳与你 提交于 2019-12-20 06:52:30
问题 I am attempting to repurpose the heightmap shader example found here into one that will work with 32-bits of precision instead of 8. The work-in-progress code is on github: https://github.com/bgourlie/three_heightmap The height map is being generated in .NET. The heights are within 0f...200f and converted into a 32-bit color value (Unity's Color struct) using the following method: private static Color DepthToColor(float height) { var depthBytes = BitConverter.GetBytes(height); int enc =

Textures not rendering in 2.3.3

为君一笑 提交于 2019-12-20 05:40:41
问题 I ran into somewhat of a stressful issue today while wokring on my game for android and was hoping someone would have some insight. My friend has used cyanogenmod on his Droid incredible to root and install gingerbread 2.3.3. I tried booting up the game on his device and it seems to be running but everything is white. Being as my glClear is black, I'm assuming that this means the bitmaps and/or textures are not loading correctly. I've tried putting my textures in all of the different dpi

How to make the GLSurfaceView transparent

僤鯓⒐⒋嵵緔 提交于 2019-12-20 04:53:38
问题 I am drawing the object on GLSurfaceView using opengles. But GLSurfaceView is not the transparent. Instead of transparent its completely black in background. Please help me how to make the GLSurfaceView transparent. I used this code setEGLConfigChooser(8, 8, 8, 8, 16, 0); getHolder().setFormat(PixelFormat.TRANSLUCENT); Thanks in advance. 回答1: You should add a another property for it: getHolder().setFormat(PixelFormat.TRANSLUCENT); // this made it work for me - works only from sdk level 6 on,

Max Varying Vectors and Floats for GLES 2.0

夙愿已清 提交于 2019-12-20 04:13:30
问题 I am trying to figure out what is the maximum number of varying vectors and uniforms I can use on a device that is OpenGL ES 2.0 compatible. I am trying to understand how MAX_VARYING_VECTORS works. So if MAX_VARYING_VECTORS is 8, does that mean I can store 8 * 4 bytes of data for varyings or does it mean that I can only define 8 varyings irrespective of the data type? 回答1: MAX_VARYING_VECTORS is measured in units of 4-member float vectors ( vec4 ). So with the minimum guaranteed value of 8,

Is it possible to access OpenGL ES from RoboVM without using LibGDX?

天大地大妈咪最大 提交于 2019-12-20 03:36:14
问题 Is it possible to access OpenGL ES on iOS from RoboVM without using LibGDX ? If so, are there any useful references? The only thing I can find is this super-simple demo from over 2 years ago: http://robovm.com/ios-opengles-in-java-on-robovm/ But it doesn't provide any functions besides glClearColor and glClear. The Apple GLKit framework seems to be implemented, though. I just can't find all the actual glWhatever(...) functions... 回答1: Yes, it is possible. You need two things for this: 1.

Problems texturing a cube

大兔子大兔子 提交于 2019-12-20 03:31:27
问题 im trying to make a cube with a different texture on each face. I have the front face and the rear face working now. Now i am trying to make the right face of the cube. But something is going wrong, because i got the right face done but the texture is showing with errors (it's like stretched and shredded), i have something bad in my code and i dont know what. This is my code public class Cube { private FloatBuffer vertexBuffer;//Vertices private FloatBuffer textureBuffer;//Texture coordinates

glGetString(GL_VERSION) returns “OpenGL ES-CM 1.1” but my phone supports OpenGL 2

江枫思渺然 提交于 2019-12-20 03:19:44
问题 I'm trying to make an NDK based OpenGL application. At some point in my code, I want to check the OpenGL version available on the device. I'm using the following code : const char *version = (const char *) glGetString(GL_VERSION); if (strstr(version, "OpenGL ES 2.")) { // do something } else { __android_log_print(ANDROID_LOG_ERROR, "NativeGL", "Open GL 2 not available (%s)", version=; } THe problem is that the version string is always equals to "OpenGL ES-CM 1.1" . I'm testing on both a Moto