Panda3D
Loading...
Searching...
No Matches
shader.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file shader.h
10 * @author jyelon
11 * @date 2005-09-01
12 * @author fperazzi, PandaSE
13 * @date 2010-04-29
14 */
15
16#ifndef SHADER_H
17#define SHADER_H
18
19#include "pandabase.h"
20#include "config_gobj.h"
22#include "namable.h"
24#include "internalName.h"
25#include "pta_int.h"
26#include "pta_float.h"
27#include "pta_double.h"
28#include "pta_stdfloat.h"
29#include "pta_LMatrix4.h"
30#include "pta_LMatrix3.h"
31#include "pta_LVecBase4.h"
32#include "pta_LVecBase3.h"
33#include "pta_LVecBase2.h"
34#include "epvector.h"
35#include "asyncFuture.h"
36#include "bamCacheRecord.h"
37
38#ifdef HAVE_CG
39// I don't want to include the Cg header file into panda as a whole. Instead,
40// I'll just excerpt some opaque declarations.
41typedef struct _CGcontext *CGcontext;
42typedef struct _CGprogram *CGprogram;
43typedef struct _CGparameter *CGparameter;
44#endif
45
46/**
47
48 */
49class EXPCL_PANDA_GOBJ Shader : public TypedWritableReferenceCount {
50PUBLISHED:
51 enum ShaderLanguage {
52 SL_none,
53 SL_Cg,
54 SL_GLSL,
55 SL_HLSL,
56 SL_SPIR_V,
57 };
58
59 enum ShaderType {
60 ST_none = 0,
61 ST_vertex,
62 ST_fragment,
63 ST_geometry,
64 ST_tess_control,
65 ST_tess_evaluation,
66 ST_compute,
67 ST_COUNT
68 };
69
70 enum AutoShaderSwitch {
71 AS_normal = 0x01,
72 AS_glow = 0x02,
73 AS_gloss = 0x04,
74 AS_ramp = 0x08,
75 AS_shadow = 0x10,
76 };
77
78 enum AutoShaderBit {
79 bit_AutoShaderNormal = 0, // bit for AS_normal
80 bit_AutoShaderGlow = 1, // bit for AS_glow
81 bit_AutoShaderGloss = 2, // bit for AS_gloss
82 bit_AutoShaderRamp = 3, // bit for AS_ramp
83 bit_AutoShaderShadow = 4, // bit for AS_shadow
84 };
85
86 static PT(Shader) load(const Filename &file, ShaderLanguage lang = SL_none);
87 static PT(Shader) make(std::string body, ShaderLanguage lang = SL_none);
88 static PT(Shader) load(ShaderLanguage lang,
89 const Filename &vertex, const Filename &fragment,
90 const Filename &geometry = "",
91 const Filename &tess_control = "",
92 const Filename &tess_evaluation = "");
93 static PT(Shader) load_compute(ShaderLanguage lang, const Filename &fn);
94 static PT(Shader) make(ShaderLanguage lang,
95 std::string vertex, std::string fragment,
96 std::string geometry = "",
97 std::string tess_control = "",
98 std::string tess_evaluation = "");
99 static PT(Shader) make_compute(ShaderLanguage lang, std::string body);
100
101 INLINE Filename get_filename(ShaderType type = ST_none) const;
102 INLINE void set_filename(ShaderType type, const Filename &filename);
103 INLINE const std::string &get_text(ShaderType type = ST_none) const;
104 INLINE bool get_error_flag() const;
105 INLINE ShaderLanguage get_language() const;
106
107 INLINE bool has_fullpath() const;
108 INLINE const Filename &get_fullpath() const;
109
110 INLINE bool get_cache_compiled_shader() const;
111 INLINE void set_cache_compiled_shader(bool flag);
112
113 PT(AsyncFuture) prepare(PreparedGraphicsObjects *prepared_objects);
114 bool is_prepared(PreparedGraphicsObjects *prepared_objects) const;
115 bool release(PreparedGraphicsObjects *prepared_objects);
116 int release_all();
117
118 ShaderContext *prepare_now(PreparedGraphicsObjects *prepared_objects,
120
121public:
122 enum ShaderMatInput {
123 SMO_identity,
124
125 SMO_window_size,
126 SMO_pixel_size,
127 SMO_texpad_x,
128 SMO_texpix_x,
129
130 SMO_attr_material,
131 SMO_attr_color,
132 SMO_attr_colorscale,
133
134 SMO_alight_x,
135 SMO_dlight_x,
136 SMO_plight_x,
137 SMO_slight_x,
138 SMO_satten_x,
139 SMO_texmat_i,
140 SMO_plane_x,
141 SMO_clipplane_x,
142
143 SMO_mat_constant_x,
144 SMO_vec_constant_x,
145
146 SMO_world_to_view,
147 SMO_view_to_world,
148
149 SMO_model_to_view,
150 SMO_view_to_model,
151
152 SMO_apiview_to_view,
153 SMO_view_to_apiview,
154
155 SMO_clip_to_view,
156 SMO_view_to_clip,
157
158 SMO_apiclip_to_view,
159 SMO_view_to_apiclip,
160
161 SMO_view_x_to_view,
162 SMO_view_to_view_x,
163
164 SMO_apiview_x_to_view,
165 SMO_view_to_apiview_x,
166
167 SMO_clip_x_to_view,
168 SMO_view_to_clip_x,
169
170 SMO_apiclip_x_to_view,
171 SMO_view_to_apiclip_x,
172
173 SMO_attr_fog,
174 SMO_attr_fogcolor,
175
176 SMO_frame_number,
177 SMO_frame_time,
178 SMO_frame_delta,
179
180 SMO_mat_constant_x_attrib,
181 SMO_vec_constant_x_attrib,
182
183 SMO_light_ambient,
184 SMO_light_source_i_attrib,
185
186 SMO_light_product_i_ambient,
187 SMO_light_product_i_diffuse,
188 SMO_light_product_i_specular,
189
190 // SMO_clipplane_x is world coords, GLSL needs eye coords
191 SMO_apiview_clipplane_i,
192
193 SMO_model_to_apiview,
194 SMO_apiview_to_model,
195 SMO_apiview_to_apiclip,
196 SMO_apiclip_to_apiview,
197
198 SMO_inv_texmat_i,
199
200 // Additional properties for PBR materials
201 SMO_attr_material2,
202
203 // Hack for text rendering. Don't use in user shaders.
204 SMO_tex_is_alpha_i,
205
206 SMO_transform_i,
207 SMO_slider_i,
208
209 SMO_light_source_i_packed,
210
211 // Texture scale component of texture matrix.
212 SMO_texscale_i,
213
214 // Color of an M_blend texture stage.
215 SMO_texcolor_i,
216
217 // Constant value of the TexGenAttrib of stage i.
218 SMO_texconst_i,
219
220 // Point parameters
221 SMO_attr_pointparams,
222
223 SMO_INVALID
224 };
225
226 enum ShaderTexInput {
227 STO_INVALID,
228
229 STO_named_input,
230 STO_named_stage,
231
232 STO_stage_i,
233 STO_light_i_shadow_map,
234
235 STO_ff_stage_i,
236 STO_stage_modulate_i,
237 STO_stage_add_i,
238 STO_stage_normal_i,
239 STO_stage_height_i,
240 STO_stage_selector_i,
241 STO_stage_gloss_i,
242 STO_stage_emission_i,
243 };
244
245 enum ShaderArgClass {
246 SAC_scalar,
247 SAC_vector,
248 SAC_matrix,
249 SAC_sampler,
250 SAC_array,
251 SAC_unknown,
252 };
253
254 enum ShaderArgType {
255 SAT_scalar,
256 SAT_vec1,
257 SAT_vec2,
258 SAT_vec3,
259 SAT_vec4,
260 SAT_mat1x1,
261 SAT_mat1x2,
262 SAT_mat1x3,
263 SAT_mat1x4,
264 SAT_mat2x1,
265 SAT_mat2x2,
266 SAT_mat2x3,
267 SAT_mat2x4,
268 SAT_mat3x1,
269 SAT_mat3x2,
270 SAT_mat3x3,
271 SAT_mat3x4,
272 SAT_mat4x1,
273 SAT_mat4x2,
274 SAT_mat4x3,
275 SAT_mat4x4,
276 SAT_sampler1d,
277 SAT_sampler2d,
278 SAT_sampler3d,
279 SAT_sampler2d_array,
280 SAT_sampler_cube,
281 SAT_sampler_buffer,
282 SAT_sampler_cube_array,
283 SAT_sampler1d_array,
284 SAT_unknown
285};
286
287 enum ShaderArgDir {
288 SAD_in,
289 SAD_out,
290 SAD_inout,
291 SAD_unknown,
292 };
293
294 enum ShaderMatPiece {
295 SMP_whole,
296 SMP_transpose,
297 SMP_row0,
298 SMP_row1,
299 SMP_row2,
300 SMP_row3,
301 SMP_col0,
302 SMP_col1,
303 SMP_col2,
304 SMP_col3,
305 SMP_row3x1,
306 SMP_row3x2,
307 SMP_row3x3,
308 SMP_upper3x3,
309 SMP_transpose3x3,
310 SMP_cell15,
311 SMP_cell14,
312 SMP_cell13,
313 };
314
315 enum ShaderStateDep {
316 SSD_NONE = 0x000,
317 SSD_general = 0x001,
318 SSD_transform = 0x2002,
319 SSD_color = 0x004,
320 SSD_colorscale = 0x008,
321 SSD_material = 0x010,
322 SSD_shaderinputs = 0x020,
323 SSD_fog = 0x040,
324 SSD_light = 0x080,
325 SSD_clip_planes = 0x100,
326 SSD_tex_matrix = 0x200,
327 SSD_frame = 0x400,
328 SSD_projection = 0x800,
329 SSD_texture = 0x1000,
330 SSD_view_transform= 0x2000,
331 SSD_tex_gen = 0x4000,
332 SSD_render_mode = 0x8000,
333 };
334
335 enum ShaderBug {
336 SBUG_ati_draw_buffers,
337 };
338
339 enum ShaderMatFunc {
340 SMF_compose,
341 SMF_transform_dlight,
342 SMF_transform_plight,
343 SMF_transform_slight,
344 SMF_first,
345 };
346
347 struct ShaderArgId {
348 std::string _name;
349 ShaderType _type;
350 int _seqno;
351 };
352
353 enum ShaderPtrType {
354 SPT_float,
355 SPT_double,
356 SPT_int,
357 SPT_uint,
358 SPT_unknown
359 };
360
362 ShaderArgId _id;
363 ShaderArgClass _class;
364 ShaderArgClass _subclass;
365 ShaderArgType _type;
366 ShaderArgDir _direction;
367 bool _varying;
368 ShaderPtrType _numeric_type;
369 NotifyCategory *_cat;
370 };
371
372 // Container structure for data of parameters ShaderPtrSpec.
374 private:
375 PT(ReferenceCount) _pta;
376
377 public:
378 void *_ptr;
379 ShaderPtrType _type;
380 bool _updated;
381 size_t _size; //number of elements vec3[4]=12
382
383 public:
384 INLINE ShaderPtrData();
385 INLINE ShaderPtrData(const PTA_float &ptr);
386 INLINE ShaderPtrData(const PTA_LVecBase4f &ptr);
387 INLINE ShaderPtrData(const PTA_LVecBase3f &ptr);
388 INLINE ShaderPtrData(const PTA_LVecBase2f &ptr);
389 INLINE ShaderPtrData(const PTA_LMatrix4f &mat);
390 INLINE ShaderPtrData(const PTA_LMatrix3f &mat);
391 INLINE ShaderPtrData(const LVecBase4f &vec);
392 INLINE ShaderPtrData(const LVecBase3f &vec);
393 INLINE ShaderPtrData(const LVecBase2f &vec);
394 INLINE ShaderPtrData(const LMatrix4f &mat);
395 INLINE ShaderPtrData(const LMatrix3f &mat);
396
397 INLINE ShaderPtrData(const PTA_double &ptr);
398 INLINE ShaderPtrData(const PTA_LVecBase4d &ptr);
399 INLINE ShaderPtrData(const PTA_LVecBase3d &ptr);
400 INLINE ShaderPtrData(const PTA_LVecBase2d &ptr);
401 INLINE ShaderPtrData(const PTA_LMatrix4d &mat);
402 INLINE ShaderPtrData(const PTA_LMatrix3d &mat);
403 INLINE ShaderPtrData(const LVecBase4d &vec);
404 INLINE ShaderPtrData(const LVecBase3d &vec);
405 INLINE ShaderPtrData(const LVecBase2d &vec);
406 INLINE ShaderPtrData(const LMatrix4d &mat);
407 INLINE ShaderPtrData(const LMatrix3d &mat);
408
409 INLINE ShaderPtrData(const PTA_int &ptr);
410 INLINE ShaderPtrData(const PTA_LVecBase4i &ptr);
411 INLINE ShaderPtrData(const PTA_LVecBase3i &ptr);
412 INLINE ShaderPtrData(const PTA_LVecBase2i &ptr);
413 INLINE ShaderPtrData(const LVecBase4i &vec);
414 INLINE ShaderPtrData(const LVecBase3i &vec);
415 INLINE ShaderPtrData(const LVecBase2i &vec);
416
417 INLINE void write_datagram(Datagram &dg) const;
418 INLINE void read_datagram(DatagramIterator &source);
419 };
420
422 LMatrix4 _cache[2];
423 LMatrix4 _value;
424 ShaderArgId _id;
425 ShaderMatFunc _func;
426 ShaderMatInput _part[2];
427 PT(InternalName) _arg[2];
428 int _dep[2];
429 int _index;
430 ShaderMatPiece _piece;
431 };
432
434 ShaderArgId _id;
435 PT(InternalName) _name;
436 ShaderTexInput _part;
437 int _stage;
438 int _desired_type;
439 PT(InternalName) _suffix;
440 };
441
443 ShaderArgId _id;
444 PT(InternalName) _name;
445 int _append_uv;
446 int _elements;
447 ShaderPtrType _numeric_type;
448 };
449
451 ShaderArgId _id;
452 int _dim[3]; //n_elements,rows,cols
453 int _dep[2];
454 PT(InternalName) _arg;
455 ShaderArgInfo _info;
456 ShaderPtrType _type;
457 };
458
459 class EXPCL_PANDA_GOBJ ShaderCaps {
460 public:
461 void clear();
462 INLINE bool operator == (const ShaderCaps &other) const;
463 INLINE ShaderCaps();
464
465 public:
466 bool _supports_glsl;
467
468#ifdef HAVE_CG
469 int _active_vprofile;
470 int _active_fprofile;
471 int _active_gprofile;
472 int _active_tprofile;
473
474 int _ultimate_vprofile;
475 int _ultimate_fprofile;
476 int _ultimate_gprofile;
477 int _ultimate_tprofile;
478
479 pset <ShaderBug> _bug_list;
480#endif
481 };
482
483 class ShaderFile : public ReferenceCount {
484 public:
485 INLINE ShaderFile() {};
486 INLINE ShaderFile(std::string shared);
487 INLINE ShaderFile(std::string vertex, std::string fragment, std::string geometry,
488 std::string tess_control, std::string tess_evaluation);
489
490 INLINE void write_datagram(Datagram &dg) const;
491 INLINE void read_datagram(DatagramIterator &source);
492
493 INLINE bool operator < (const ShaderFile &other) const;
494
495 public:
496 bool _separate;
497 std::string _shared;
498 std::string _vertex;
499 std::string _fragment;
500 std::string _geometry;
501 std::string _tess_control;
502 std::string _tess_evaluation;
503 std::string _compute;
504 };
505
506public:
507 // These routines help split the shader into sections, for those shader
508 // implementations that need to do so. Don't use them when you use separate
509 // shader programs.
510 void parse_init();
511 void parse_line(std::string &result, bool rt, bool lt);
512 void parse_upto(std::string &result, std::string pattern, bool include);
513 void parse_rest(std::string &result);
514 bool parse_eof();
515
516 void cp_report_error(ShaderArgInfo &arg, const std::string &msg);
517 bool cp_errchk_parameter_words(ShaderArgInfo &arg, int len);
518 bool cp_errchk_parameter_in(ShaderArgInfo &arg);
519 bool cp_errchk_parameter_ptr(ShaderArgInfo &p);
520 bool cp_errchk_parameter_varying(ShaderArgInfo &arg);
521 bool cp_errchk_parameter_uniform(ShaderArgInfo &arg);
522 bool cp_errchk_parameter_float(ShaderArgInfo &arg, int lo, int hi);
523 bool cp_errchk_parameter_sampler(ShaderArgInfo &arg);
524 bool cp_parse_eol(ShaderArgInfo &arg,
525 vector_string &pieces, int &next);
526 bool cp_parse_delimiter(ShaderArgInfo &arg,
527 vector_string &pieces, int &next);
528 std::string cp_parse_non_delimiter(vector_string &pieces, int &next);
529 bool cp_parse_coord_sys(ShaderArgInfo &arg,
530 vector_string &pieces, int &next,
531 ShaderMatSpec &spec, bool fromflag);
532 int cp_dependency(ShaderMatInput inp);
533 void cp_optimize_mat_spec(ShaderMatSpec &spec);
534
535#ifdef HAVE_CG
536 void cg_recurse_parameters(CGparameter parameter,
537 const ShaderType &type,
538 bool &success);
539#endif
540
541 bool compile_parameter(ShaderArgInfo &p, int *arg_dim);
542
543 void clear_parameters();
544
545 void set_compiled(unsigned int format, const char *data, size_t length);
546 bool get_compiled(unsigned int &format, std::string &binary) const;
547
548 static void set_default_caps(const ShaderCaps &caps);
549
550private:
551#ifdef HAVE_CG
552 ShaderArgClass cg_parameter_class(CGparameter p);
553 ShaderArgType cg_parameter_type(CGparameter p);
554 ShaderArgDir cg_parameter_dir(CGparameter p);
555
556 CGprogram cg_compile_entry_point(const char *entry, const ShaderCaps &caps,
557 CGcontext context, ShaderType type);
558
559 bool cg_analyze_entry_point(CGprogram prog, ShaderType type);
560
561 bool cg_analyze_shader(const ShaderCaps &caps);
562 bool cg_compile_shader(const ShaderCaps &caps, CGcontext context);
563 void cg_release_resources();
564 void cg_report_errors();
565
566 // Determines the appropriate cg profile settings and stores them in the
567 // active shader caps based on any profile settings stored in the shader's
568 // header
569 void cg_get_profile_from_header(ShaderCaps &caps);
570
571 ShaderCaps _cg_last_caps;
572 static CGcontext _cg_context;
573 CGprogram _cg_vprogram;
574 CGprogram _cg_fprogram;
575 CGprogram _cg_gprogram;
576
577 int _cg_vprofile;
578 int _cg_fprofile;
579 int _cg_gprofile;
580
581 CGprogram cg_program_from_shadertype(ShaderType type);
582
583public:
584 bool cg_compile_for(const ShaderCaps &caps, CGcontext context,
585 CGprogram &combined_program, pvector<CGparameter> &map);
586
587#endif
588
589public:
590 pvector<ShaderPtrSpec> _ptr_spec;
591 epvector<ShaderMatSpec> _mat_spec;
592 pvector<ShaderTexSpec> _tex_spec;
593 pvector<ShaderVarSpec> _var_spec;
594 int _mat_deps;
595
596 bool _error_flag;
597 ShaderFile _text;
598
599protected:
600 ShaderFile _filename;
601 Filename _fullpath;
602 int _parse;
603 bool _loaded;
604 ShaderLanguage _language;
605
607 Filenames _included_files;
608
609 // Stores full paths, and includes the fullpaths of the shaders themselves
610 // as well as the includes.
611 Filenames _source_files;
612 time_t _last_modified;
613
614 PT(BamCacheRecord) _record;
615 bool _cache_compiled_shader;
616 unsigned int _compiled_format;
617 std::string _compiled_binary;
618
619 static ShaderCaps _default_caps;
620 static int _shaders_generated;
621
622 typedef pmap<ShaderFile, PT(Shader)> ShaderTable;
623
624 static ShaderTable _load_table;
625 static ShaderTable _make_table;
626
627 friend class ShaderContext;
628 friend class PreparedGraphicsObjects;
629
630 typedef pmap <PreparedGraphicsObjects *, ShaderContext *> Contexts;
631 Contexts _contexts;
632
633private:
634 void clear_prepared(PreparedGraphicsObjects *prepared_objects);
635
636 Shader(ShaderLanguage lang);
637
638 bool read(const ShaderFile &sfile, BamCacheRecord *record = nullptr);
639 bool load(const ShaderFile &sbody, BamCacheRecord *record = nullptr);
640 bool do_read_source(std::string &into, const Filename &fn, BamCacheRecord *record);
641 bool do_load_source(std::string &into, const std::string &source, BamCacheRecord *record);
642 bool r_preprocess_include(std::ostream &out, const Filename &fn,
643 const Filename &source_dir,
644 std::set<Filename> &open_files,
645 BamCacheRecord *record, int depth);
646 bool r_preprocess_source(std::ostream &out, std::istream &in,
647 const Filename &fn, const Filename &full_fn,
648 std::set<Filename> &open_files,
649 BamCacheRecord *record,
650 int fileno = 0, int depth = 0);
651
652 bool check_modified() const;
653
654public:
655 ~Shader();
656
657 Filename get_filename_from_index(int index, ShaderType type) const;
658
659public:
660 static void register_with_read_factory();
661 virtual void write_datagram(BamWriter *manager, Datagram &dg);
662
663protected:
664 static TypedWritable *make_from_bam(const FactoryParams &params);
665 void fillin(DatagramIterator &scan, BamReader *manager);
666
667public:
668 static TypeHandle get_class_type() {
669 return _type_handle;
670 }
671 static void init_type() {
672 TypedWritableReferenceCount::init_type();
673 register_type(_type_handle, "Shader",
674 TypedWritableReferenceCount::get_class_type());
675 }
676 virtual TypeHandle get_type() const {
677 return get_class_type();
678 }
679 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
680
681private:
682 static TypeHandle _type_handle;
683};
684
685#include "shader.I"
686
687#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class represents a thread-safe handle to a promised future result of an asynchronous operation,...
Definition asyncFuture.h:61
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition bamReader.h:110
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition bamWriter.h:63
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition datagram.h:38
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
Encodes a string name in a hash table, mapping it to a pointer.
A particular category of error messages.
A table of objects that are saved within the graphics context for reference by handle later.
A base class for all things that want to be reference-counted.
The ShaderContext is meant to contain the compiled version of a shader string.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
Base class for objects that can be written to and read from Bam files.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.