jjdh API

jjdh.opengl.core
Class CgProgram

java.lang.Object
  extended by jjdh.opengl.core.CgProgram

public class CgProgram
extends Object

This class encapsulates a NVIDIA Cg Shader program.


Field Summary
private static com.sun.opengl.cg.CGcontext cgContext
           
private  int cgProfile
           
private  com.sun.opengl.cg.CGprogram cgProgram
           
 
Constructor Summary
CgProgram(int cgProfile, InputStream stream)
           
CgProgram(int cgProfile, InputStream input, String entryPoint, String... compilerParameters)
           
 
Method Summary
 void bind()
           
private  void checkCgError()
           
 void destroy()
           
static void destroyContext()
           
 void disableProfile()
           
 void enableProfile()
           
static com.sun.opengl.cg.CGcontext getContext()
           
 com.sun.opengl.cg.CGparameter getNamedParameter(String name)
           
 void load()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cgContext

private static com.sun.opengl.cg.CGcontext cgContext

cgProgram

private com.sun.opengl.cg.CGprogram cgProgram

cgProfile

private int cgProfile
Constructor Detail

CgProgram

public CgProgram(int cgProfile,
                 InputStream stream)
          throws IOException
Throws:
IOException

CgProgram

public CgProgram(int cgProfile,
                 InputStream input,
                 String entryPoint,
                 String... compilerParameters)
          throws IOException
Throws:
IOException
Method Detail

getNamedParameter

public com.sun.opengl.cg.CGparameter getNamedParameter(String name)

enableProfile

public void enableProfile()

disableProfile

public void disableProfile()

load

public void load()

bind

public void bind()

getContext

public static com.sun.opengl.cg.CGcontext getContext()

checkCgError

private void checkCgError()
                   throws com.sun.opengl.cg.CgException
Throws:
com.sun.opengl.cg.CgException

destroy

public void destroy()

destroyContext

public static void destroyContext()

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.