Varjo Native SDK
Varjo_gl.h File Reference

Go to the source code of this file.

Functions

VARJO_DEPRECATED_API struct varjo_GraphicsInfo * varjo_GLInit (struct varjo_Session *session, varjo_TextureFormat format, struct varjo_SwapChainConfig *config)
 Initializes OpenGL rendering system. More...
 
struct varjo_Texture varjo_FromGLTexture (GLuint texture)
 Converts an OpenGL texture to varjo_Texture. More...
 
GLuint varjo_ToGLTexture (struct varjo_Texture texture)
 Converts a Varjo texture to OpenGL texture. More...
 
VARJO_DEPRECATED_API void varjo_GLShutDown (struct varjo_Session *session)
 Closes the OpenGL connection. More...
 

Function Documentation

◆ varjo_FromGLTexture()

struct varjo_Texture varjo_FromGLTexture ( GLuint  texture)

Converts an OpenGL texture to varjo_Texture.

◆ varjo_GLInit()

VARJO_DEPRECATED_API struct varjo_GraphicsInfo* varjo_GLInit ( struct varjo_Session *  session,
varjo_TextureFormat  format,
struct varjo_SwapChainConfig *  config 
)

Initializes OpenGL rendering system.

If the application is submitting manually created swapchains using varjo_EndFrameWithLayers, calling this function (or varjo_D3D11Init) is not necessary and is not recommended.

All varjo_GL* functions may use OpenGL context and should thus be either invoked from the rendering thread.

Varjo system automatically frees the returned varjo_GraphicsInfo struct when varjo_GLShutDown or varjo_SessionShutDown is called.

Parameters
sessionVarjo session handle.
formatTexture format.
configSwap chain config. If null, uses the default config.
Returns
Information required to setup rendering and per-frame data.
Deprecated:
use varjo_GLCreateSwapChain()

◆ varjo_GLShutDown()

VARJO_DEPRECATED_API void varjo_GLShutDown ( struct varjo_Session *  session)

Closes the OpenGL connection.

This function should only be called if the application has previously called varjo_GLInit on this varjo_Session

Parameters
sessionVarjo session handle.
Deprecated:
use varjo_FreeSwapChain()

◆ varjo_ToGLTexture()

GLuint varjo_ToGLTexture ( struct varjo_Texture  texture)

Converts a Varjo texture to OpenGL texture.