nobody knows?
Type: Posts; User: bsabiston
nobody knows?
Hello,
Currently in my game, I have a 3D scene which centers in the middle of the screen. That is, my player is in the middle of the screen, and when I rotate the camera, it rotates around the...
Hello,
I have what I believe to be a typical OpenGL camera setup. I need to figure out the rotation angle of the camera around the Y axis. I have been doing this by getting the Euler angles...
Hello,
I am trying to use shadow mapping in my game. I ported some sample code over and finally have it working for the most part. However, I am getting some bad artifacts whenever an object...
Actually, past a certain version of GLSL, you have to define it yourself, like this:
out vec4 fragColor;
Hello,
I have a simple frag shader that is not compiling on OS X. It says it does not know 'fragColor', but that is built-in, isn't it? I use it in all my other frag shaders but this one is...
Hello,
I am pretty new to shader programming, and I have read that it is not great to use conditionals in them to have the shader perform different tasks depending on some outside state. Is...
Yes I think that is what I want! Unfortunately OpenGLES2 doesn't do geometry shaders, but that article mentions an earlier technique that does not need them.
Thanks,
Bob
But if the 'lines' are in 3D, you still have the problem of them becoming invisible when seen edge-on.
Hello,
In my game I have a circle on screen indicating a steering wheel or direction pad. Depending on the position of the finger relative to the center of the circle, I want to move in that...
Yes, it is enabled. I do see transparency, but just not how I expect. Basically I am accustomed to thinking "oh if I want a half-transparent red color, will set it to RGBA 1.0 0.0 0.0 0.5"
But it...
Hello,
I have read that a good way to antialias lines in openGl is to use a texture map of an antialiased circle and map the coordinates of a rectangular set of vertices to it, like this:
...
Nobody? What do most people do if they want to draw antialiased lines in 3D space?
Hello,
I want to draw an antialised wireframe cube, with lines of a certain width (greater than 1). In OpenglES 2, on my devices at least, this isn't supported.
I've had some success drawing...
Hello,
When I set my vertex color in my glsl vertex shader like this, it doesn't do what I expect. Specifically I expect that setting the alpha to 0 would cause the vertex to be transparent. ...
Hello,
I have been working on a voxel engine for terrain, similar to mine craft. Online there are many tutorials about this. One of the optimizations that is frequently discussed involves...
Hello,
I have a shader which works on Mac OS X but not in iOS. I am passing an array of unsigned chars as the position attribute. In the shader, it's defined like this:
in lowp vec4position;
...
Awesome! Thanks very much
Bob
Hello,
I am drawing a bunch of 2D objects using OpenGLES 2.0, so I have vertex and fragment shaders. Some of the objects have color data at each vertex, and some of the objects are all one...
Yeah, I found that I had set the blend wrong. It was :
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
instead of this, which seems to work more like what I want:
...
Hello,
I have this shader and it is turning all of my objects translucent. From the code it looks to me like the color's alpha value will always be 1, but it is not. If I explicitly set...
Hello,
I have a vertex shader where I am trying to have the visibility of some terrain fade out at some distance from the viewpoint. I was trying to ramp the fragment color alpha down from 1.0...
Hello,
Is there any way to get the currently-bound vertex array object? I have some code where I am going to bind a VAO, but when the function finished I want to re-bind whatever VAO was active...
actually, this problem is for Mac OS X. And it appears that the range is actually just 1-1. From reading up, it seems like the latest versions of OpenGL are abandoning line-width support. Is that...
Hello,
On a mac I am getting GL_INVALID_VALUE when I call glLineWidth with any value over 1. Why would I get that? The documentation seems to indicate that widths greater than 1 are...