|
They're still 3d values, they're just in terms of the camera instead of in terms of the world. You look like you're using a perspective projection, so increasing z-distance should make them smaller. It's when you're using an orthographic projection that z-distance doesn't change how big stuff looks. Then everything is flat and doesn't change size based on distance. It's not anything specific to the vertex shader itself.
|
# ¿ Sep 9, 2011 09:28 |
|
|
# ¿ Mar 28, 2024 10:12 |
|
If you wrap up the OpenGL entities in their own separate objects, you can have other objects reference the GL objects (by index into a manager or something) without having to handle creating and destroying the GL objects.
|
# ¿ Sep 9, 2011 22:22 |
|
It could be that you're requesting one texture format and it's giving you the closest thing it knows of that matches. I don't know much about D3D, but I'm pretty sure that's possible in OpenGL.
|
# ¿ Dec 15, 2011 08:44 |
|
You have to use VAOs if you aren't using a profile that supports legacy stuff. I haven't tested whether they give a performance benefit, but I would assume so since they're basically removing the old way of doing it.
|
# ¿ Feb 25, 2012 08:53 |
|
I've been using GLEW for my OpenGL project. I originally followed the tutorial on the OpenGL.org wiki, which says you have to create a temporary 2.1 context with wglCreateContext, use that to call wglCreateContextAttribsARB to create a 3.x context, then delete the temporary one. Apparently doing it that way makes gDEBugger crash when you hit a breakpoint/pause. I tried removing the temporary context part and discovered that wglCreateContext was already giving me a 3.3 context. And gDEBugger stopped crashing. Is not jumping through the extra hoop going to bite me in the rear end or is the tutorial just wrong? Also, I got paranoid and decided to give GL3W a try, hopefully avoiding the problem, but Visual Studio gives me this nice message at runtime as soon as it hits a gl call: quote:Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. I'm probably going to just go back to GLEW, so it isn't critically important, but I'm curious what I messed up since I've never seen that message before. I'm assuming I didn't set it up right and/or there's someplace that I should be wrapping up with extern "C" {} that I missed or something?
|
# ¿ Jul 21, 2012 03:06 |
|
I'm not seeing anything that sticks out at me. I think your vertex winding on the background and plane might be backwards? But I don't think that would cause your problem. gDEBugger is a pretty cool free OpenGL debug tool that might be able to help you figure out this, and future, problems, though. There's newer and older versions (pre and post buyout by AMD). The new version's UI is kind of a mess and I'm not doing anything with super new OpenGL features, so I tend to use the old version. They also have slightly different feature sets, but they should both let you step through the drawing process, see the loaded textures and point out any OpenGL errors as they happen.
|
# ¿ Sep 5, 2012 17:03 |
|
OpenGL is traditionally a right handed coordinate system, which fits with CCW winding. Basically all the tools and sample code I've ever seen assume the same. You can change it to a left handed system and/or CW if you really wanted to, but it seems like a lot of hassle for no gain.
|
# ¿ Sep 6, 2012 08:45 |
|
|
# ¿ Mar 28, 2024 10:12 |
|
I ask a lot of questions, so it's nice to be helpful when I can
|
# ¿ Sep 6, 2012 17:56 |