Auto-answer.
Oh, I had a race condition that rendered the glDrawElements before indices had been submitted to the GPU.
Thanks anyway!
Type: Posts; User: kingc8
Auto-answer.
Oh, I had a race condition that rendered the glDrawElements before indices had been submitted to the GPU.
Thanks anyway!
Hello,
I would like to borrow this thread to ask about an issue like this.
I was successfully using DrawArrays and then changed part of my draw routine so that it used glDrawElements.
Now,...
glfwInit();
glfwOpenWindowHint( GLFW_WINDOW_NO_RESIZE, 1 );
int ok = glfwOpenWindow(
...
);
Darn. I guess I need to file a bug with the good people behind GLFW, unless I'm mis-using their library but I guess that must be it.
Thanks to Dan and fellow contributors.
Indeed it does appear to be the first non OpenGL 1.1 call. But if you start using newer OpenGL calls, do you need to hint or declare that to OpenGL explicitly?
I always assumed that before The...
I have tested with both a 2048x2048 DXT5 image and a smaller 256x256 DXT5 image.
T[0].dimensions().x = 256
T[0].dimensions().y = 256
T[0].capacity() = 65536
sizeof(T[0].data()) = 8
I know...
I saw that thread as I was hunting for answers. I dismissed it because I am not allocating NULL data. I am allocating with data retrieved with a GLI DDS image decoder.
As I said, the texture...
Hello everyone,
My main program is a VBO based fixed function OpenGL application.
When I use glCompressedTexImage2D, everything works perfectly.
However, I was working on a tool which uses...
Oh yes, that works! Thanks Dan!
.. and thanks to the other contributors for your feedback.
Ok, imagine the camera has a location of 0,20,20 and we are looking directly at the Origin (0,0,0), so we're approximately looking at 45 degrees towards the Z plane which is treated as the ground,...
Thanks, but I understand that already. What I would like to do with that ray is find out where the Z plane (Z origin, Z zero) is within the zNear (0) and zFar (1) viewing area.
OpenGL has changed completely over the recent years.
However, to *teach* OpenGL, I would recommend starting with an OpenGL 1.2 example program with GLUT. Then, replace the gl_begin and gl_end...
Hello,
I have a quick question for you experts.
I'm using gluUnProject, which is great. And commonly people would use glReadPixels with the GL_DEPTH_COMPONENT to find the viewing volume z value...
Thanks for your help.
In my experience, I mean I'm not an expert here, but if you render your 2D scene into an FBO (or perform a glSubTex on the screen buffer) unless you flip your glOrtho, the...
Hello,
I have a question about the way the FBO clips the visible scene.
I'm using glOrtho for 2D and using render-to-texture with FBO. Since the FBO is upside-down and reversed, I draw all...
If you look at the edge of one of the smiley faces you may see a dark edge to it.
This smiley face has been added to the texture below using the FBO render-to-texture.
When I change the color...
Hello,
Has anyone noticed (that on Nvidia hardware) when you copy a texture with alpha onto another texture, the imposed image has the backbuffer color in it?
Can that be avoided?
I've...
Thanks Dark, yes I have already removed that line with the understanding that the shader "renders" it moot.
GLStarter, thanks I made those changes but it didn't correct the result.
To...
The:
// ul_set = glGetUniformLocation( glsl_prog, "jbtex1")
just indicates that ul_set has been defined elsewhere by the function that also loaded, compiled and linked the shader pair.
This is what I have currently, I hope this isn't too terse.
perspective(zoom+90, static_cast<float>(xres/yres), 1.0f, 500.0f);
glViewport(0,0, xres, yres);
if (glsl_active == true) //...
From Dan Barlett:
Are you saying:
glActiveTexture(GL_TEXTURE0 + texID);
Should in fact be:
glActiveTexture(GL_TEXTURE0);
From sgsrules:
> are you setting your width and height uniforms?
Not explicitly I think. I'll post code to follow up and you can verify that.
gl_FragColor = texture2D(tex1,...
To be clear, it's still not working correctly.
I guess this is right that it only made the textures red because I neglected to mention that I bound to the FBO before:
glUseProgram(glsl_prog);
And the change to the fragment shader made all the textures red (which was the right color for what you suggested! (1.0, 0.0, 0.0))