Removed MOJOSHADER_glSetSampler() from the public header. trunk
authorRyan C. Gordon <icculus@icculus.org>
Mon, 02 Jun 2008 17:54:41 -0400
branchtrunk
changeset 354 ec1d705d167a
parent 353 fadf01bb3f62
child 355 f42ca594e366
Removed MOJOSHADER_glSetSampler() from the public header. 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.
mojoshader.h
--- a/mojoshader.h	Mon Jun 02 17:40:44 2008 -0400
+++ b/mojoshader.h	Mon Jun 02 17:54:41 2008 -0400
@@ -772,37 +772,6 @@
                                      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
  *  before you start drawing, so any outstanding changes made to the shared