SYNOPSIS
#include <agar/core.h> #include <agar/sg.h>
DESCRIPTION
The
SG_Program object represents a generic vertex or pixel shader program.
Applications will rarely use the
SG_Program interface directly, since programs in specific languages will use
subclasses such as
SG_CgProgram(3).
INHERITANCE HIERARCHY ↑
AG_Object(3)-> SG_Program.
INTERNAL WIDGET API ↑
The following functions are used by
SG_View(3) (or derived widgets), when rendering a scene.
int SG_ProgramInstall (SG_Program *prog, SG_View *view)
void SG_ProgramDeinstall (SG_Program *prog, SG_View *view)
void SG_ProgramBind (SG_Program *prog, SG_View *view)
void SG_ProgramUnbind (SG_Program *prog, SG_View *view)
The SG_ProgramInstall() function installs the program defined in prog. This generally involves verifying, compiling and uploading the code to the hardware. The program is not effective until bound.
SG_ProgramDeinstall() deinstalls / releases the program defined in prog.
SG_ProgramBind() binds the program defined in prog to the current scene.
SG_ProgramUnbind() unbinds the program defined in prog from the current scene.
int SG_ProgramInstall (SG_Program *prog, SG_View *view)
void SG_ProgramDeinstall (SG_Program *prog, SG_View *view)
void SG_ProgramBind (SG_Program *prog, SG_View *view)
void SG_ProgramUnbind (SG_Program *prog, SG_View *view)
The SG_ProgramInstall() function installs the program defined in prog. This generally involves verifying, compiling and uploading the code to the hardware. The program is not effective until bound.
SG_ProgramDeinstall() deinstalls / releases the program defined in prog.
SG_ProgramBind() binds the program defined in prog to the current scene.
SG_ProgramUnbind() unbinds the program defined in prog from the current scene.
SEE ALSO ↑
HISTORY ↑
The
SG_Program object class first appeared in
Agar 1.6.0.