Unofficial OpenGL SDK / glload / include / glload / gll.hpp

#ifndef GLSDL_LOAD_HPP
#define GLSDL_LOAD_HPP

/**
\file
\brief The C++ header to include if you want to initialize the OpenGL functions.

**/

///\addtogroup module_glload_cppinter
///@{

///The core namespace for the C++ interface for the OpenGL initialization functions.
namespace glload
{
	/**
	\brief The loading status returned by the extension loaders.

	**/
	enum LoadSucceeded
	{
		LS_LOAD_FUNCTIONS_ALL,		///<All function pointers defined for each extension have been loaded.
		LS_LOAD_FUNCTIONS_SOME,		///<Only some of the function pointers defined for each extension have been loaded.
		LS_LOAD_FAILED,				///<Function loading failed. Things were reset to nothing being loaded.
	};

	/**
	\brief Loads all of the OpenGL function pointers for the current version and extensions.

	This function will respect the core/compatibility flags that the context was created under
	(if the version is 3.2 or better and thus has those flags available). Similarly, if ARB_compatibility
	is defined for a 3.1 context, it will load the compatibility profile; otherwise, it will load the core.
	For 3.0 and below, it loads everything available.

	\return Of the type glload::LoadSucceeded.
	**/
	int LoadFunctions();

#ifdef WIN32
	/**
	\brief Loads all of the function pointers associated with WGL.

	\return Of the type glload::LoadSucceeded.
	**/
	int LoadWinFunctions(void *hdc);
#endif //WIN32
#ifdef GLX_H
	/**
	\brief Loads all of the function pointers associated with GLX.

	\return Of the type glload::LoadSucceeded.
	**/
	int LoadGLXFunctions(void *display, int screen);
#endif

	/**
	This function retrieves the major GL version number of the OpenGL context. Only works after LoadFunctions has been called.
	**/
	int GetMajorVersion();

	/**
	This function retrieves the minor GL version number of the OpenGL context. Only works after LoadFunctions has been called.
	**/
	int GetMinorVersion();

	///Returns true if the current GL version is greater than or equal to the given version.
	bool IsVersionGEQ(int iMajorVersion, int iMinorVersion);
}
///@}

#endif //GLSDL_LOAD_HPP
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.