Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
82c5a51b
Commit
82c5a51b
authored
May 10, 2013
by
Robert Menzel
Browse files
VertexArrayObjectControlFile can load arbitrary meshes but will get marked deprecated soon
parent
181fc1ce
Changes
3
Show whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller/GeometryDataControlFileOBJ.hh
View file @
82c5a51b
...
@@ -22,16 +22,16 @@ namespace OpenGL{
...
@@ -22,16 +22,16 @@ namespace OpenGL{
class
GeometryDataControlFileATB
;
class
GeometryDataControlFileATB
;
class
GeometryDataControlFile
OBJ
:
public
ACGL
::
OpenGL
::
GeometryDataControlFile
class
GeometryDataControlFile
Mesh
:
public
ACGL
::
OpenGL
::
GeometryDataControlFile
{
{
friend
void
initStaticFileTypes
(
void
);
friend
void
initStaticFileTypes
(
void
);
friend
class
GeometryDataControlFileATB
;
friend
class
GeometryDataControlFileATB
;
public:
public:
GeometryDataControlFile
OBJ
(
const
std
::
string
&
_filename
)
:
GeometryDataControlFile
(
_filename
,
Base
::
Settings
::
the
()
->
getFullGeometryPath
())
{}
GeometryDataControlFile
Mesh
(
const
std
::
string
&
_filename
)
:
GeometryDataControlFile
(
_filename
,
Base
::
Settings
::
the
()
->
getFullGeometryPath
())
{}
virtual
~
GeometryDataControlFile
OBJ
(
void
)
{}
virtual
~
GeometryDataControlFile
Mesh
(
void
)
{}
// the entry point that gets registered in registerType()
// the entry point that gets registered in registerType()
static
SharedGeometryDataControlFile
creator
(
const
std
::
string
&
_filename
)
{
return
SharedGeometryDataControlFile
(
new
GeometryDataControlFile
OBJ
(
_filename
));
}
static
SharedGeometryDataControlFile
creator
(
const
std
::
string
&
_filename
)
{
return
SharedGeometryDataControlFile
(
new
GeometryDataControlFile
Mesh
(
_filename
));
}
private:
private:
virtual
bool
load
(
SharedGeometryData
&
geometry
)
const
;
virtual
bool
load
(
SharedGeometryData
&
geometry
)
const
;
...
@@ -39,13 +39,14 @@ private:
...
@@ -39,13 +39,14 @@ private:
// register the file extension 'obj' for this loader
// register the file extension 'obj' for this loader
static
ACGL
::
int_t
registerType
(
void
)
static
ACGL
::
int_t
registerType
(
void
)
{
{
sTypeID
=
GeometryDataControlFileFactory
::
the
()
->
registerType
(
"obj"
,
&
GeometryDataControlFileOBJ
::
creator
);
sTypeID
=
GeometryDataControlFileFactory
::
the
()
->
registerType
(
"obj"
,
&
GeometryDataControlFileMesh
::
creator
);
sTypeID
=
GeometryDataControlFileFactory
::
the
()
->
registerType
(
"vap"
,
&
GeometryDataControlFileMesh
::
creator
);
return
sTypeID
;
return
sTypeID
;
}
}
};
};
ACGL_SMARTPOINTER_TYPEDEFS
(
GeometryDataControlFile
OBJ
)
ACGL_SMARTPOINTER_TYPEDEFS
(
GeometryDataControlFile
Mesh
)
}
// OpenGL
}
// OpenGL
}
// ACGL
}
// ACGL
...
...
src/ACGL/OpenGL/Controller/GeometryDataControlFileOBJ.cc
View file @
82c5a51b
...
@@ -21,9 +21,9 @@ using namespace ACGL::OpenGL;
...
@@ -21,9 +21,9 @@ using namespace ACGL::OpenGL;
using
namespace
ACGL
::
Utils
;
using
namespace
ACGL
::
Utils
;
using
namespace
ACGL
::
Base
;
using
namespace
ACGL
::
Base
;
bool
GeometryDataControlFile
OBJ
::
load
(
SharedGeometryData
&
geometry
)
const
bool
GeometryDataControlFile
Mesh
::
load
(
SharedGeometryData
&
geometry
)
const
{
{
geometry
=
loadGeometryData
FromOBJ
(
getFullFilePath
());
geometry
=
loadGeometryData
(
getFullFilePath
());
if
(
geometry
)
if
(
geometry
)
return
true
;
return
true
;
else
else
...
...
src/ACGL/OpenGL/InitStaticFileTypes.cc
View file @
82c5a51b
...
@@ -30,7 +30,7 @@ void ACGL::OpenGL::initStaticFileTypes(void)
...
@@ -30,7 +30,7 @@ void ACGL::OpenGL::initStaticFileTypes(void)
//
//
// Geometry, Meshes, Vertex data
// Geometry, Meshes, Vertex data
//
//
GeometryDataControlFile
OBJ
::
registerType
();
GeometryDataControlFile
Mesh
::
registerType
();
GeometryDataControlFileATB
::
registerType
();
GeometryDataControlFileATB
::
registerType
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment