VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTextureInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtFileCache.h>
14 
16 
17 #include <vrvMath/DtVector4.h>
18 
19 namespace makVrv
20 {
21  class DtDe;
22 
25  {
26  public:
29 
31  virtual ~DtTextureInterface();
32 
34  DtTextureInterface( const DtTextureInterface& ) = delete;
35 
37  DtTextureInterface & operator=( const DtTextureInterface& ) = delete;
38 
39  public:
44  virtual bool loadTextureFromFile( const std::string& fileName ) = 0;
45  virtual bool loadTextureFromFile( const std::string& fileName,
46  const DtFileCache::LoadFileOptions& loadFileOptions ) = 0;
47 
50  virtual const std::string& filename() const = 0;
51 
52  virtual float textureWidth() const = 0;
53 
54  virtual void scaleTexture( int w, int h ) = 0;
55 
57  virtual bool getStipplePattern(char** stipplePattern) = 0;
58 
60  virtual bool valid() const = 0;
61 
63  virtual DtVector4<float> color(unsigned int x, unsigned int y) const = 0;
64  };
65 
67  {
68  public:
71  static DtTextureInterfaceCreator& instance( DtDe& );
72 
74  static void registerInstance( DtDe& de, DtTextureInterfaceCreator* anInstance );
75 
77  virtual DtTextureInterface* create( DtDe& de ) = 0;
78  };
79 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Definition: DtTextureInterface.h:66
const char * filename
Definition: ioapi.h:38
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
4 dimensional vector
Contains makVrv::DtFileCache class.
Contains makVrv::DtVirtualBaseClass class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Definition: DtFileCache.h:45
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)