Cortex  10.0.0-a4
GR_Cortex.h
1 //
3 // Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
4 // its affiliates and/or its licensors.
5 //
6 // Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // * Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 //
19 // * Neither the name of Image Engine Design nor the names of any
20 // other contributors to this software may be used to endorse or
21 // promote products derived from this software without specific prior
22 // written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
25 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
37 
40 #include "UT/UT_Version.h"
41 #if UT_MAJOR_VERSION_INT >= 12 && UT_MINOR_VERSION_INT <= 1
42 
43 #ifndef IECOREHOUDINI_GRCORTEX_H
44 #define IECOREHOUDINI_GRCORTEX_H
45 
46 #include "GR/GR_Detail.h"
47 #include "GR/GR_DisplayOption.h"
48 #include "GR/GR_RenderHook.h"
49 
50 #include "IECoreGL/GL.h"
51 #include "IECoreGL/IECoreGL.h"
52 #include "IECoreGL/Renderer.h"
53 
54 namespace IECoreHoudini
55 {
56 
59 class GR_Cortex : public GR_RenderHook
60 {
61 
62  public :
63 
64  GR_Cortex();
65  virtual ~GR_Cortex();
66 
68  virtual GA_PrimCompat::TypeMask getWireMask( GU_Detail *gdp, const GR_DisplayOption *dopt ) const;
69 
71  virtual GA_PrimCompat::TypeMask getShadedMask( GU_Detail *gdp, const GR_DisplayOption *dopt ) const;
72 
74  virtual void renderWire( GU_Detail *gdp, RE_Render &ren, const GR_AttribOffset &ptinfo, const GR_DisplayOption *dopt, float lod, const GU_PrimGroupClosure *hidden_geometry );
75 
77  virtual void renderShaded( GU_Detail *gdp, RE_Render &ren, const GR_AttribOffset &ptinfo, const GR_DisplayOption *dopt, float lod, const GU_PrimGroupClosure *hidden_geometry );
78 
80  void render( GU_Detail *gdp, const IECoreGL::State *displayState );
81  void renderObject( const IECore::Object *object, const IECoreGL::State *displayState );
82 
84  virtual const char *getName() const
85  {
86  return "IECoreHoudini::GR_Cortex";
87  }
88 
89  private :
90 
93  IECoreGL::ConstStatePtr getDisplayState( const GR_DisplayOption *dopt, bool wireframe=false );
94 
95 };
96 
97 } // namespace IECoreHoudini
98 
99 #endif // IECOREHOUDINI_GRCORTEX_H
100 
101 #endif // 12.1 or earlier
The IECoreHoudini namespace holds all the functionality of libIECoreHoudini.
Definition: CoreHoudini.h:51
Definition: Object.h:104