Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

ExManagerVertexArrays Class Reference

#include <ExManagerVertexArrays.h>

Inheritance diagram for ExManagerVertexArrays:

ExManager

Public Methods

void Reset (void)
void Init (void)
int RegisterArray (GLfloat *vertex, GLfloat *texture)
void DrawElements (GLint Start, GLsizei count)

Static Public Methods

ExManagerVertexArrays * CreateSingleton (void)

Private Methods

 ExManagerVertexArrays (void)
 ~ExManagerVertexArrays (void)

Private Attributes

PFNGLLOCKARRAYSEXTPROC glLockArraysEXT
PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT
GLfloat * m_Vertex
GLfloat * m_Texture

Static Private Attributes

bool m_flag = false
ExManagerVertexArrays * m_instance = NULL

Constructor & Destructor Documentation

ExManagerVertexArrays void    [private]
 

Definition at line 42 of file ExManagerVertexArrays.cpp.

00043 {
00044 }

~ExManagerVertexArrays void    [private]
 

Definition at line 46 of file ExManagerVertexArrays.cpp.

References m_flag.

00047 {
00048         m_flag =false;
00049 }


Member Function Documentation

ExManagerVertexArrays * CreateSingleton void    [static]
 

Definition at line 28 of file ExManagerVertexArrays.cpp.

References CreateSingleton(), Guard, m_flag, and m_instance.

Referenced by CreateSingleton(), and main().

00028                                                                  {
00029 Guard(ExManagerVertexArrays* ExManagerVertexArrays::CreateSingleton(void))
00030         if(!m_flag)
00031         {
00032                 m_flag = true; // We are creating the error log now, so set flag to true
00033                 m_instance = new ExManagerVertexArrays; // Create the error log
00034         }else
00035         {
00036                 std::cout<<"Error singleton already created"<<std::endl;
00037         }
00038         return m_instance; 
00039 UnGuard
00040 }

void DrawElements GLint    Start,
GLsizei    count
 

Definition at line 93 of file ExManagerVertexArrays.cpp.

References Guard.

00094 {
00095 Guard(void ExManagerVertexArrays::ExManagerVertexArrays::DrawElements(GLint Start,GLsizei count))
00096         glDrawArrays(GL_LINE_STRIP,Start,count);        
00097         //std::cout<<"ploouf"<<std::endl;
00098 UnGuard
00099 }

void Init void    [virtual]
 

Reimplemented from ExManager.

Definition at line 57 of file ExManagerVertexArrays.cpp.

References ExManager::Consol, glLockArraysEXT, glUnlockArraysEXT, Guard, and Init().

Referenced by Init(), and InitManager().

00058 {
00059 Guard(void ExManagerVertexArrays::Init(void))
00060         glLockArraysEXT = NULL;
00061         glUnlockArraysEXT = NULL;
00062         char *extList = (char *) glGetString(GL_EXTENSIONS);
00063         //checking for compiled vertex array
00064         if(extList && strstr(extList,"GL_EXT_compiled_vertex_array"))
00065         {
00066                 #ifdef UNIX_SRC
00067                 #else
00068                         glLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC) wglGetProcAddress("glLockArraysEXT");
00069                         glUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC) wglGetProcAddress("glUnLockArraysEXT");
00070                 #endif
00071                 //glEnableClientState ( GL_VERTEX_ARRAY );
00072                 //glEnableClientState ( GL_TEXTURE_COORD_ARRAY );
00073         }
00074         if(glLockArraysEXT = NULL){ *Consol<<"OpenGl glLockArraysEXT extension missing"<<std::endl; return;}
00075         if(glUnlockArraysEXT = NULL){ *Consol<<"OpenGl glUnlockArraysEXT extension missing"<<std::endl; return;}
00076         *Consol<<"ExManagerVertexArrays::GL_EXT_compiled_vertex_array found and enable"<<std::endl;
00077 UnGuard
00078 }

int RegisterArray GLfloat *    vertex,
GLfloat *    texture
 

Definition at line 80 of file ExManagerVertexArrays.cpp.

References Guard, m_Texture, m_Vertex, and RegisterArray().

Referenced by RegisterArray().

00081 {
00082 Guard(void ExManagerVertexArrays::RegisterArray(GLfloat *vertex,GLfloat *texture))
00083         GLint x=0;
00084         m_Texture=texture;
00085         m_Vertex=vertex;
00086         glVertexPointer(3, GL_FLOAT, 0, m_Vertex);
00087         //glTexCoordPointer(2, GL_FLOAT, 0, m_Texture);
00088         std::cout<<x<<std::endl;
00089         return x;
00090 UnGuard
00091 }

void Reset void    [virtual]
 

Reimplemented from ExManager.

Definition at line 51 of file ExManagerVertexArrays.cpp.

References Guard, and Reset().

Referenced by Reset().

00052 {
00053 Guard(void ExManagerVertexArrays::Reset(void))
00054 UnGuard
00055 }


Field Documentation

PFNGLLOCKARRAYSEXTPROC glLockArraysEXT [private]
 

Definition at line 67 of file ExManagerVertexArrays.h.

Referenced by Init().

PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT [private]
 

Definition at line 68 of file ExManagerVertexArrays.h.

Referenced by Init().

bool m_flag = false [static, private]
 

Definition at line 25 of file ExManagerVertexArrays.cpp.

Referenced by CreateSingleton(), and ~ExManagerVertexArrays().

ExManagerVertexArrays * m_instance = NULL [static, private]
 

Definition at line 26 of file ExManagerVertexArrays.cpp.

Referenced by CreateSingleton().

GLfloat* m_Texture [private]
 

Definition at line 78 of file ExManagerVertexArrays.h.

Referenced by RegisterArray().

GLfloat* m_Vertex [private]
 

Definition at line 77 of file ExManagerVertexArrays.h.

Referenced by RegisterArray().


The documentation for this class was generated from the following files:
Generated on Tue Dec 10 18:20:45 2002 for ExNihilo by doxygen1.3-rc1