Added stubs for GLSL program classes.
--HG-- branch : gsoc2013-dfighterhg/feature/gsoc2013-dfighter
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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue