Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Creating more then one vertex or quad? Modern Opengl problem

This topic is 2760 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[color=#333333]Hey all I'm just trying to add another quad to my frustum and when doing so I get this weird little error.

[color=#333333]What happens is the bottom left side of my quad seems to stick to the near center point of the frustum for no apparent reason even when I change any of the vertex array values.

[color=#333333]I even looked through all my functions trying to find out which one could be causing this error.

[color=#333333]The closest I got too was that glfloat vertices array could have been the problem but since playing with every value in the - and non - values and going up and down on the number scale eg, 1 2 3 4 5 6 I come to the conclusion that I'm not doing something right but what ?..

[color=#333333]has anyone else experienced this issue and knows of any ways to bypass this or get rid of the problem alltogether?.

[color=#333333]here is my main.cpp file http://pastebin.com/g9q8uAsd

[color=#333333]thanks in advance

Share this post

Link to post
Share on other sites
You should check and see if sizeof(GUIVertices) returns the value that you think it should return.

Also, your function calls don't make any sense
glDrawArrays(GL_QUADS, 0, 6);
glDrawArrays(GL_QUADS, 5, 6);

because a quad needs 4 vertices, but your count value is 6.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!