Code Search for Developers
 
 
  

vertexbuffermanager-glsl.h from NeoEngineNG at Krugle


Show vertexbuffermanager-glsl.h syntax highlighted

/***************************************************************************
     vertexbuffermanager-arb.h  -  ARB vertex buffer allocation manager
                             -------------------
    begin                : Fri Aug 15 2003
    copyright            : (C) 2003 by Cody Russell
    email                : cody `at' jhu.edu
 ***************************************************************************

 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, vertexbuffermanager-arb.h

 The Initial Developer of the Original Code is Cody Russell.
 Portions created by Cody Russell are Copyright (C) 2003
 Cody Russell. All Rights Reserved.

 Contributors: Mattias Jansson (mattias@realityrift.com)

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

#ifndef __NEOGLVERTEXBUFFERMANAGER_GLSL_H
#define __NEOGLVERTEXBUFFERMANAGER_GLSL_H



/**
  * \file vertexbuffermanager-glsl.h
  * GLSL vertex buffer allocation manager
  */


#include "vertexbuffermanager.h"
#include "vertexbuffer-glsl.h"


namespace NeoOGL
{


//External classes
class VertexBufferGLSL;


/**
  * \brief Manages vertex buffer allocations using GLSL extension
  * \author Dario Deledda
  */
class VertexBufferManagerGLSL : public VertexBufferManager
{
	friend class VertexBufferGLSL;

	protected:

		/*! Points to the currently bound buffer.  NULL is none are bound. */
		VertexBufferGLSL                                    *m_pkBoundBuffer;


	public:

		/**
		* \param pkDevice                                   Device object
		*/
		                                                    VertexBufferManagerGLSL( Device *pkDevice );

		/**
		* Free memory
		*/
		virtual                                            ~VertexBufferManagerGLSL();

		/**
		* Allocate a vertex buffer
		* \param uiType                                     Buffer type
		* \param uiNumVertices                              Number of vertices
		* \param pkFormat                                   Flexible vertex format specifier
		* \param pData                                      Optional pointer to data to load buffer with
		* \return                                           Ptr to new vertex buffer
		*/
		virtual NeoEngine::VertexBufferPtr                  CreateVertexBuffer( unsigned int uiType, unsigned int uiNumVertices, const NeoEngine::VertexDeclaration *pkFormat, const void *pData );

		/**
		* Set base pointers for rendering
		* \param pkVertexBuffer                             Vertex buffer object
		* \param uiUVLayer                                  UV layer
		*/
		virtual void                                        SetBasePointers( VertexBufferGL *pkVertexBuffer, unsigned int uiUVLayer );

		/**
		* Set pointer for texture layer for rendering
		* \param pkVertexBuffer                             Vertex buffer object
		* \param uiTexUnit                                  Active texture unit
		* \param uiUVLayer                                  UV layer
		* \param bDisable                                   Force disable
		*/
		virtual void                                        SetTexLayerPointer( VertexBufferGL *pkVertexBuffer, unsigned int uiTexUnit, unsigned int uiUVLayer, bool bDisable = false );

		/**
		* Bind a particular buffer
		* \param pkVertexBuffer                             Vertex buffer object
		*/
		inline void                                         BindBuffer( VertexBufferGLSL *pkVertexBuffer )
		{
			if( m_pkBoundBuffer != pkVertexBuffer )
        		{
                		m_pkBoundBuffer = pkVertexBuffer;
                		neoglBindBufferARB( GL_ARRAY_BUFFER_ARB, m_pkBoundBuffer->m_uiObject );
        		}
		}
};


};


#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