A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/glshader_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/opengl/glshader.cpp Source File

62  CFile

vert_file(vert_shader);

63  CFile

frag_file(frag_shader);

82  size_t

max_size = size_t(

std::max

(fsize1, fsize2));

83  buf

=

new char

[max_size];

84

fio_vs.

Read

(

buf

,

size_t

(fsize1));

86

fio_fs.

Read

(

buf

,

size_t

(fsize2));

103  const string

& fragment_shader_str)

117  const

GLchar* vs_cptr = vertex_shader_str.c_str();

118

GLint shader_len = (GLint)vertex_shader_str.length();

122  const

GLchar* fs_cptr = fragment_shader_str.c_str();

123

shader_len = (GLint)fragment_shader_str.length();

129  if

(status == GL_FALSE)

138  if

(status == GL_FALSE)

152  if

(status == GL_FALSE)

192

glGetIntegerv(GL_CURRENT_PROGRAM, &get_prog_id);

218  int

infologLength = 0;

221

glGetShaderiv(obj, GL_INFO_LOG_LENGTH, &infologLength);

223  if

(infologLength > 0)

225  int

charsWritten = 0;

226  char

* infoLog = (

char

*)

malloc

(infologLength);

227

glGetShaderInfoLog(obj, infologLength, &charsWritten, infoLog);

228

shader_log = infoLog;

241  int

infologLength = 0;

244

glGetProgramiv(obj, GL_INFO_LOG_LENGTH,&infologLength);

246  if

(infologLength > 0)

248  int

charsWritten = 0;

249  char

*infoLog = (

char

*)

malloc

(infologLength);

250

glGetProgramInfoLog(obj, infologLength, &charsWritten, infoLog);

251

shader_log = infoLog;

Class for support low level input/output for files.

const string & GetMsg(void) const

Get message string.

void Open(const string &filename, EOpenMode open_mode, EAccessMode access_mode, EShareMode share_mode=eShare)

Open file.

Uint8 GetFileSize(void) const

Get file size.

size_t Read(void *buf, size_t count) const

Read file.

virtual bool Exists(void) const

Check existence of file.

@ eRead

File can be read.

@ eOpen

Open an existing file, or create a new one.

GLuint m_VertexShaderId

Shader IDs.

virtual void UseProgram(GLuint program)=0

For shaders. Only works with OpenGL 2.0+.

void Release()

Restore whatever the current shader was when MakeCurrent() was last called.

IRender & GetGl()

convenience function for getting current render manager

GLuint m_ShaderProgramId

Shader program ID passed to glUseProgram()

void Clear()

Free OpenGL resources (shader objects and program) and set ids to 0.

virtual ~CGlShader()

Free OpenGL resources (shader objects and program) and set ids to 0.

string m_CompileLinkLog

Error log from last compile/link.

bool IsValid() const

true if we have a non-default shader (but you can still call MakeCurrent when m_ShaderProgramId is 0,...

static bool CheckGlError()

Check if there are any OpenGL errors.

virtual ERenderTarget GetApi()=0

GLuint m_FragmentShaderId

GLuint m_PrevProgramId

Updated everytime MakeCurrent is called so that the previous program can be reset.

void MakeCurrent() const

Call glUseProgram to make m_ShaderProgramId the current shader.

GLuint CreateShader(const string &file_name)

file_name should be the root file name of a vertex and a pixel shader with the same base name,...

string x_GetProgramInfoLog(GLuint obj) const

GLint GetUniformLocation(const GLchar *name)

Returns location ID for uniform var "name".

string x_GetShaderInfoLog(GLuint obj) const

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4