Added stubs for GLSL program classes.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent f387256984
commit ed5741addd

@ -0,0 +1,36 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "driver_glsl_pixel_program.h"
#include "stdopengl.h"
#include "driver_opengl_extension.h"
namespace NL3D
{
CGLSLPixelProgram::CGLSLPixelProgram()
{
shaderId = nglCreateShader( GL_FRAGMENT_SHADER );
nlassert( shaderId != 0 );
}
CGLSLPixelProgram::~CGLSLPixelProgram()
{
nglDeleteShader( shaderId );
}
}

@ -0,0 +1,36 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GLSL_PIXEL_PROGRAM_H
#define GLSL_PIXEL_PROGRAM_H
namespace NL3D
{
class CGLSLPixelProgram
{
public:
CGLSLPixelProgram();
~CGLSLPixelProgram();
unsigned int getShaderId() const{ return shaderId; }
private:
unsigned int shaderId;
};
}
#endif

@ -0,0 +1,38 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "driver_glsl_program.h"
#include "stdopengl.h"
#include "driver_opengl_extension.h"
namespace NL3D
{
CGLSLProgram::CGLSLProgram()
{
programId = nglCreateProgram();
nlassert( programId != 0 );
}
CGLSLProgram::~CGLSLProgram()
{
nglDeleteProgram( programId );
programId = 0;
}
}

@ -0,0 +1,37 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GLSL_PROGRAM_H
#define GLSL_PROGRAM_H
namespace NL3D
{
class CGLSLProgram
{
public:
CGLSLProgram();
~CGLSLProgram();
unsigned int getProgramId() const{ return programId; }
private:
unsigned int programId;
};
}
#endif

@ -0,0 +1,34 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "driver_glsl_vertex_program.h"
#include "stdopengl.h"
#include "driver_opengl_extension.h"
namespace NL3D
{
CGLSLVertexProgram::CGLSLVertexProgram()
{
shaderId = nglCreateShader( GL_VERTEX_SHADER );
nlassert( shaderId != 0 );
}
CGLSLVertexProgram::~CGLSLVertexProgram()
{
nglDeleteShader( shaderId );
}
}

@ -0,0 +1,38 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GLSL_VERTEX_PROGRAM_H
#define GLSL_VERTEX_PROGRAM_H
namespace NL3D
{
class CGLSLVertexProgram
{
public:
CGLSLVertexProgram();
~CGLSLVertexProgram();
unsigned int getShaderId() const{ return shaderId; }
private:
unsigned int shaderId;
};
}
#endif

@ -268,6 +268,7 @@ PFNGLDELETESHADERPROC nglDeleteShader;
PFNGLDETACHSHADERPROC nglDetachShader;
PFNGLDISABLEVERTEXATTRIBARRAYPROC nglDisableVertexAttribArray;
PFNGLENABLEVERTEXATTRIBARRAYPROC nglEnableVertexAttribArray;
PFNGLGETATTACHEDSHADERSPROC nglGetAttachedShaders;
PFNGLGETPROGRAMIVPROC nglGetProgramiv;
PFNGLGETPROGRAMINFOLOGPROC nglGetProgramInfoLog;
PFNGLGETSHADERIVPROC nglGetShaderiv;
@ -929,6 +930,7 @@ static bool setupGLSL( const char *glext )
CHECK_ADDRESS( PFNGLDETACHSHADERPROC, glDetachShader );
CHECK_ADDRESS( PFNGLDISABLEVERTEXATTRIBARRAYPROC, glDisableVertexAttribArray );
CHECK_ADDRESS( PFNGLENABLEVERTEXATTRIBARRAYPROC, glEnableVertexAttribArray );
CHECK_ADDRESS( PFNGLGETATTACHEDSHADERSPROC, glGetAttachedShaders );
CHECK_ADDRESS( PFNGLGETPROGRAMIVPROC, glGetProgramiv );
CHECK_ADDRESS( PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog );
CHECK_ADDRESS( PFNGLGETSHADERIVPROC, glGetShaderiv );

@ -438,6 +438,7 @@ extern PFNGLDELETESHADERPROC nglDeleteShader;
extern PFNGLDETACHSHADERPROC nglDetachShader;
extern PFNGLDISABLEVERTEXATTRIBARRAYPROC nglDisableVertexAttribArray;
extern PFNGLENABLEVERTEXATTRIBARRAYPROC nglEnableVertexAttribArray;
extern PFNGLGETATTACHEDSHADERSPROC nglGetAttachedShaders;
extern PFNGLGETPROGRAMIVPROC nglGetProgramiv;
extern PFNGLGETPROGRAMINFOLOGPROC nglGetProgramInfoLog;
extern PFNGLGETSHADERIVPROC nglGetShaderiv;

Loading…
Cancel
Save