# LoadShaderFromString

## Description

Loads a shader used for drawing objects. The vertex shader transforms the polygons into screen space and the pixel shader determines the final color of each pixel the object covers. Currently shaders default to GLSL version 1.10, the line "#version 110" will be automatically added as the first line of the shader unless you specify a "#version " line of your own. Note that doing this may mean your shader does not work on all devices and platforms. The global "precision" value will be added and should not be included in the shader source.

## Definition

LoadShaderFromString( shaderID, szVertexSource, szPixelSource )

void agk::LoadShaderFromString( UINT shaderID, const char* szVertexSource, const char* szPixelSource )

integer LoadShaderFromString( szVertexSource, szPixelSource )

UINT agk::LoadShaderFromString( const char* szVertexSource, const char* szPixelSource )

## Parameters

- shaderID - An ID used to reference this shader in other commands.
- szVertexSource - The file name of the vertex shader file, normally ending .vs
- szPixelSource - The file name of the pixel shader file, normally ending .ps