If you're going to glut, I recommend using the freeGLUT implementation. I have a freeGLUT tutorial that might be helpful.
Type: Posts; User: Lazy Foo'
If you're going to glut, I recommend using the freeGLUT implementation. I have a freeGLUT tutorial that might be helpful.
First thing I noticed is that you're using immediate mode (glBegin/glEnd) which is the slowest way to send data to the GPU. If you're still supporting OpenGL 1.1, you can use vertex arrays to send...
I second this.
If you find this tutorial difficult, I designed my OpenGL tutorial as a stepping stone to the arc synthesis tutorial. It uses fixed function pipeline to make things easier in the...
Actually, the original prototype for the tutorial used OpenGL 3.0 from the start, but in testing group only about 20% of the people were getting anything. Using the old fixed function pipeline to...
I also provide a OpenGL 3.0+ texture mapping tutorial if you have a severe allergy to legacy code.
What operating system are you using?
In case it helps I have a freeGLUT tutorial that helps you set up for Linux or OSX.
I find that the convention seems to be that with 2D applications -Y is up and in 3D applications +Y is up. Again, you can just make up whatever you want, just stick to a convention.
To do OpenGL texture mapping all you have to do is send the pixels to a texture object and then map the texture coordinates to your polygons. OpenGL doesn't have any file loading capabilities, so...
Looks like you forgot to put glew32 in your linker.
If you're using visual studio, you need to add it under additional dependencies.
I'm guessing that it that your GPU doesn't like byte vectors. I know some GPU technically support double precision, but it will be slow because it will convert them to floats on the fly.
Any...
If the only thing you're getting is a blank window, you want to make sure your rendering code is as minimal as possible so you can easily tell what's wrong. It's always best to build in testable...
I managed to get rendering of textured quads working, but I ran it a bit of snag. With the old fixed function pipeline is could just call glBindTexture( GL_TEXTURE_2D, NULL ) and I could render...
That worked great.
Also I noticed you're using SDL. Is SDL 1.3 stable enough to use?
Since gl_TexCoord is deprecated and every example I can find uses it, I'm having trouble texturing my quad.
With my C++ code, I am trying to load a texture, bind the texture, send the vertex data,...
Yeah, turns out the attribute had to be enabled.
I've been trying to upgrade my old 2D OpenGL codebase so it's OpenGL 2.1/3+/ES compatible. I've managed to get the shaders and matrices to work and I'm trying to draw a quad.
Here's my C++ code:
...
What I'm trying to do is redo my old OpenGL code and change it so it's OpenGL 2.1/3.+/ES compatible.
I managed to get the shaders and matrices going, but now I have to figure how to send vertex...
Well that's something simple I wish I didn't have to learn the hard way.
Things just got stranger. This is my log from glslDevil:
W! Program Start
| wglCreateContext(86011084)
| wglMakeCurrent(86011084, 00010000)
| wglGetExtensionsStringARB(86011084)
| ...
I'm getting some very bizarre behavior here. I'm loading and creating a shader program (that uses the Projection matrix in the vertex shader and sets the fragment's color to magenta in the fragment...