Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
  • Post
  • Reply
ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

Adbot
ADBOT LOVES YOU

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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?

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



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.

Adbot
ADBOT LOVES YOU

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said



I ask a lot of questions, so it's nice to be helpful when I can

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply