Handmade Hero»Forums»Code
306 posts / 1 project
None
OpenGLRenderCommands
I believe there is a bug in OpenGLRenderCommands in the latest code. If I'm not mistaken, the glViewport call at the beginning of the method is using the wrong dimensions. The line,

1
glViewport(0, 0, Commands->Width, Commands->Height);


should be

1
glViewport(0, 0, WindowWidth, WindowHeight);


Thanks.
Mārtiņš Možeiko
2559 posts / 2 projects
OpenGLRenderCommands
Yes, it should be WindowWidth/Height.
We found this here: https://hero.handmadedev.org/foru...tion-to-960x540-wrong-output#5752
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
OpenGLRenderCommands
We need a list of bugs so we can do a bug-fixing stream sometime where we go through them all... there's five or six little ones on here that we should get to at some point but they don't want to be an entire stream themselves.

- Casey
Jim R. Didriksen
63 posts
OpenGLRenderCommands
Edited by Jim R. Didriksen on
I was thinking about something similar a few days ago. I'm one of those on NVIDIA and have noticed other errors and making a list of issues on different hardware might be a real nice set of data to make not only to debug this game while in development.

ex.1 without the double buffer in the current code the framerate isn't limited.(and fails down to a 3-5fps)

ex. 2. way back when you started with OpenGL if I compiled the code without the double buffer flag the screen would just be black.(Googling this says it is a Windows 10 issue, but I believe it got fixed with the glFlush() you just added.)

positive:
ex. 3. the frame timer you wrote a long time ago and used with the software renderer, worked perfectly to limit the framerate. I believe it is #if 0'ed out in the official code still.

specs: ASUS G74sx +={SSD,16gb ram};
operating_system Windows = 10;

edit: I guess we could just use the Git repository for these bugs/anomalies?
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
OpenGLRenderCommands
Yeah is it possible to have an "issue list" on GitHub? Because that might be useful... I never use GitHub so I haven't looked but one would assume that it would support this.

- Casey
511 posts
OpenGLRenderCommands
cmuratori
Yeah is it possible to have an "issue list" on GitHub? Because that might be useful... I never use GitHub so I haven't looked but one would assume that it would support this.

- Casey


there is, go to the "settings" tab of the repo and under the features header you will find the checkbox to activate it for the repo.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
OpenGLRenderCommands
Looks like it's already enabled for HandmadeHero/cpp.

- Casey
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
OpenGLRenderCommands
Jim0_o
ex.1 without the double buffer in the current code the framerate isn't limited.(and fails down to a 3-5fps)

ex. 2. way back when you started with OpenGL if I compiled the code without the double buffer flag the screen would just be black.(Googling this says it is a Windows 10 issue, but I believe it got fixed with the glFlush() you just added.)

Without the double buffer flag I don't the code should work at all. I think it is pure random coincidence that it happens to work, and so we're only using it that way on the stream because for some reason it allows OBS to work. You should never try to run it that way in any other circumstance.

- Casey
Jim R. Didriksen
63 posts
OpenGLRenderCommands
Ah okay, I saw that being said other places as well but I found it odd that it was reacting so differently from on stream. Thank you.