tida.gl

Module for loading the library of open graphics, as well as some of its extensions.

Also, the module provides information about which version of the library is used, provides a list of available extensions, and more.

To load the library, you need the created graphics context. Therefore, you need to create a window and embed a graphical context, which is described . After that, using the loadGraphicsLibrary function, the functions of the open graphics library will be available.

Public Imports

bindbc.opengl
public import bindbc.opengl;
Undocumented in source.

Members

Aliases

ExtList
alias ExtList = string[]
Undocumented in source.
FCompressedTexImage2DARB
alias FCompressedTexImage2DARB = void function(GLenum target, int level, GLenum internalformat, GLsizei width, GLsizei height, int border, GLsizei imagesize, void* data)
Undocumented in source.
FFramebufferTextureLayerEXT
alias FFramebufferTextureLayerEXT = void function()
Undocumented in source.
glCompressedTexImage2D
alias glCompressedTexImage2D = glCompressedTexImage2DARB
Undocumented in source.

Enums

Extensions
enum Extensions

Available extensions that the framework can load with one function.

GL_COMPRESSED_RGBA_ARB
anonymousenum GL_COMPRESSED_RGBA_ARB
Undocumented in source.
GL_TEXTURE_1D_ARRAY_EXT
anonymousenum GL_TEXTURE_1D_ARRAY_EXT
Undocumented in source.

Functions

assertGLError
void assertGLError(uint checked, string file, size_t line, string func)
Undocumented in source. Be warned that the author may not have intended to support it.
checkGLError
void checkGLError(string file, size_t line, string func)
Undocumented in source. Be warned that the author may not have intended to support it.
extTextureArrayLoad
bool extTextureArrayLoad()

Loads the extension GL_EXT_texture_array, that is, extensions for loading an array of textures.

extTextureCompressionLoad
bool extTextureCompressionLoad()

Loads the extension GL_ARB_texture_compression, that is, extensions for loading compressed textures.

glExtensionsList
ExtList glExtensionsList()

A function that provides a list of available extensions to use.

hasExtensions
bool hasExtensions(ExtList list, string name)

Checks if the extension specified in the argument is in the open graphics library.

loadGraphicsLibrary
void loadGraphicsLibrary()

The function loads the OpenGL libraries for hardware graphics acceleration.

Properties

glError
uint glError [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
glErrorMessage
string glErrorMessage [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
glGeometrySupport
bool glGeometrySupport [@property getter]

Indicates whether the use of geometry shaders is supported on this device.

glRenderer
string glRenderer [@property getter]

Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.

glVendor
string glVendor [@property getter]

Returns the company responsible for this GL implementation. This name does not change from release to release.

glVersionSpecifed
int[2] glVersionSpecifed [@property getter]

A function that returns the version of the library in the form of two numbers: a major version and a minor version.

glslVersion
string glslVersion [@property getter]

Returns the maximum version of the shaders in the open graphics.

Static variables

_glVersionSpecifed
int[2] _glVersionSpecifed;
Undocumented in source.
_glslVersion
string _glslVersion;
Undocumented in source.
glCompressedTexImage2DARB
FCompressedTexImage2DARB glCompressedTexImage2DARB;
Undocumented in source.
glFramebufferTextureLayerEXT
FFramebufferTextureLayerEXT glFramebufferTextureLayerEXT;
Undocumented in source.

Examples

import tida.runtime;
import tida.window;
import tida.gl;

int main(string[] args)
{
    ITidaRuntime.initialize(args, AllLibrary);
    Window window = new Window(640, 480, "Example window");
    window.windowInitialize!(WithContext)();
    
    loadGraphicsLibrary();
    
    return 0;
}

Meta