-
Sack TVLikes 0Problem Description
I’m currently using GLWF as my window library, but i want to use SDL2 because it also supports iOS. The Youtube tutorial wasn't that helpfull, I managed to open a window with OpenGL but i ran into some problems:
Edit: i fixed this
In GLFW there is this command glfwGetFramebufferSize(window, &screenWidth, &screenHeight); but i can’t find a similar command in SDL2.
I printed out the framebuffer-size and it was twice the size of my window, so i used it in my SDL2 project and it works, but the spotlight of the camera is not in the middle of the screen and everything is slightly distorted.
Keyboard inputs are only registered with a delay and the mouse isn’t working that good either.This is how it looks like: https://www.youtube.com/watch?v=HFR2ZbWmcAg
-
Sonar Systems adminLikes 0
Are watching my videos to help you with this?
-
Sack TVLikes 0
I only found one video from you on that and i used that.
-
Sonar Systems adminLikes 0
Which one?
-
Sack TVLikes 0
https://www.youtube.com/watch?v=Cc26qCIQNAs&index=6&list=PLRtjMdoYXLf6zUMDJVRZYV-6g6n62vet8&t=0s
-
Sonar Systems adminLikes 0
OK, there isn’t a similar command, the code is slightly different.
-
Sack TVLikes 0
Have you read my edit? I just need the code to get keyboard inputs and mouse positions in SDL that work like in GLFW.
-
Sonar Systems adminLikes 0
Oh ok, this will help with that http://lazyfoo.net/SDL_tutorials/lesson10/index.php
-
Sack TVLikes 0
Solved, thanks this site is very good!
-
Sonar Systems adminLikes 0
You’re welcome.
If you have anymore questions feel free to post them.
Login to reply