Code Search for Developers
 
 
  

shader.h from NeoEngineNG at Krugle


Show shader.h syntax highlighted

/***************************************************************************
              shader-arb.h  -  ARB vertex/fragment programs
                             -------------------
    begin       : Mon Jan 5 2004
    copyright   : (C) 2004 by Reality Rift Studios
    email       : mattias@realityrift.com
 
  	last modify date	: Mon Sep 20 2004
	last modify			: GLSL manager
	l.m. copyright   	: (C) 2004 by Arcadia Design s.r.l.
    email       		: Dario Deledda (penguindark@hotmail.com)

 ***************************************************************************

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (the "License"); you may not use this file except in compliance with
 the License. You may obtain a copy of the License at 
 http://www.mozilla.org/MPL/

 Software distributed under the License is distributed on an "AS IS" basis,
 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 for the specific language governing rights and limitations under the
 License.

 The Original Code is the NeoEngine, NeoDevOpenGL, shader-arb.h

 The Initial Developer of the Original Code is Mattias Jansson.
 Portions created by Mattias Jansson are Copyright (C) 2004
 Reality Rift Studios. All Rights Reserved.

 Contributors: Dario Deledda (penguindark@hotmail.com)

 ***************************************************************************/

#ifndef __NEOGLSHADER_H
#define __NEOGLSHADER_H


#include "device.h"

#include <neoengine/shader.h>
#include <neoengine/hashtable.h>


namespace NeoOGL
{


typedef NeoEngine::HashTable< class Shader > ShaderTable;


/**
  * \brief OpenGL implementation of pipeline shaders
  * \author Matt Holmes (kerion@houston.rr.com)
  * \author Cody Russell (cody@jhu.edu)
  * \author Mattias Jansson (mattias@realityrift.com)
  */
class Shader : public NeoEngine::Shader
{
	friend class Device;
	friend class VertexBufferManager;
	friend class VertexBufferManagerGLSL;

	protected:

		/*! Program shader table */
		static ShaderTable                           s_kPSTable;

		/*! Render device */
		Device                                       *m_pkDevice;

		/*! Flag indicating we have been compiled and linked*/
		bool                                          m_bIsCompiled;


	public:

		/**
		* \param pkDevice                             Render device
		* \param eType                                Shader type
		* \param rstrName							  Shader name
		* \param pkShaderPool						  Ptr to shader pool
		* \param pkFileManager                        Filemananger, null if default
		*/
		                                              //Shader( Device *pkDevice, SHADERTYPE eType, NeoEngine::FileManager *pkFileManager = 0 );
														Shader( Device *pkDevice, 
															SHADERTYPE eType, 
															const std::string &rstrName, 
															NeoEngine::ShaderPool *pkShaderPool,
															NeoEngine::FileManager *pkFileManager = 0  );

		/**
		*/
		virtual                                      ~Shader();

		/**
		* Set name of shader
		* \param rstrName                             New name
		*/
		virtual void                                  SetName( const NeoEngine::HashString &rstrName );

		/**
		* Bind this pipeline shader and parameters, performing OpenGL specific operations
		* \param pkPrimitive                          Primitive currently processing
		* \return                                     True if bound, or false if error
		*/
		virtual bool                                  Bind( NeoEngine::RenderPrimitive *pkPrimitive ) = 0;

		/**
		* Bind light parameters
		* \param pkPrimitive                          Primitive currently processing
		* \return                                     True if bound, or false if error
		*/
		virtual bool                                  BindLightParams( NeoEngine::RenderPrimitive *pkPrimitive ) = 0;

		/**
		* Disable shader
		* \return                                     True if successful, false if error
		*/
		virtual bool                                  Unbind() = 0;
};

#ifdef WIN32
#	ifdef _MSC_VER
#		pragma warning( disable : 4786 )

#		if ( _MSC_VER >= 1300 )
		   typedef NeoEngine::Pointer< Shader > ShaderPtr;                                         
    	   EXPIMP_TEMPLATE template class NEOENGINE_API NeoEngine::Pointer< Shader >;                   
    	   EXPIMP_TEMPLATE template class NEOENGINE_API std::allocator< NeoEngine::Pointer< Shader > >; 
    	   EXPIMP_TEMPLATE template class NEOENGINE_API std::vector< NeoEngine::Pointer< Shader > >;    
#		elif defined(_MSC_VER)
    	   typedef NeoEngine::Pointer< Shader > ShaderPtr;                                         
    	   EXPIMP_TEMPLATE template class NEOENGINE_API NeoEngine::Pointer< Shader >;                   
    	   EXPIMP_TEMPLATE template class NEOENGINE_API std::vector< NeoEngine::Pointer< Shader > >     
#		endif
#	else if defined __MINGW32__
		typedef NeoEngine::Pointer< Shader > ShaderPtr;
#	endif
#else
	typedef NeoEngine::Pointer< Shader > ShaderPtr;
#endif

};


#endif




See more files for this project here

NeoEngineNG

NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n

Project homepage: http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other

  glew/
    bin/
      glew32.dll
      glewinfo.exe
      visualinfo.exe
    doc/
      advanced.html
      basic.html
      credits.html
      glew.css
      glew.html
      glew.png
      glx.txt
      glxew.html
      gpl.txt
      index.html
      install.html
      log.html
      new.png
      ogl_sm.jpg
      sgi.txt
      wglew.html
    include/
      GL/
    lib/
      glew32.lib
      glew32s.lib
  Makefile.am
  SConscript
  base.h
  begin.cpp
  buffermanager.cpp
  buffermanager.h
  bufferregion.cpp
  bufferregion.h
  callback.cpp
  clear.cpp
  close.cpp
  config.cpp
  device.cpp
  device.h
  end.cpp
  execute.cpp
  extensions.cpp
  extensions.h
  flip.cpp
  framebuffertarget.cpp
  framebuffertarget.h
  glext.h
  glue.cpp
  glxext.h
  initialize.cpp
  input.cpp
  light.cpp
  link.h
  mouse.cpp
  neodevopengl-static.dev
  neodevopengl.cbp
  neodevopengl.depend
  neodevopengl.dev
  neodevopengl.dsp
  neodevopengl.layout
  neodevopengl.vcproj
  op.h
  open.cpp
  pixelbuffer.cpp
  pixelbuffer.h
  pixelbuffertarget.cpp
  pixelbuffertarget.h
  polygonbuffer.cpp
  polygonstripbuffer.cpp
  program-glsl.cpp
  program-glsl.h
  projection.cpp
  query.cpp
  render.cpp
  renderqueue.cpp
  renderqueue.h
  rendertarget.cpp
  rendertarget.h
  resize.cpp
  shader.cpp
  shader.h
  shadowmap.cpp
  shadowmap.h
  shutdown.cpp
  statistics.cpp
  statistics.h
  stencilbuffer.cpp
  texture.cpp
  texture.h
  textureunit.cpp
  textureunit.h
  vertexbuffer-glsl.cpp
  vertexbuffer-glsl.h
  vertexbuffer.cpp
  vertexbuffer.h
  vertexbuffermanager-glsl.cpp
  vertexbuffermanager-glsl.h
  vertexbuffermanager-nobs.cpp
  vertexbuffermanager-nobs.h
  vertexbuffermanager.cpp
  vertexbuffermanager.h
  viewport.cpp
  wglext.h
  zbufferstate.cpp
  zbufferstate.h