retrieve OpenGL state from fragment program in CG

Rhadamés Carmona <[email protected]>
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
Hi Guys

I am using CG, and I would want to retrieve opengl state from fragment
program. I just need to know (inside the fragment program) if 2d texture is
enable in one particular texture unit.

/********* main program ************/
glActiveTextureARB(GL_TEXTURE1_ARB);
if (any condition)
  glEnable(GL_TEXTURE_2D);
else

  glDisable(GL_TEXTURE_2D);

/* ----------------------------
fragment program:
well, how to retrieve "texture unit 1" status without
using parameters.
is it possible to retrieve this kind on information from glstate.*?
how?
... */


Thx guys!
RIX

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: =?iso-8859-1?Q?Rhadam=E9s_Carmona?=
  INET: [email protected]

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.