Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Miscellaneous OpenGL questions (mostly dealing with shaders)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
24 replies to this topic

#21 nkarasch   Members   -  Reputation: 171

Like
0Likes
Like

Posted 30 December 2012 - 05:50 PM

Also, I could see detail in the rabbit before, now he looks completely flat.

 

Once again, I want to thank you for doing this. You probably cringe at some of the questions I ask because I am completely on the wrong track. I'm doing my best, I really enjoy this stuff. Thanks for putting up with me.



Sponsor:

#22 Brother Bob   Moderators   -  Reputation: 8566

Like
1Likes
Like

Posted 30 December 2012 - 06:17 PM

There are a lot of old-style and deprecated functions still. But ignoring that, a quick search suggests that the built-in normal attribute is on location 2, not 1.

Edited by Brother Bob, 30 December 2012 - 06:17 PM.


#23 Brother Bob   Moderators   -  Reputation: 8566

Like
1Likes
Like

Posted 30 December 2012 - 06:19 PM

Also, the enable and disable status of an attribute binding is a part of the vertex array object. When you bind the buffers and set the pointers, enable them within the vertex array object also and it will become a part of the binding. No need to enable and disable them in the render function.



#24 nkarasch   Members   -  Reputation: 171

Like
0Likes
Like

Posted 30 December 2012 - 06:39 PM

There are a lot of old-style and deprecated functions still. But ignoring that, a quick search suggests that the built-in normal attribute is on location 2, not 1.

I would have given you +10 rep if I could. That fixed it. I have actually learned a lot in the last few days. I liked the jab about the "quick search." Trust me, I searched...but it was aimlessly.

 

And yes, I don't expect you read my entire post but I pointed out that I wanted to remove the old functions one at a time. Gamedev's Beginning OpenGL Game Development is a great book, and I have both versions. My problem with it is that is uses a ton of the old stuff as well. Hopefully the OpenGL 4.0 Shading Language Cookbook isn't way over my head, I may have to grow into it.

 

I'll let this thread die, here is a picture if anyone ever stumbles on this and is curious

k0ElG.jpg



#25 Brother Bob   Moderators   -  Reputation: 8566

Like
0Likes
Like

Posted 31 December 2012 - 01:08 AM

I liked the jab about the "quick search." Trust me, I searched...but it was aimlessly.

 

That wasn't really what I meant to say, sorry. I knew there was something fishy with the indexing of the built-in attributes from many years ago, and "quick search" was meant to mean "not an extensive search", because I didn't spend too much time to verify the information and it was surprisingly difficult to find some definitive answer at all even if I knew exactly what I was looking for.

 

It was not meant as a hint that it's easily accessible and all over the place for you to read.

 

Although, you should have gotten the correct results from glGetAttribLocation and not just assumed the correct index :)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS