Final Platform Layer  0.9.6-beta
Legacy OpenGL

Initialize Legacy OpenGL

To initialize a legacy OpenGL (up to GL version 2.1) rendering context you simply set the fplInitFlags_Video flag in the fplPlatformInit() call and change the video backend type to fplVideoBackendType_OpenGL and set the fplOpenGLSettings::compabilityFlags to fplOpenGLCompabilityFlags_Legacy .

This will work in ~99% on all supported platforms - if not please post an issue for that platform/configuration/video-card ;-)

fplSettings settings;
fplVideoSettings &videoSettings =;
// Forcing the video backend to be legacy OpenGL
videoSettings.opengl.compabilityFlags = fplOpenGLCompabilityFlags_Legacy;
// ... your code here


Extensions loader

To use features of OpenGL 1.2 or later you need some sort of an OpenGL extension loader which gives you access to the constants and functions like glMultiTexCoord2f().
For more details please check the modern OpenGL Extensions loader section.

Presenting your frame

Call fplVideoFlip() to present the frame to the screen.
Its recommend to call this after each draw call of your frame at the end of the main-loop.

A structure containing settings, such as window, video, etc.
Definition: final_platform_layer.h:3930
Definition: final_platform_layer.h:3452
fplVideoBackendType backend
video backend type
Definition: final_platform_layer.h:3565
fpl_common_api bool fplPlatformInit(const fplInitFlags initFlags, const fplSettings *initSettings)
Initializes the platform layer.
Use legacy context.
Definition: final_platform_layer.h:3466
fplVideoSettings video
Video settings.
Definition: final_platform_layer.h:3934
Use a video backbuffer (This flag ensures that fplInitFlags_Window is included always)
Definition: final_platform_layer.h:3384
A structure that contains video settings such as backend, v-sync, API-settings, etc.
Definition: final_platform_layer.h:3561
fpl_common_api void fplSetDefaultSettings(fplSettings *settings)
Resets the given settings container to default values for window, video, audio, etc.