Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

r_model.cpp

Go to the documentation of this file.
00001 // OMICRON ENGINE HEADER FILE
00002 //
00003 // --------------------------------------------------------------------------
00004 // Copyright (C) 2001-2002 by Bjoern Paetzel <kolrabi@gmx.de>
00005 //
00006 // This file is part of the Omicron Engine.
00007 //
00008 // The Omicron Engine is free software; you can redistribute it and/or modify
00009 // it under the terms of the  GNU General Public License  as published by the
00010 // Free Software Foundation;  either version  2  of the License,  or (at your
00011 // option) any later version.
00012 //
00013 // The Omicron Engine  is distributed in the hope that it will be useful, but
00014 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00015 // or  FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License
00016 // for more details.
00017 //
00018 // You should have  received a copy of the  GNU General Public License  along
00019 // with The Omicron Engine;  if not,  write to the  Free Software Foundation,
00020 // Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
00021 //
00022 // --------------------------------------------------------------------------
00023 // Last modified:       $Date: 2002/12/07 19:02:05 $
00024 // By           :       $Author: kolrabi $
00025 // $Id: r_model.cpp,v 1.1.1.1 2002/12/07 19:02:05 kolrabi Exp $ 
00026 
00027 /*
00028 
00029   $Log: r_model.cpp,v $
00030   Revision 1.1.1.1  2002/12/07 19:02:05  kolrabi
00031   initial release
00032 
00033 
00034 */
00035 
00040 #include            "omicron/internal.h"
00041 #include            "omicron/file.h"
00042 #include            "omicron/render.h"
00043 #include            "omicron/model.h"
00044 
00045 /**************************************************************************** 
00046  **************************************************************************** 
00047  * MODEL ROUTINES************************************************************ 
00048  **************************************************************************** 
00049  ****************************************************************************/ 
00050 
00051 void model_c::draw()
00052 {
00053     AssertThis;
00054 
00055     AssertReturn1(drawvertices);
00056 
00057     gv.renderer->use_shader(shader);
00058     gv.renderer->render_verts(drawvertices, drawvertcount, PT_TRIANGLES);
00059 }
00060 
00061 void model_c::set_shader(struct shader_s *s)
00062 {
00063     AssertThis;
00064 
00065     shader = s;
00066 }
00067 
00068 struct shader_s *model_c::get_shader()
00069 {
00070     AssertThisV;
00071 
00072     return shader;
00073 }

Generated on Wed Dec 18 15:48:47 2002 for omicron engine by doxygen1.2.18