Alright then, I'll take another stab at GLSL. I had a feeling that thread I found was only false hope.
Type: Posts; User: w00tguy123
Alright then, I'll take another stab at GLSL. I had a feeling that thread I found was only false hope.
If you let OGL create the mipmaps for a 3D texture automatically, all dimensions of the texture are halved. This is a problem for me because the slices of the 3D texture blend together in the mipmap,...
Is there anything special I need to do when I apply the rotation matrix? Right now I'm calling glMultMatrixf() to apply the rotation but the object doesn't get oriented correctly. Looking from a...
I have 3 perpendicular 3D unit vectors. Imagining them rotate around a Point in space, I can see how they could represent an object's orientation. However, I have no idea how to convert those vectors...
Oh wow, I had a feeling the answer would induce a facepalm. For some reason when i create a texture object with:
Texture tex("test.png");
instead of:
Texture* tex = new Texture("test.png");...
GL_TEXTURE_2D is enabled in the init function when the program starts. I tried putting it there anyway and still got the white box.
I'm about to give up on this, use the SOIL library, and rewrite...
Ok, so I think I've found the problem. Something is going wrong when I upload the pixels to OpenGL. I plugged in the same image loading code into a program that has working textured polygons and I...
A 32x32 pixel PNG that I'm loading through LodePNG is either not being loaded into a texture correctly, or something is wrong with my code to keep it from being applied to anything.
I've checked...
Isn't Matrix4f just a set of 4*4 float values? Why can't you put those values into a FloatBuffer and pass that to glLoadMatrix?
@Alfonse: Thanks, that did the trick!
@Overaly: Also thanks, I'll check those out.
I don't understand why when I translate something very far (like to an X of 100,000) the object being drawn snaps around while moving instead of being smooth. I figured it was because I was using...
Thanks! That formula worked surprisingly well. I had a little trouble at first because I didn't know that the lambda values were supposed to be calculated from the triangle that the UV coordinates...
I split the triangle up into n amount of rows, and then go through each row and fill it with triangles.
The end product looks something like this:
http://phrogz.net/CSS/Geodesics/imgs/base.gif
I have a textured triangle that I'm trying to subdivide, but I'm not sure how to calculate the UV coordinates for the smaller triangles. I've googled around and it seems like I need to use...
Alright, I've replaced the glGetBufferPointer call with glMapBuffer and glBufferSubData is now working correctly!
The problem now is that I don't know how to subtract data from the big buffer....
I'm still having trouble getting glBufferSubData to work. I've made my method for updating very simple now but it crashes the program (EXCEPTION_ACCESS_VIOLATION) as soon as it's called:
public...
Ok, thank you for that link (and replies). I understand how adding data would work and I have allocated enough memory. However, subtracting data seems like it would be more difficult. My first idea...
I pretty much guessed on how to use glBufferSubData here, since I can't find any tutorials on using it or any sample code for updating a VBO. I figured that the last argument in glBufferSubData...
I have a large vertex buffer object and I only want to update a small portion of it. Google tells me that this is a job for the glBufferSubData function but I'm not sure how to use it. I've been able...