Go ahead and post a minimal example. I haven’t booted BeOS in a while,
so I’m not sure if they’re supposed to be implemented or not. I think
they are, but I’d have to check.
ok, here it is:
if( SDL_Init( SDL_INIT_VIDEO|SDL_INIT_TIMER ) < 0 )
…
info = SDL_GetVideoInfo();
…
bpp = info->vfmt->BitsPerPixel;
if (!PWD) PWD=bpp;
switch (bpp) {… }
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, rgb_size[0] );
…
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER,1 );
if( (window=SDL_SetVideoMode( SWX, SWY, bpp,
SDL_OPENGL|SDL_RESIZABLE )) == 0 )
{…}
SDL_EnableUNICODE(1);
SDL_EnableKeyRepeat(0,0);
SDL_ShowCursor(SDL_DISABLE);
…
glViewport(0,0,SWX,SWY);
init(); /* gl calls … */
while(1)
{
TDFSB_FUNC_IDLE();
while( SDL_PollEvent( &event ) )
{ switch( event.type )
{ case SDL_QUIT:
ende (0);
break;
case SDL_VIDEORESIZE:
if( (window=SDL_SetVideoMode( SWX, SWY, bpp,
SDL_OPENGL|SDL_RESIZABLE )) == 0 )
{ printf(“SDL ERROR Video mode set
failed: %s\n”, SDL_GetError() );
ende(1);
}
reshape(event.resize.w,event.resize.h);
break;
case SDL_MOUSEMOTION:
if(TDFSB_FUNC_MOTION)
TDFSB_FUNC_MOTION(event.motion.x,event.motion.y);
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
printf(“ME!\n”);
if(TDFSB_FUNC_MOUSE)
TDFSB_FUNC_MOUSE(event.button.button, event.button.state, event.button.x,
event.button.y);
break;
case SDL_KEYDOWN:
if (speckey(event.key.keysym.sym))
TDFSB_FUNC_KEY ((unsigned
char)(event.key.keysym.unicode & 0x7F));
break;
case SDL_KEYUP:
if (specupkey(event.key.keysym.sym))
TDFSB_FUNC_UPKEY((unsigned
char)(event.key.keysym.unicode & 0x7F));
break;
default:
break;
}
}
}