Peut être qu'un promoteur d'ecran existe et pourrait le faire mais surtout il y a un problème dans MiniGL donc dans Warp3D : car il ne devrait pas prendre un modeID qui ne marche pas avec Warp3D
Je trouve ça dans MiniGL (vieille sources mais je suppose que la dernière est idem)
GLboolean vid_OpenDisplay(GLcontext context, int width, int height, uint32 id)
{
ULONG ModeID;
int i;
int w = width, h = height;
uint32 pad;
if (!context)
return GL_FALSE;
if (id != MGL_SM_BESTMODE && id != MGL_SM_WINDOWMODE)
{
ModeID = id;
dprintf("Using given mode id = %p\n", ModeID);
}
else
{
dprintf("Trying to determine best mode id\n");
ModeID = IWarp3D->W3D_BestModeIDTags(
W3D_BMI_WIDTH, w,
W3D_BMI_HEIGHT, h,
W3D_BMI_DEPTH, context->Params.newPixelDepth,
TAG_DONE);
dprintf("Mode ID = %p\n", ModeID);
}
---------------------------------------------------
NAME
W3D_BestModeID -- Find a suitable ModeID (V3)
FUNCTION
Returns a screen mode ID that best fits the parameters
supplied in the tag list.
INPUTS
tags - a taglist, consisting of the following possible tag item:
W3D_BMI_DRIVER Must work with this driver
W3D_BMI_WIDTH Must have approximately this width
W3D_BMI_HEIGHT Must have approximately this height
W3D_BMI_DEPTH Must have at least this depth
Ca laisserait donc supposer que W3D_BestModeID peut renvoyer un mode non supporté si le champ W3D_BMI_DRIVER n'est pas fourni comme ici dans MiniGL
Faudra que je vérifie avec le debugger de Wazp3D si Turrican/MiniGL/Warp3D agit bien ainsi...
Auxquel cas faudrait que MiniGL fasse un truc du genre
W3D_Driver **drivers;
W3D_Driver *driver;
drivers = IWarp3D->W3D_GetDrivers();
driver = drivers[0];
while (drivers[0])
{
if(!driver->swdriver)
{driver=drivers[0]; break;} /* si existe driver hard c mieux */
drivers++;
}
ModeID = IWarp3D->W3D_BestModeIDTags(
W3D_BMI_DRIVER, driver,
W3D_BMI_WIDTH, w,
W3D_BMI_HEIGHT, h,
W3D_BMI_DEPTH, context->Params.newPixelDepth,
TAG_DONE);
Alain
Message édité par : thellier / 16-01-2013 10:36