Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
148 user(s) are online (121 user(s) are browsing Forums)

Members: 0
Guests: 148

more...

Support us!

Recent OS4 Files
OS4Depot.net

Report message:*
 

Re: SDL1 open issues

Subject: Re: SDL1 open issues
by kas1e on 2018/3/15 14:36:58

@Capehill
Quote:

Which branch?


Do all tests now on that commit: https://github.com/capehill/os4sdl/tre ... 6c610231922dc812980134ac6

But i probably found what issue is: that what i have in my gl4es addon, in the SDL_os4gl.c:

int os4video_GL_Init(_THIS)
{

     
struct SDL_PrivateVideoData *hidden _this->hidden;
    
      
dprintf("Initializing GL4ES->OGLES2..n");
        
     
hidden->IGL=IOGLES2->aglCreateContextTags(0,
                
OGLES2_CCT_WINDOW,(ULONG)hidden->win,
                
OGLES2_CCT_DEPTH,16,
                
OGLES2_CCT_STENCIL,8,
                
OGLES2_CCT_VSYNC,0,
                
OGLES2_CCT_SINGLE_GET_ERROR_MODE,1,
            
TAG_DONE);


    if (
hidden->IGL)
    {
        
_this->gl_config.driver_loaded 1;
    
        
IOGLES2->aglMakeCurrent(hidden->IGL);        
        
        
hidden->OpenGL TRUE;

        return 
0;
    }
    else
    {
        
_this->gl_config.driver_loaded 0;
        
SDL_SetError("Failed to create OGLES2 context");
    }

    return -
1;

}


See there dprintf("Initializing GL4ES->OGLES2..\n");

Once i comment it out, all works as before. That all can only mean something going bad with memory there, and probably not related to dprintf itself, but to the way how we add gl4es there :(

Maybe i just fuck SDL_PrivateVideoData in wrong way.

Maybe you can briefly look at it, that what i do in SDL itself to make it work:
http://kas1e.mikendezign.com/aos4/gl4es/code/

Just 4 files changed. SDL_os4_wrapper.c completely empty, SDL_os4gl.c new one , SDL_os4video.c and SDL_os4video.h have 2 changes (check for #ifdef OLDMINIGL). Probably, problem can be because of changes in SDL_PrivateVideoData structure, dunno.

All the "wrapping" code, and opening/closing of ogles2 library we do from gl4es itself. There is just 1 file for it:

https://github.com/ptitSeb/gl4es/blob/master/src/agl/amigaos.c

Maybe such mixing give some undefined behaviours in end..


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project