My understanding of GLSL uniform arrays is that they should be identifiable by both the name along, and the name along with the array index in brackets. For example, if I had this uniform array in my...
Type: Posts; User: JoshKlint
My understanding of GLSL uniform arrays is that they should be identifiable by both the name along, and the name along with the array index in brackets. For example, if I had this uniform array in my...
Okay, 32 is no good. You need 128 matrices to do GPU skinning.
According to the OpenGLES spec all implementations are guaranteed to support at least 128 elements in a uniform vector array:
MAX VERTEX UNIFORM VECTORS 128 GetIntegerv...
It's certainly one solution. You could also just upload each element individually.
[/QUOTE]
Ah, but you can't. The Galaxy Nexus won't recognize the uniform name with the indice appended...
I just tested, and I'm right. On iOS, only the uniform with the suffix '[0]' is recognized. On the Galaxy Tab, only the uniform without the suffix is recognized. My solution is to never use...
According to this, it's both, which makes sense:
http://www.opengl.org/wiki/GLSL_Uniform
I swear it wasn't working on iOS. Can anyone comment on this?
In my fragment shader, I have a uniform array like this:
uniform mediump vec3 lightdirection[4];
On iPhone 4, iPad 2, and HTC Evo, I use the string "lightdirection[0]" to set the uniform value...
I think I found the answer. You have to use Android 2.3 or greater to get extra extensions:
http://stackoverflow.com/questions/6970725/android-opengl-es-all-extensions-supported
That's not a problem, the code is already set up to not use occlusion if the extension isn't supported.
I tried replacing gl2ext.h in the NDK with the one found here:...
I added support for EXT_occlusion_query_boolean on iPhone:
http://www.khronos.org/registry/gles/extensions/EXT/EXT_occlusion_query_boolean.txt
But can't find it in the ndk version 9 gl2ext...
That should really be corrected then.
I get this error with a 120 GLSL shader in a GL2 context, on OSX Lion:
Yet the docs say gl_VertexID has always been supported:
http://www.opengl.org/sdk/docs/manglsl/xhtml/gl_VertexID.xml
FYI I got word back from the driver dev team, and apparently I am not sharing textures between contexts correctly. So AFAIK this will work, although I haven't implemented the fix yet.
I have a Radeon HD 3870 in my Windows machines right now, and it supports 8x color and depth texture samples. So either the cards they used in iMacs are slightly different, or it's a limitation of...
That's odd that the ATI cards only support one depth sample. You can't do deferred MSAA with only color multisampling. My ATI 3870 supports at least 8x texture samples for color and depth.
Yeah, what happened was the Mac file paths weren't correct, and in OpenGL 3 there is no error emitted when a shader is compiled with no objects attached, so it never even occurred to me that could be...
Possible, but my OpenGL1 renderer uses basically the same code, and it works fine.
int attribs[]={
NSOpenGLPFAAccelerated,
kCGLPFADoubleBuffer,
...
It renders one frame, then the object on screen disappears for a few seconds, then it renders another frame every five seconds or so. I think it's updating the whole time, but for some reason the...
I had a few small problems I fixed, but when I tried running my deferred renderer on OSX Lion, it has...abnormal...graphical output, with no OpenGL errors.
What's your experience with Apple's 3.2...
FYI, this comes before the code above:
//Create default vertex array
GLuint vao;
glGenVertexArrays(1,&vao);
glBindVertexArray(vao);
I reduced my code down to this:
float vertex[9];
GLuint buffer;
GLuint target = 0;
//Create vertex buffer and set data
...
I create and bind a single vertex array object when the program starts. That seems to be enough to make ATI and NVidia drivers happy on Windows.
The error occurs directly after the call to...
Any call to glDrawElements or glDrawArrays in OpenGL 3.2 in OSX Lion will produce the GL_INVALID_OPERATION error.
Here are the docs for this command:...
I can't find the example I used now, but when I got it, I got it pretty quickly:
http://leadwerks.com/werkspace/uploads/1299536611/gallery_1_1_191468.png
I've got my engine set up to handle tessellation shaders. I can't seem to find a GLSL example anywhere. Where can I find one?