Skip to content

Commit

Permalink
Client|Renderer: Added ModelRenderer to oversee GL2 model rendering
Browse files Browse the repository at this point in the history
Work in progress: ModelRenderer owns the ModelDrawable instances
needed for drawing objects using 3D models. All available models are
loaded into memory when the assets become available. GL resources will
be allocated later, when the models need to be drawn.

"net.dengine.client.testmodel" contains a couple of test models for
development purposes.
  • Loading branch information
skyjake committed Jul 18, 2014
1 parent c13bc69 commit 4d4aed4
Show file tree
Hide file tree
Showing 14 changed files with 8,748 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doomsday/client/client.pro
Expand Up @@ -284,6 +284,7 @@ DENG_HEADERS += \
include/render/lightgrid.h \
include/render/lumobj.h \
include/render/materialcontext.h \
include/render/modelrenderer.h \
include/render/projector.h \
include/render/r_draw.h \
include/render/r_main.h \
Expand Down Expand Up @@ -598,6 +599,7 @@ SOURCES += \
src/render/lightdecoration.cpp \
src/render/lightgrid.cpp \
src/render/lumobj.cpp \
src/render/modelrenderer.cpp \
src/render/projector.cpp \
src/render/r_draw.cpp \
src/render/r_fakeradio.cpp \
Expand Down
39 changes: 39 additions & 0 deletions doomsday/client/include/render/modelrenderer.h
@@ -0,0 +1,39 @@
/** @file modelrenderer.h Model renderer.
*
* @authors Copyright (c) 2014 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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 General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef DENG_CLIENT_MODELRENDERER_H
#define DENG_CLIENT_MODELRENDERER_H

#include <de/ModelDrawable>

/**
* The model renderer prepares available model assets for drawing (using ModelDrawable),
* and keeps the set of needed ModelDrawable instances in memory.
*
* @ingroup render
*/
class ModelRenderer
{
public:
ModelRenderer();

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_MODELRENDERER_H
8 changes: 8 additions & 0 deletions doomsday/client/net.dengine.client.pack/testmodel.pack/Info
@@ -0,0 +1,8 @@
title: Test Model
version: 1.0
license: GPL 3+
tags: dev

asset model.thing.possessed {
path = "boblampclean.md5mesh"
}
Binary file not shown.
5,263 changes: 5,263 additions & 0 deletions doomsday/client/net.dengine.client.pack/testmodel.pack/boblampclean.md5anim

Large diffs are not rendered by default.

0 comments on commit 4d4aed4

Please sign in to comment.