Commit 88fba7cc authored by Eric Bruneton's avatar Eric Bruneton
Browse files

added minLod and maxLod as allowed xml parameters for textures

added getIndice method in Mesh

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/ork/trunk@19 28599a00-4e59-401b-b2d8-d34d4661a6c9
parent a9bdb75c
......@@ -95,6 +95,13 @@ public:
*/
inline int getIndiceCount() const;
/**
* Returns an indice of this mesh.
*
* @param i an indice index.
*/
inline index getIndice(int i) const;
/**
* Returns the vertex index used for primitive restart. -1 means no restart.
*/
......@@ -359,6 +366,12 @@ int Mesh<vertex, index>::getIndiceCount() const
return indicesCount;
}
template<class vertex, class index>
index Mesh<vertex, index>::getIndice(int i) const
{
return indices[i];
}
template<class vertex, class index>
GLint Mesh<vertex, index>::getPrimitiveRestart() const
{
......
......@@ -130,7 +130,7 @@ public:
Buffer::Parameters s;
int w;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,width,height,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,minLod,maxLod,width,height,");
getIntParameter(desc, e, "width", &w);
getParameters(desc, e, tf, f, t);
getParameters(desc, e, params);
......
......@@ -138,7 +138,7 @@ public:
int w;
int l;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,width,height,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,minLod,maxLod,width,height,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &l);
getParameters(desc, e, tf, f, t);
......
......@@ -154,7 +154,7 @@ public:
int w;
int h;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,compare,borderType,borderr,borderg,borderb,bordera,maxAniso,width,height,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,minLod,maxLod,compare,borderType,borderr,borderg,borderb,bordera,maxAniso,width,height,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &h);
getParameters(desc, e, tf, f, t);
......
......@@ -150,7 +150,7 @@ public:
int h;
int l;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,compare,borderType,borderr,borderg,borderb,bordera,maxAniso,width,height,depth,layers,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,minLod,maxLod,compare,borderType,borderr,borderg,borderb,bordera,maxAniso,width,height,depth,layers,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &h);
if (e->Attribute("depth") != NULL) {
......
......@@ -148,7 +148,7 @@ public:
int h;
int d;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,wrapr,width,height,depth,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,wrapr,minLod,maxLod,width,height,depth,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &h);
getIntParameter(desc, e, "depth", &d);
......
......@@ -162,7 +162,7 @@ public:
int w;
int h;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,width,height,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,minLod,maxLod,width,height,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &h);
if (h != 6 * w) {
......
......@@ -127,7 +127,7 @@ public:
int w;
int h;
try {
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,width,height,");
checkParameters(desc, e, "name,source,internalformat,format,type,min,mag,wraps,wrapt,minLod,maxLod,width,height,");
getIntParameter(desc, e, "width", &w);
getIntParameter(desc, e, "height", &h);
if (h % (6 * w) != 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment