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 money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
It's been like three years since I last did any 3d programming and back then I didn't know what the gently caress I was doing either. I started up using opengl again a few days ago and everything is totally different. Is this basically the gist of how to draw an object now?

-bind the array, index and texture buffers (glBindBuffer, glBindTexture)
-use appropriate shader program (glUseProgram)
-send crap to the shader's uniform variables, like a vector for translation, the texture units for the sampler(s) to use. (glProgramUniform****)
-glDrawWhatever(), doing all the matrix operations on the shader

I have this working, but is it efficient? Am I doing anything retarded here? It's so hard to find tutorials that aren't full of deprecated stuff.

Adbot
ADBOT LOVES YOU

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I need to implement shadow mapping for the last part of a class project, and I totally understand it except for one thing. How do you create the frustum / projection+view matrices for the light source so that it covers everything in the camera's frustum? Everything I read seems to just skip over this.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I thought I had it figured out (just making it a big fixed size that would cover the frustum from any angle), but as I started implementing it I realized I had no idea what to do in the situation of a point light inside the camera frustum. Screw it, I'm just going to make everything into spotlights with predefined frustums instead.

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