mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[renderer] Use designated inits on more structs
Finally, the model_funcs and render_funcs struts use designated initializers. Not only are they good for ensuring correct initialization, they're great for the programmer finding the right initializer.
This commit is contained in:
parent
5e154bf1b7
commit
9e440ff330
4 changed files with 276 additions and 268 deletions
|
@ -153,30 +153,31 @@ gl_vid_render_create_context (void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static vid_model_funcs_t model_funcs = {
|
static vid_model_funcs_t model_funcs = {
|
||||||
sizeof (gltex_t),
|
.texture_render_size = sizeof (gltex_t),
|
||||||
gl_Mod_LoadLighting,
|
|
||||||
gl_Mod_SubdivideSurface,
|
|
||||||
gl_Mod_ProcessTexture,
|
|
||||||
|
|
||||||
Mod_LoadIQM,
|
.Mod_LoadLighting = gl_Mod_LoadLighting,
|
||||||
Mod_LoadAliasModel,
|
.Mod_SubdivideSurface = gl_Mod_SubdivideSurface,
|
||||||
Mod_LoadSpriteModel,
|
.Mod_ProcessTexture = gl_Mod_ProcessTexture,
|
||||||
|
|
||||||
gl_Mod_MakeAliasModelDisplayLists,
|
.Mod_LoadIQM = Mod_LoadIQM,
|
||||||
gl_Mod_LoadAllSkins,
|
.Mod_LoadAliasModel = Mod_LoadAliasModel,
|
||||||
gl_Mod_FinalizeAliasModel,
|
.Mod_LoadSpriteModel = Mod_LoadSpriteModel,
|
||||||
gl_Mod_LoadExternalSkins,
|
|
||||||
gl_Mod_IQMFinish,
|
|
||||||
1,
|
|
||||||
gl_Mod_SpriteLoadFrames,
|
|
||||||
|
|
||||||
Skin_Free,
|
.Mod_MakeAliasModelDisplayLists = gl_Mod_MakeAliasModelDisplayLists,
|
||||||
Skin_SetColormap,
|
.Mod_LoadAllSkins = gl_Mod_LoadAllSkins,
|
||||||
Skin_SetSkin,
|
.Mod_FinalizeAliasModel = gl_Mod_FinalizeAliasModel,
|
||||||
gl_Skin_SetupSkin,
|
.Mod_LoadExternalSkins = gl_Mod_LoadExternalSkins,
|
||||||
Skin_SetTranslation,
|
.Mod_IQMFinish = gl_Mod_IQMFinish,
|
||||||
gl_Skin_ProcessTranslation,
|
.alias_cache = 1,
|
||||||
gl_Skin_InitTranslations,
|
.Mod_SpriteLoadFrames = gl_Mod_SpriteLoadFrames,
|
||||||
|
|
||||||
|
.Skin_Free = Skin_Free,
|
||||||
|
.Skin_SetColormap = Skin_SetColormap,
|
||||||
|
.Skin_SetSkin = Skin_SetSkin,
|
||||||
|
.Skin_SetupSkin = gl_Skin_SetupSkin,
|
||||||
|
.Skin_SetTranslation = Skin_SetTranslation,
|
||||||
|
.Skin_ProcessTranslation = gl_Skin_ProcessTranslation,
|
||||||
|
.Skin_InitTranslations = gl_Skin_InitTranslations,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -498,56 +499,57 @@ gl_capture_screen (capfunc_t callback, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
vid_render_funcs_t gl_vid_render_funcs = {
|
vid_render_funcs_t gl_vid_render_funcs = {
|
||||||
gl_vid_render_init,
|
.init = gl_vid_render_init,
|
||||||
gl_Draw_CharBuffer,
|
|
||||||
gl_Draw_Character,
|
|
||||||
gl_Draw_String,
|
|
||||||
gl_Draw_nString,
|
|
||||||
gl_Draw_AltString,
|
|
||||||
gl_Draw_ConsoleBackground,
|
|
||||||
gl_Draw_Crosshair,
|
|
||||||
gl_Draw_CrosshairAt,
|
|
||||||
gl_Draw_TileClear,
|
|
||||||
gl_Draw_Fill,
|
|
||||||
gl_Draw_Line,
|
|
||||||
gl_Draw_TextBox,
|
|
||||||
gl_Draw_FadeScreen,
|
|
||||||
gl_Draw_BlendScreen,
|
|
||||||
gl_Draw_CachePic,
|
|
||||||
gl_Draw_UncachePic,
|
|
||||||
gl_Draw_MakePic,
|
|
||||||
gl_Draw_DestroyPic,
|
|
||||||
gl_Draw_PicFromWad,
|
|
||||||
gl_Draw_Pic,
|
|
||||||
gl_Draw_Picf,
|
|
||||||
gl_Draw_SubPic,
|
|
||||||
gl_Draw_AddFont,
|
|
||||||
gl_Draw_FontString,
|
|
||||||
|
|
||||||
gl_ParticleSystem,
|
.Draw_CharBuffer = gl_Draw_CharBuffer,
|
||||||
gl_R_Init,
|
.Draw_Character = gl_Draw_Character,
|
||||||
gl_R_ClearState,
|
.Draw_String = gl_Draw_String,
|
||||||
gl_R_LoadSkys,
|
.Draw_nString = gl_Draw_nString,
|
||||||
gl_R_NewScene,
|
.Draw_AltString = gl_Draw_AltString,
|
||||||
gl_R_LineGraph,
|
.Draw_ConsoleBackground = gl_Draw_ConsoleBackground,
|
||||||
gl_begin_frame,
|
.Draw_Crosshair = gl_Draw_Crosshair,
|
||||||
gl_render_view,
|
.Draw_CrosshairAt = gl_Draw_CrosshairAt,
|
||||||
gl_R_DrawParticles,
|
.Draw_TileClear = gl_Draw_TileClear,
|
||||||
gl_draw_transparent,
|
.Draw_Fill = gl_Draw_Fill,
|
||||||
gl_post_process,
|
.Draw_Line = gl_Draw_Line,
|
||||||
gl_set_2d,
|
.Draw_TextBox = gl_Draw_TextBox,
|
||||||
gl_end_frame,
|
.Draw_FadeScreen = gl_Draw_FadeScreen,
|
||||||
|
.Draw_BlendScreen = gl_Draw_BlendScreen,
|
||||||
|
.Draw_CachePic = gl_Draw_CachePic,
|
||||||
|
.Draw_UncachePic = gl_Draw_UncachePic,
|
||||||
|
.Draw_MakePic = gl_Draw_MakePic,
|
||||||
|
.Draw_DestroyPic = gl_Draw_DestroyPic,
|
||||||
|
.Draw_PicFromWad = gl_Draw_PicFromWad,
|
||||||
|
.Draw_Pic = gl_Draw_Pic,
|
||||||
|
.Draw_Picf = gl_Draw_Picf,
|
||||||
|
.Draw_SubPic = gl_Draw_SubPic,
|
||||||
|
.Draw_AddFont = gl_Draw_AddFont,
|
||||||
|
.Draw_FontString = gl_Draw_FontString,
|
||||||
|
|
||||||
gl_create_cube_map,
|
.ParticleSystem = gl_ParticleSystem,
|
||||||
gl_create_frame_buffer,
|
.R_Init = gl_R_Init,
|
||||||
gl_destroy_frame_buffer,
|
.R_ClearState = gl_R_ClearState,
|
||||||
gl_bind_framebuffer,
|
.R_LoadSkys = gl_R_LoadSkys,
|
||||||
gl_set_viewport,
|
.R_NewScene = gl_R_NewScene,
|
||||||
gl_set_fov,
|
.R_LineGraph = gl_R_LineGraph,
|
||||||
|
.begin_frame = gl_begin_frame,
|
||||||
|
.render_view = gl_render_view,
|
||||||
|
.draw_particles = gl_R_DrawParticles,
|
||||||
|
.draw_transparent = gl_draw_transparent,
|
||||||
|
.post_process = gl_post_process,
|
||||||
|
.set_2d = gl_set_2d,
|
||||||
|
.end_frame = gl_end_frame,
|
||||||
|
|
||||||
gl_capture_screen,
|
.create_cube_map = gl_create_cube_map,
|
||||||
|
.create_frame_buffer = gl_create_frame_buffer,
|
||||||
|
.destroy_frame_buffer = gl_destroy_frame_buffer,
|
||||||
|
.bind_framebuffer = gl_bind_framebuffer,
|
||||||
|
.set_viewport = gl_set_viewport,
|
||||||
|
.set_fov = gl_set_fov,
|
||||||
|
|
||||||
&model_funcs
|
.capture_screen = gl_capture_screen,
|
||||||
|
|
||||||
|
.model_funcs = &model_funcs
|
||||||
};
|
};
|
||||||
|
|
||||||
static general_funcs_t plugin_info_general_funcs = {
|
static general_funcs_t plugin_info_general_funcs = {
|
||||||
|
|
|
@ -64,30 +64,31 @@ glsl_vid_render_create_context (void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static vid_model_funcs_t model_funcs = {
|
static vid_model_funcs_t model_funcs = {
|
||||||
sizeof (glsltex_t),
|
.texture_render_size = sizeof (glsltex_t),
|
||||||
glsl_Mod_LoadLighting,
|
|
||||||
0,//Mod_SubdivideSurface,
|
|
||||||
glsl_Mod_ProcessTexture,
|
|
||||||
|
|
||||||
Mod_LoadIQM,
|
.Mod_LoadLighting = glsl_Mod_LoadLighting,
|
||||||
Mod_LoadAliasModel,
|
//.Mod_SubdivideSurface = 0,
|
||||||
Mod_LoadSpriteModel,
|
.Mod_ProcessTexture = glsl_Mod_ProcessTexture,
|
||||||
|
|
||||||
glsl_Mod_MakeAliasModelDisplayLists,
|
.Mod_LoadIQM = Mod_LoadIQM,
|
||||||
glsl_Mod_LoadAllSkins,
|
.Mod_LoadAliasModel = Mod_LoadAliasModel,
|
||||||
glsl_Mod_FinalizeAliasModel,
|
.Mod_LoadSpriteModel = Mod_LoadSpriteModel,
|
||||||
glsl_Mod_LoadExternalSkins,
|
|
||||||
glsl_Mod_IQMFinish,
|
|
||||||
0,
|
|
||||||
glsl_Mod_SpriteLoadFrames,
|
|
||||||
|
|
||||||
Skin_Free,
|
.Mod_MakeAliasModelDisplayLists = glsl_Mod_MakeAliasModelDisplayLists,
|
||||||
Skin_SetColormap,
|
.Mod_LoadAllSkins = glsl_Mod_LoadAllSkins,
|
||||||
Skin_SetSkin,
|
.Mod_FinalizeAliasModel = glsl_Mod_FinalizeAliasModel,
|
||||||
glsl_Skin_SetupSkin,
|
.Mod_LoadExternalSkins = glsl_Mod_LoadExternalSkins,
|
||||||
Skin_SetTranslation,
|
.Mod_IQMFinish = glsl_Mod_IQMFinish,
|
||||||
glsl_Skin_ProcessTranslation,
|
.alias_cache = 0,
|
||||||
glsl_Skin_InitTranslations,
|
.Mod_SpriteLoadFrames = glsl_Mod_SpriteLoadFrames,
|
||||||
|
|
||||||
|
.Skin_Free = Skin_Free,
|
||||||
|
.Skin_SetColormap = Skin_SetColormap,
|
||||||
|
.Skin_SetSkin = Skin_SetSkin,
|
||||||
|
.Skin_SetupSkin = glsl_Skin_SetupSkin,
|
||||||
|
.Skin_SetTranslation = Skin_SetTranslation,
|
||||||
|
.Skin_ProcessTranslation = glsl_Skin_ProcessTranslation,
|
||||||
|
.Skin_InitTranslations = glsl_Skin_InitTranslations,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -442,56 +443,57 @@ glsl_capture_screen (capfunc_t callback, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
vid_render_funcs_t glsl_vid_render_funcs = {
|
vid_render_funcs_t glsl_vid_render_funcs = {
|
||||||
glsl_vid_render_init,
|
.init = glsl_vid_render_init,
|
||||||
glsl_Draw_CharBuffer,
|
|
||||||
glsl_Draw_Character,
|
|
||||||
glsl_Draw_String,
|
|
||||||
glsl_Draw_nString,
|
|
||||||
glsl_Draw_AltString,
|
|
||||||
glsl_Draw_ConsoleBackground,
|
|
||||||
glsl_Draw_Crosshair,
|
|
||||||
glsl_Draw_CrosshairAt,
|
|
||||||
glsl_Draw_TileClear,
|
|
||||||
glsl_Draw_Fill,
|
|
||||||
glsl_Draw_Line,
|
|
||||||
glsl_Draw_TextBox,
|
|
||||||
glsl_Draw_FadeScreen,
|
|
||||||
glsl_Draw_BlendScreen,
|
|
||||||
glsl_Draw_CachePic,
|
|
||||||
glsl_Draw_UncachePic,
|
|
||||||
glsl_Draw_MakePic,
|
|
||||||
glsl_Draw_DestroyPic,
|
|
||||||
glsl_Draw_PicFromWad,
|
|
||||||
glsl_Draw_Pic,
|
|
||||||
glsl_Draw_Picf,
|
|
||||||
glsl_Draw_SubPic,
|
|
||||||
glsl_Draw_AddFont,
|
|
||||||
glsl_Draw_FontString,
|
|
||||||
|
|
||||||
glsl_ParticleSystem,
|
.Draw_CharBuffer = glsl_Draw_CharBuffer,
|
||||||
glsl_R_Init,
|
.Draw_Character = glsl_Draw_Character,
|
||||||
glsl_R_ClearState,
|
.Draw_String = glsl_Draw_String,
|
||||||
glsl_R_LoadSkys,
|
.Draw_nString = glsl_Draw_nString,
|
||||||
glsl_R_NewScene,
|
.Draw_AltString = glsl_Draw_AltString,
|
||||||
glsl_R_LineGraph,
|
.Draw_ConsoleBackground = glsl_Draw_ConsoleBackground,
|
||||||
glsl_begin_frame,
|
.Draw_Crosshair = glsl_Draw_Crosshair,
|
||||||
glsl_render_view,
|
.Draw_CrosshairAt = glsl_Draw_CrosshairAt,
|
||||||
glsl_R_DrawParticles,
|
.Draw_TileClear = glsl_Draw_TileClear,
|
||||||
glsl_draw_transparent,
|
.Draw_Fill = glsl_Draw_Fill,
|
||||||
glsl_post_process,
|
.Draw_Line = glsl_Draw_Line,
|
||||||
glsl_set_2d,
|
.Draw_TextBox = glsl_Draw_TextBox,
|
||||||
glsl_end_frame,
|
.Draw_FadeScreen = glsl_Draw_FadeScreen,
|
||||||
|
.Draw_BlendScreen = glsl_Draw_BlendScreen,
|
||||||
|
.Draw_CachePic = glsl_Draw_CachePic,
|
||||||
|
.Draw_UncachePic = glsl_Draw_UncachePic,
|
||||||
|
.Draw_MakePic = glsl_Draw_MakePic,
|
||||||
|
.Draw_DestroyPic = glsl_Draw_DestroyPic,
|
||||||
|
.Draw_PicFromWad = glsl_Draw_PicFromWad,
|
||||||
|
.Draw_Pic = glsl_Draw_Pic,
|
||||||
|
.Draw_Picf = glsl_Draw_Picf,
|
||||||
|
.Draw_SubPic = glsl_Draw_SubPic,
|
||||||
|
.Draw_AddFont = glsl_Draw_AddFont,
|
||||||
|
.Draw_FontString = glsl_Draw_FontString,
|
||||||
|
|
||||||
glsl_create_cube_map,
|
.ParticleSystem = glsl_ParticleSystem,
|
||||||
glsl_create_frame_buffer,
|
.R_Init = glsl_R_Init,
|
||||||
glsl_destroy_frame_buffer,
|
.R_ClearState = glsl_R_ClearState,
|
||||||
glsl_bind_framebuffer,
|
.R_LoadSkys = glsl_R_LoadSkys,
|
||||||
glsl_set_viewport,
|
.R_NewScene = glsl_R_NewScene,
|
||||||
glsl_set_fov,
|
.R_LineGraph = glsl_R_LineGraph,
|
||||||
|
.begin_frame = glsl_begin_frame,
|
||||||
|
.render_view = glsl_render_view,
|
||||||
|
.draw_particles = glsl_R_DrawParticles,
|
||||||
|
.draw_transparent = glsl_draw_transparent,
|
||||||
|
.post_process = glsl_post_process,
|
||||||
|
.set_2d = glsl_set_2d,
|
||||||
|
.end_frame = glsl_end_frame,
|
||||||
|
|
||||||
glsl_capture_screen,
|
.create_cube_map = glsl_create_cube_map,
|
||||||
|
.create_frame_buffer = glsl_create_frame_buffer,
|
||||||
|
.destroy_frame_buffer = glsl_destroy_frame_buffer,
|
||||||
|
.bind_framebuffer = glsl_bind_framebuffer,
|
||||||
|
.set_viewport = glsl_set_viewport,
|
||||||
|
.set_fov = glsl_set_fov,
|
||||||
|
|
||||||
&model_funcs
|
.capture_screen = glsl_capture_screen,
|
||||||
|
|
||||||
|
.model_funcs = &model_funcs
|
||||||
};
|
};
|
||||||
|
|
||||||
static general_funcs_t plugin_info_general_funcs = {
|
static general_funcs_t plugin_info_general_funcs = {
|
||||||
|
|
|
@ -73,30 +73,31 @@ sw_vid_render_set_colormap (void *data, const byte *colormap)
|
||||||
}
|
}
|
||||||
|
|
||||||
static vid_model_funcs_t model_funcs = {
|
static vid_model_funcs_t model_funcs = {
|
||||||
0,
|
.texture_render_size = 0,
|
||||||
sw_Mod_LoadLighting,
|
|
||||||
0,//Mod_SubdivideSurface,
|
|
||||||
0,//Mod_ProcessTexture,
|
|
||||||
|
|
||||||
Mod_LoadIQM,
|
.Mod_LoadLighting = sw_Mod_LoadLighting,
|
||||||
Mod_LoadAliasModel,
|
.Mod_SubdivideSurface = 0,
|
||||||
Mod_LoadSpriteModel,
|
.Mod_ProcessTexture = 0,
|
||||||
|
|
||||||
sw_Mod_MakeAliasModelDisplayLists,
|
.Mod_LoadIQM = Mod_LoadIQM,
|
||||||
sw_Mod_LoadAllSkins,
|
.Mod_LoadAliasModel = Mod_LoadAliasModel,
|
||||||
0,
|
.Mod_LoadSpriteModel = Mod_LoadSpriteModel,
|
||||||
0,
|
|
||||||
sw_Mod_IQMFinish,
|
|
||||||
1,
|
|
||||||
sw_Mod_SpriteLoadFrames,
|
|
||||||
|
|
||||||
Skin_Free,
|
.Mod_MakeAliasModelDisplayLists = sw_Mod_MakeAliasModelDisplayLists,
|
||||||
Skin_SetColormap,
|
.Mod_LoadAllSkins = sw_Mod_LoadAllSkins,
|
||||||
Skin_SetSkin,
|
.Mod_FinalizeAliasModel = 0,
|
||||||
sw_Skin_SetupSkin,
|
.Mod_LoadExternalSkins = 0,
|
||||||
Skin_SetTranslation,
|
.Mod_IQMFinish = sw_Mod_IQMFinish,
|
||||||
sw_Skin_ProcessTranslation,
|
.alias_cache = 1,
|
||||||
sw_Skin_InitTranslations,
|
.Mod_SpriteLoadFrames = sw_Mod_SpriteLoadFrames,
|
||||||
|
|
||||||
|
.Skin_Free = Skin_Free,
|
||||||
|
.Skin_SetColormap = Skin_SetColormap,
|
||||||
|
.Skin_SetSkin = Skin_SetSkin,
|
||||||
|
.Skin_SetupSkin = sw_Skin_SetupSkin,
|
||||||
|
.Skin_SetTranslation = Skin_SetTranslation,
|
||||||
|
.Skin_ProcessTranslation = sw_Skin_ProcessTranslation,
|
||||||
|
.Skin_InitTranslations = sw_Skin_InitTranslations,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -456,56 +457,57 @@ sw_capture_screen (capfunc_t callback, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
vid_render_funcs_t sw_vid_render_funcs = {
|
vid_render_funcs_t sw_vid_render_funcs = {
|
||||||
sw_vid_render_init,
|
.init = sw_vid_render_init,
|
||||||
sw_Draw_CharBuffer,
|
|
||||||
Draw_Character,
|
|
||||||
Draw_String,
|
|
||||||
Draw_nString,
|
|
||||||
Draw_AltString,
|
|
||||||
Draw_ConsoleBackground,
|
|
||||||
Draw_Crosshair,
|
|
||||||
Draw_CrosshairAt,
|
|
||||||
Draw_TileClear,
|
|
||||||
Draw_Fill,
|
|
||||||
Draw_Line,
|
|
||||||
Draw_TextBox,
|
|
||||||
Draw_FadeScreen,
|
|
||||||
Draw_BlendScreen,
|
|
||||||
Draw_CachePic,
|
|
||||||
Draw_UncachePic,
|
|
||||||
Draw_MakePic,
|
|
||||||
Draw_DestroyPic,
|
|
||||||
Draw_PicFromWad,
|
|
||||||
Draw_Pic,
|
|
||||||
Draw_Picf,
|
|
||||||
Draw_SubPic,
|
|
||||||
Draw_AddFont,
|
|
||||||
Draw_FontString,
|
|
||||||
|
|
||||||
sw_ParticleSystem,
|
.Draw_CharBuffer = sw_Draw_CharBuffer,
|
||||||
sw_R_Init,
|
.Draw_Character = Draw_Character,
|
||||||
R_ClearState,
|
.Draw_String = Draw_String,
|
||||||
R_LoadSkys,
|
.Draw_nString = Draw_nString,
|
||||||
R_NewScene,
|
.Draw_AltString = Draw_AltString,
|
||||||
R_LineGraph,
|
.Draw_ConsoleBackground = Draw_ConsoleBackground,
|
||||||
sw_begin_frame,
|
.Draw_Crosshair = Draw_Crosshair,
|
||||||
sw_render_view,
|
.Draw_CrosshairAt = Draw_CrosshairAt,
|
||||||
R_DrawParticles,
|
.Draw_TileClear = Draw_TileClear,
|
||||||
sw_draw_transparent,
|
.Draw_Fill = Draw_Fill,
|
||||||
sw_post_process,
|
.Draw_Line = Draw_Line,
|
||||||
sw_set_2d,
|
.Draw_TextBox = Draw_TextBox,
|
||||||
sw_end_frame,
|
.Draw_FadeScreen = Draw_FadeScreen,
|
||||||
|
.Draw_BlendScreen = Draw_BlendScreen,
|
||||||
|
.Draw_CachePic = Draw_CachePic,
|
||||||
|
.Draw_UncachePic = Draw_UncachePic,
|
||||||
|
.Draw_MakePic = Draw_MakePic,
|
||||||
|
.Draw_DestroyPic = Draw_DestroyPic,
|
||||||
|
.Draw_PicFromWad = Draw_PicFromWad,
|
||||||
|
.Draw_Pic = Draw_Pic,
|
||||||
|
.Draw_Picf = Draw_Picf,
|
||||||
|
.Draw_SubPic = Draw_SubPic,
|
||||||
|
.Draw_AddFont = Draw_AddFont,
|
||||||
|
.Draw_FontString = Draw_FontString,
|
||||||
|
|
||||||
sw_create_cube_map,
|
.ParticleSystem = sw_ParticleSystem,
|
||||||
sw_create_frame_buffer,
|
.R_Init = sw_R_Init,
|
||||||
sw_destroy_frame_buffer,
|
.R_ClearState = R_ClearState,
|
||||||
sw_bind_framebuffer,
|
.R_LoadSkys = R_LoadSkys,
|
||||||
sw_set_viewport,
|
.R_NewScene = R_NewScene,
|
||||||
sw_set_fov,
|
.R_LineGraph = R_LineGraph,
|
||||||
|
.begin_frame = sw_begin_frame,
|
||||||
|
.render_view = sw_render_view,
|
||||||
|
.draw_particles = R_DrawParticles,
|
||||||
|
.draw_transparent = sw_draw_transparent,
|
||||||
|
.post_process = sw_post_process,
|
||||||
|
.set_2d = sw_set_2d,
|
||||||
|
.end_frame = sw_end_frame,
|
||||||
|
|
||||||
sw_capture_screen,
|
.create_cube_map = sw_create_cube_map,
|
||||||
|
.create_frame_buffer = sw_create_frame_buffer,
|
||||||
|
.destroy_frame_buffer = sw_destroy_frame_buffer,
|
||||||
|
.bind_framebuffer = sw_bind_framebuffer,
|
||||||
|
.set_viewport = sw_set_viewport,
|
||||||
|
.set_fov = sw_set_fov,
|
||||||
|
|
||||||
&model_funcs
|
.capture_screen = sw_capture_screen,
|
||||||
|
|
||||||
|
.model_funcs = &model_funcs
|
||||||
};
|
};
|
||||||
|
|
||||||
static general_funcs_t plugin_info_general_funcs = {
|
static general_funcs_t plugin_info_general_funcs = {
|
||||||
|
|
|
@ -670,30 +670,31 @@ vulkan_vid_render_create_context (void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static vid_model_funcs_t model_funcs = {
|
static vid_model_funcs_t model_funcs = {
|
||||||
sizeof (vulktex_t) + 2 * sizeof (qfv_tex_t),
|
.texture_render_size = sizeof (vulktex_t) + 2 * sizeof (qfv_tex_t),
|
||||||
vulkan_Mod_LoadLighting,
|
|
||||||
vulkan_Mod_SubdivideSurface,
|
|
||||||
vulkan_Mod_ProcessTexture,
|
|
||||||
|
|
||||||
Mod_LoadIQM,
|
.Mod_LoadLighting = vulkan_Mod_LoadLighting,
|
||||||
Mod_LoadAliasModel,
|
.Mod_SubdivideSurface = vulkan_Mod_SubdivideSurface,
|
||||||
Mod_LoadSpriteModel,
|
.Mod_ProcessTexture = vulkan_Mod_ProcessTexture,
|
||||||
|
|
||||||
vulkan_Mod_MakeAliasModelDisplayLists,
|
.Mod_LoadIQM = Mod_LoadIQM,
|
||||||
vulkan_Mod_LoadAllSkins,
|
.Mod_LoadAliasModel = Mod_LoadAliasModel,
|
||||||
vulkan_Mod_FinalizeAliasModel,
|
.Mod_LoadSpriteModel = Mod_LoadSpriteModel,
|
||||||
vulkan_Mod_LoadExternalSkins,
|
|
||||||
vulkan_Mod_IQMFinish,
|
|
||||||
0,
|
|
||||||
vulkan_Mod_SpriteLoadFrames,
|
|
||||||
|
|
||||||
Skin_Free,
|
.Mod_MakeAliasModelDisplayLists = vulkan_Mod_MakeAliasModelDisplayLists,
|
||||||
Skin_SetColormap,
|
.Mod_LoadAllSkins = vulkan_Mod_LoadAllSkins,
|
||||||
Skin_SetSkin,
|
.Mod_FinalizeAliasModel = vulkan_Mod_FinalizeAliasModel,
|
||||||
vulkan_Skin_SetupSkin,
|
.Mod_LoadExternalSkins = vulkan_Mod_LoadExternalSkins,
|
||||||
Skin_SetTranslation,
|
.Mod_IQMFinish = vulkan_Mod_IQMFinish,
|
||||||
vulkan_Skin_ProcessTranslation,
|
.alias_cache = 0,
|
||||||
vulkan_Skin_InitTranslations,
|
.Mod_SpriteLoadFrames = vulkan_Mod_SpriteLoadFrames,
|
||||||
|
|
||||||
|
.Skin_Free = Skin_Free,
|
||||||
|
.Skin_SetColormap = Skin_SetColormap,
|
||||||
|
.Skin_SetSkin = Skin_SetSkin,
|
||||||
|
.Skin_SetupSkin = vulkan_Skin_SetupSkin,
|
||||||
|
.Skin_SetTranslation = Skin_SetTranslation,
|
||||||
|
.Skin_ProcessTranslation = vulkan_Skin_ProcessTranslation,
|
||||||
|
.Skin_InitTranslations = vulkan_Skin_InitTranslations,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -750,56 +751,57 @@ vulkan_vid_render_shutdown (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
vid_render_funcs_t vulkan_vid_render_funcs = {
|
vid_render_funcs_t vulkan_vid_render_funcs = {
|
||||||
vulkan_vid_render_init,
|
.init = vulkan_vid_render_init,
|
||||||
vulkan_Draw_CharBuffer,
|
|
||||||
vulkan_Draw_Character,
|
|
||||||
vulkan_Draw_String,
|
|
||||||
vulkan_Draw_nString,
|
|
||||||
vulkan_Draw_AltString,
|
|
||||||
vulkan_Draw_ConsoleBackground,
|
|
||||||
vulkan_Draw_Crosshair,
|
|
||||||
vulkan_Draw_CrosshairAt,
|
|
||||||
vulkan_Draw_TileClear,
|
|
||||||
vulkan_Draw_Fill,
|
|
||||||
vulkan_Draw_Line,
|
|
||||||
vulkan_Draw_TextBox,
|
|
||||||
vulkan_Draw_FadeScreen,
|
|
||||||
vulkan_Draw_BlendScreen,
|
|
||||||
vulkan_Draw_CachePic,
|
|
||||||
vulkan_Draw_UncachePic,
|
|
||||||
vulkan_Draw_MakePic,
|
|
||||||
vulkan_Draw_DestroyPic,
|
|
||||||
vulkan_Draw_PicFromWad,
|
|
||||||
vulkan_Draw_Pic,
|
|
||||||
vulkan_Draw_Picf,
|
|
||||||
vulkan_Draw_SubPic,
|
|
||||||
vulkan_Draw_AddFont,
|
|
||||||
vulkan_Draw_FontString,
|
|
||||||
|
|
||||||
vulkan_ParticleSystem,
|
.Draw_CharBuffer = vulkan_Draw_CharBuffer,
|
||||||
vulkan_R_Init,
|
.Draw_Character = vulkan_Draw_Character,
|
||||||
vulkan_R_ClearState,
|
.Draw_String = vulkan_Draw_String,
|
||||||
vulkan_R_LoadSkys,
|
.Draw_nString = vulkan_Draw_nString,
|
||||||
vulkan_R_NewScene,
|
.Draw_AltString = vulkan_Draw_AltString,
|
||||||
vulkan_R_LineGraph,
|
.Draw_ConsoleBackground = vulkan_Draw_ConsoleBackground,
|
||||||
vulkan_begin_frame,
|
.Draw_Crosshair = vulkan_Draw_Crosshair,
|
||||||
vulkan_render_view,
|
.Draw_CrosshairAt = vulkan_Draw_CrosshairAt,
|
||||||
vulkan_draw_particles,
|
.Draw_TileClear = vulkan_Draw_TileClear,
|
||||||
vulkan_draw_transparent,
|
.Draw_Fill = vulkan_Draw_Fill,
|
||||||
vulkan_post_process,
|
.Draw_Line = vulkan_Draw_Line,
|
||||||
vulkan_set_2d,
|
.Draw_TextBox = vulkan_Draw_TextBox,
|
||||||
vulkan_end_frame,
|
.Draw_FadeScreen = vulkan_Draw_FadeScreen,
|
||||||
|
.Draw_BlendScreen = vulkan_Draw_BlendScreen,
|
||||||
|
.Draw_CachePic = vulkan_Draw_CachePic,
|
||||||
|
.Draw_UncachePic = vulkan_Draw_UncachePic,
|
||||||
|
.Draw_MakePic = vulkan_Draw_MakePic,
|
||||||
|
.Draw_DestroyPic = vulkan_Draw_DestroyPic,
|
||||||
|
.Draw_PicFromWad = vulkan_Draw_PicFromWad,
|
||||||
|
.Draw_Pic = vulkan_Draw_Pic,
|
||||||
|
.Draw_Picf = vulkan_Draw_Picf,
|
||||||
|
.Draw_SubPic = vulkan_Draw_SubPic,
|
||||||
|
.Draw_AddFont = vulkan_Draw_AddFont,
|
||||||
|
.Draw_FontString = vulkan_Draw_FontString,
|
||||||
|
|
||||||
vulkan_create_cube_map,
|
.ParticleSystem = vulkan_ParticleSystem,
|
||||||
vulkan_create_frame_buffer,
|
.R_Init = vulkan_R_Init,
|
||||||
vulkan_destroy_frame_buffer,
|
.R_ClearState = vulkan_R_ClearState,
|
||||||
vulkan_bind_framebuffer,
|
.R_LoadSkys = vulkan_R_LoadSkys,
|
||||||
vulkan_set_viewport,
|
.R_NewScene = vulkan_R_NewScene,
|
||||||
vulkan_set_fov,
|
.R_LineGraph = vulkan_R_LineGraph,
|
||||||
|
.begin_frame = vulkan_begin_frame,
|
||||||
|
.render_view = vulkan_render_view,
|
||||||
|
.draw_particles = vulkan_draw_particles,
|
||||||
|
.draw_transparent = vulkan_draw_transparent,
|
||||||
|
.post_process = vulkan_post_process,
|
||||||
|
.set_2d = vulkan_set_2d,
|
||||||
|
.end_frame = vulkan_end_frame,
|
||||||
|
|
||||||
vulkan_capture_screen,
|
.create_cube_map = vulkan_create_cube_map,
|
||||||
|
.create_frame_buffer = vulkan_create_frame_buffer,
|
||||||
|
.destroy_frame_buffer = vulkan_destroy_frame_buffer,
|
||||||
|
.bind_framebuffer = vulkan_bind_framebuffer,
|
||||||
|
.set_viewport = vulkan_set_viewport,
|
||||||
|
.set_fov = vulkan_set_fov,
|
||||||
|
|
||||||
&model_funcs
|
.capture_screen = vulkan_capture_screen,
|
||||||
|
|
||||||
|
.model_funcs = &model_funcs
|
||||||
};
|
};
|
||||||
|
|
||||||
static general_funcs_t plugin_info_general_funcs = {
|
static general_funcs_t plugin_info_general_funcs = {
|
||||||
|
|
Loading…
Reference in a new issue