Opengl Error Stack Underflow
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up OpenGL Error underflow turns into overflow? up vote 0 down vote favorite 1 I am working on a project which uses OpenGL only (it's supposed to become a game one time to be specific), now after some weeks of development I stumbled across the possibility to catch OpenGL errors with GL.GetError(). Since I dislike that it only says what went wrong but not where, I want to get the error that occurs fixed though. So here is what happens: When launching the app there are few frames (three or four) with StackUnderflow, it switches to StackOverflow and stays that way. I checked my Matrix-Push-Pop consistency and didn't find any unclosed matrices. It might be interesting to know that, from what I see, lighting doesn't work (all faces of the various object have the very same brightness). Is there any other possbile cause? (If you want to see source, there is plenty at: http://galwarcom.svn.sourceforge.net/viewvc/galwarcom/trunk/galwarcom/ ) opengl stack-overflow opentk share|improve this question edited Dec 13 '10 at 21:32 asked Dec 13 '10 at 21:25 Cobra_Fast 8,46852567 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted You need to set the matrix mode before popping since each mode has a separate stack. If you do something like this, it will underflow: glMatrixMode(GL_MODELVIEW) glPushMatrix(); ... stuff with model view ... glMatrixMode(GL_PROJECTION) glPushM
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a http://stackoverflow.com/questions/4433636/opengl-error-underflow-turns-into-overflow community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Android GLException : stack underflow up vote 0 down vote favorite GL stack underflow happens at glPopMatrix(); I can't figure out the problem I have.. But I just guess push & pop Matrix... http://stackoverflow.com/questions/25461967/android-glexception-stack-underflow I know Popping the stack with nothing on it can occur 'stack underflow... but I don't think I got that problem.. please give me an answer! gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glPushMatrix(); gl.glScalef(1f, 1f, 1f); gl.glTranslatef(0f, 0f, 0f); gl.glMatrixMode(GL10.GL_TEXTURE); gl.glLoadIdentity(); gl.glTranslatef(0.0f, bgScroll1,0.0f); background.draw(gl); gl.glPopMatrix(); //stack underflow happens at this line android opengl matrix stackunderflow share|improve this question edited Aug 23 '14 at 12:43 Krupa Patel 2,09231124 asked Aug 23 '14 at 12:33 Kyeongsik Jason Kim 277 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote The GL maintains a seprate matrix stack for each matrix type: GL_MODELVIEW, GL_PROJECTION, adn GL_TEXTURE. The push/pop matrix operations always work on the current matrix mode (as all matrix-related GL commands). So your code pushes on the modelview stack, and tries to pop from the texture matrix stack, which probably is empty. You should set the matrix mode back to GL_MODELVIEW after you modified the texture matrix. share|improve this a
topic ForumsMembersHelp Files Developer Journals Gallery Calendar Downloads Resources Store Classifieds Tracker Links Home For Beginners Articles All Articles Post an Article Technical Game Programming General Programming Graphics Programming and Theory DirectX and http://www.gamedev.net/topic/152859-stack-underflow/ XNA OpenGL and Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile https://www.reddit.com/r/feedthebeast/comments/1mvtwi/gl_error_1283_stack_overflow/ Development Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Music and Sound Visual Arts Business Breaking into the Industry Production and Management Interviews Business and Law Event Coverage Forums All Forums Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL & Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics opengl error Mobile & Console Development Build Systems & Source Control Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Writing For Games Music and Sound Visual Arts Gallery Business Breaking into the Industry Business & Law Production & Management Community GDNet Lounge Coding Horrors Article Writing Comments, Suggestions and Ideas Your Announcements Hobby Project Classifieds Indie Project Showcase Community Developer Journals Gallery Classifieds Jobs Freelancers Hobby Projects GDNet+ Membership Store Marketplace opengl error stack Newsletter » Home » Forums » The Technical Side » OpenGL and Vulkan Chat Watched Content New Content Stack Underflow Started by Ilici, Apr 24 2003 05:22 AM 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 2 replies to this topic #1 Ilici Members -Reputation: 862 Like Likes Like Posted 24 April 2003 - 05:22 AM i discovered that when i test for opengl errors my app exits right away i get a stack underflow error. i checked my glPush and glPops and they are in equal numbers. when i get the error i get the MODELVIEW_MATRIX_DEPTH = 1, (max = 32) PROJ_MATRIX_DEPTH = 1 (max = 2) TEXTURE_MATRIX_DEPTH = 1 ATTRIB_MATRIX_DEPTH = 0 is this good or bad? how do i get rid of the error? i also made a variable which is incremented when a push op occures and decremented with a pop and at the end of the rendering it's 0 so that would mean no error [edited by - Ilici on April 24, 2003 12:44:37 PM] Back to top #2 blizzard999 Members -Reputation: 268 L
»feedthebeastcommentsWant to join? Log in or sign up in seconds.|Englishlimit my search to /r/feedthebeastuse the following search parameters to narrow your results:subreddit:subredditfind submissions in "subreddit"author:usernamefind submissions by "username"site:example.comfind submissions from "example.com"url:textsearch for "text" in urlselftext:textsearch for "text" in self post contentsself:yes (or self:no)include (or exclude) self postsnsfw:yes (or nsfw:no)include (or exclude) results marked as NSFWe.g. subreddit:aww site:imgur.com dogsee the search faq for details.advanced search: by author, subreddit...this post was submitted on 22 Sep 20135 points (79% upvoted)shortlink: remember mereset passwordloginOffer a link to The BeastOffer a post to The Beastfeedthebeastsubscribeunsubscribe31,471 readers311 users here nowNew Flair Options! Day mode / Night mode r/FeedTheBeast r/FeedTheBeastServers r/FeedTheBeastCrashes Welcome to /r/FeedTheBeast! Feed The Beast? Feed the Beast (FTB) is a group of people that makes modpacks, maps and media for minecraft. Feed the Beast originally started out as a skyblock challenge map, using mainly technical mods, and soon became popular and a more streamlined way of installing them was required. The Feed the Beast launcher was born to allow for simple and quick installation of these mods in one-click download modpacks to play the maps, however, today the launcher allows the installation of various modpacks, texture packs and maps from many different providers so there is something to fit everyone’s needs! About This sub