Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
66 user(s) are online (45 user(s) are browsing Forums)

Members: 1
Guests: 65

Helloworld, more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: SDL2

Subject: Re: SDL2
by kas1e on 2019/2/25 18:36:04

@Capehill
Quote:

Another thing: if you have started the program in fullscreen mode, how come window has the resize gadget on the bottom right corner? How exactly the window was created?


You mean that middle gadget ? Dunno why it there. It just when i run in fullscreen and alt+enter, its already here. Or , if i run in window mode it also already there. And yeah, resizing of window, and then pressing on that gadget also produce overflow of borders.

The code for window create are:

if( SDL_InitSDL_INIT_VIDEO SDL_INIT_TIMER SDL_INIT_AUDIO) < ) {
    
fprintfstderr"Video or Audio initialization failed: %sn",

    
SDL_GetError( ) );
    
sys_exit(1);
  }

  
sdl_on 

  
SDL_GL_SetAttributeSDL_GL_RED_SIZE);
  
SDL_GL_SetAttributeSDL_GL_GREEN_SIZE);
  
SDL_GL_SetAttributeSDL_GL_BLUE_SIZE);
  
SDL_GL_SetAttributeSDL_GL_DEPTH_SIZE16 );
  
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER1);

  if(
fullscreen == 1) { 
        
glWindow SDL_CreateWindow("Foobillard++"SDL_WINDOWPOS_UNDEFINEDSDL_WINDOWPOS_UNDEFINEDwidthheightSDL_WINDOW_OPENGL SDL_WINDOW_FULLSCREEN);
        
SDL_SetWindowSize(glWindowwidthheight); 
        
SDL_SetWindowFullscreen(glWindowSDL_WINDOW_FULLSCREEN); 

  } else if (
fullscreen == 0) { 
        
glWindow SDL_CreateWindow("Foobillard++"SDL_WINDOWPOS_CENTEREDSDL_WINDOWPOS_CENTEREDwidthheightSDL_WINDOW_OPENGL SDL_WINDOW_RESIZABLE);
  };
  
  
glContext SDL_GL_CreateContext(glWindow);
  
SDL_GL_MakeCurrent(glWindowglContext); 
  
  
SDL_SetWindowTitle(glWindow"Foobillard++");

  
glPolygonMode(GL_FRONT,GL_FILL);  // fill the front of the polygons
  
glPolygonMode(GL_BACK,GL_LINE);   // only lines for back (better seeing on zooming)
  
glCullFace(GL_BACK);              // Standards for rendering only front of textures
  
glEnable(GL_CULL_FACE);





Or you mean that resize gadget at bottom ? That it just not fullscreen, its i switch to window (which is size of my workbnehc screen), and then just tick via mouse on the place where resize gadget should be, and it just draws once i tick it.
Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project