24/12/20 - Drawing to the screen! #6
Locked
jakelacey2012
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following on my previous post where I created a window, I wanted to draw something to the screen next. With us just using OpenGL with GLFW, there was little hand holding and I needed to do a lot of "heavy lifting", but we got there.
By "heavy lifting" I mean instead of declaring that I want a rectangle or triangle on my screen in these positions I had to describe each step and point more explicitly. This highlights the low level in which I'm operating, you can view the code here https://github.com/jakelacey2012/HelloWorld/pull/5/files.
Just because this is low level though doesn't mean its not a viable option to go in, you could easily use this for a game link pong. I would however wrap these bits in more declarative code. In the next iteration we'll be looking at how to get the players input, what keys they are pressing and where is there mouse will be our questions, which you can find here #8.
Beta Was this translation helpful? Give feedback.
All reactions