Skip to content

Legacy OpenGL

Finalspace edited this page May 29, 2026 · 2 revisions

Table of Contents

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::compatibilityFlags to fplOpenGLCompatibilityFlags_Legacy .

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

 settings;
(&settings);
 &videoSettings = settings.;

// Forcing the video backend to be legacy OpenGL
videoSettings. = ;
videoSettings.opengl.compatibilityFlags = ;

if ((, &settings)) {
    // ... your code here
}

Usage

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.

It is recommended to call this after each draw call of your frame at the end of the main-loop.

Final Platform Layer

Pages

Topics

Data Structures

Clone this wiki locally