It seems like there aren’t many tutorials for SDL 2 out yet as it is going to be released in may but maybe someone could help me.
In SDL 1.3 it seems like an window resize and context resize was simply:
Code:
void CApp::OnEvent(SDL_Event* Event) {
switch(Event->type){
case SDL_WINDOWEVENT_RESIZED:resizeWindow(Event.resize.w,Event.resize.h); break;
}
}
void resizeWindow(int w, int h){
glViewport(0,0,w,h);
}
But in SDL2 it seems like the event does not have the variable resize anymore. How has this changed and what is the new way of obtaining the new window size to resize events.
You can also look at the headers for the definitive details of the new data
structures until a release is made.
Jonny DOn Wed, Apr 17, 2013 at 6:14 AM, NoxMortem wrote:
**
It seems like there aren’t many tutorials for SDL 2 out yet as it is going
to be released in may but maybe someone could help me.
In SDL 1.3 it seems like an window resize and context resize was simply:
Code:
void CApp::OnEvent(SDL_Event* Event) {
switch(Event->type){
case
SDL_WINDOWEVENT_RESIZED:resizeWindow(Event.resize.w,Event.resize.h);
break;
}
}
void resizeWindow(int w, int h){
glViewport(0,0,w,h);
}
But in SDL2 it seems like the event does not have the variable resize
anymore. How has this changed and what is the new way of obtaining the new
window size to resize events.