Skip to content

Commit

Permalink
Removed MOJOSHADER_glSetSampler() from the public header.
Browse files Browse the repository at this point in the history
It's not needed. Just assign OpenGL texture units in the same order you would
 assign Direct3D texture stages, and we'll use the same indices internally.

--HG--
branch : trunk
  • Loading branch information
icculus committed Jun 2, 2008
1 parent 537acf0 commit e2298e4
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions mojoshader.h
Expand Up @@ -771,37 +771,6 @@ void MOJOSHADER_glSetVertexAttribute(MOJOSHADER_usage usage,
int normalized, unsigned int stride,
const void *ptr);

/*
* Set a sampler.
*
* There is a single array of samplers shared by all shaders.
* This is the "s" register file in Direct3D (s0, s1, s2, etc...), also
* known as the "sampler stages." MojoShader will take care of synchronizing
* this internal array with the appropriate variables in the GL shaders.
*
* Unlike the float and int counterparts, samplers are single values, not
* four-element vectors...so idx==1 is the second sampler in the internal
* array, not the fifth.
*
* (sampler) is the index into the internal array.
* (unit) is an OpenGL TEXTURE UNIT (not a texture name!). This is the
* unit's index, not the GLenum. So if you want GL_TEXTURE_0, use 0.
*
* Bind the texture unit, set state, call this to assign it to the internal
* array, where it will propagate to the shader during
* MOJOSHADER_glProgramReady().
*
* This call is NOT thread safe! As most OpenGL implementations are not thread
* safe, you should probably only call this from the same thread that created
* the GL context.
*
* This call requires a valid MOJOSHADER_glContext to have been made current,
* or it will crash your program. See MOJOSHADER_glMakeContextCurrent().
*
* Samplers are not shared between contexts.
*/
void MOJOSHADER_glSetSampler(unsigned int sampler, unsigned int unit);

/*
* Inform MojoShader that it should commit any pending state to the GL. This
* must be called after you bind a program and update any inputs, right
Expand Down

0 comments on commit e2298e4

Please sign in to comment.