VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTextured2DRenderer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makVrv
15 {
16 
20  {
22  {
23  const int elemSize = sizeof(float);
24  memset( position, 0, 4 * elemSize);
25  memset( offset, 0, 3 * elemSize);
26  memset( color, 0, 4 * elemSize);
27  memset( textCoord, 0, 2 * elemSize);
28  trigRotation[0] = 1.0f;
29  trigRotation[1] = 0.0f;
30  }
31 
32  DtOffsetColoredTexturedVertex(float* inColor, float* inPos)
33  {
34  const int elemSize = sizeof(float);
35  memcpy(position, inPos, 4 * elemSize);
36  memset(offset, 0, 3 * elemSize);
37  memcpy(color, inColor, 4 * elemSize);
38  memset(textCoord, 0, 2 * elemSize);
39  trigRotation[0] = 1.0f;
40  trigRotation[1] = 0.0f;
41  }
42 
43  float position[4];
44  float offset[3];
45  float color[4];
46  float textCoord[2];
47  float trigRotation[2];
48  };
49 
51 
55  public DtEffectRenderer<DtOffsetColoredTexturedVertex>
56  {
57  public:
58 
60  DtTextured2DRenderer( DtProjected2DTexturedEffect* effect, bool repeating = false );
61 
63  void bindBackgroundImageTexture( unsigned int textureId );
64 
65  protected:
66 
68  virtual void bindVertexArrays(
69  const DtOffsetColoredTexturedVertex* vertexArray );
70 
72  virtual void unbindVertexArrays();
73 
74  protected:
75 
78  };
79 
80 }
DtOffsetColoredTexturedVertex(float *inColor, float *inPos)
Definition: DtTextured2DRenderer.h:32
float textCoord[2]
Definition: DtTextured2DRenderer.h:46
Contains makVrv::DtEffectRenderer class.
float trigRotation[2]
Definition: DtTextured2DRenderer.h:47
A extended precision 2D quad rendering effect.
Definition: DtProjected2DTexturedEffect.h:19
DtOffsetColoredTexturedVertex()
Definition: DtTextured2DRenderer.h:21
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A vertex primitive which has a position, offset, color and texture coords.
Definition: DtTextured2DRenderer.h:19
float position[4]
Definition: DtTextured2DRenderer.h:43
Class will render TexturedQuadData using a Dt2DQuadEffect.
Definition: DtTextured2DRenderer.h:54
bool myRepeating
Definition: DtTextured2DRenderer.h:77
float color[4]
Definition: DtTextured2DRenderer.h:45
voidpf uLong offset
Definition: ioapi.h:42
DtProjected2DTexturedEffect * myEffect
Definition: DtTextured2DRenderer.h:76
Definition: DtEffectRenderer.h:98

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)