![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /***************************************************************************** 00002 * Copyright (c) 2011 MAK Technologies, Inc. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 00009 00010 #pragma once 00011 00012 #include <vrvGraphics/DtEffectRenderer.h> 00013 00014 #include <GL/glew.h> 00015 00016 namespace makVrv 00017 { 00018 00021 struct DtOffsetColoredTexturedVertex 00022 { 00023 DtOffsetColoredTexturedVertex() 00024 { 00025 memset( position, 0, sizeof(float[4]) ); 00026 memset( offset, 0, sizeof(float[3]) ); 00027 memset( color, 0, sizeof(float[4]) ); 00028 memset( textCoord, 0, sizeof(float[2]) ); 00029 trigRotation[0] = 1.0f; 00030 trigRotation[1] = 0.0f; 00031 } 00032 00033 float position[4]; 00034 float offset[3]; 00035 float color[4]; 00036 float textCoord[2]; 00037 float trigRotation[2]; 00038 }; 00039 00040 class DtProjected2DTexturedEffect; 00041 00044 class DT_DLL_VRVGRAPHICS DtTextured2DRenderer : 00045 public DtEffectRenderer<DtOffsetColoredTexturedVertex> 00046 { 00047 public: 00048 00050 DtTextured2DRenderer( DtProjected2DTexturedEffect* effect ); 00051 00053 void bindBackgroundImageTexture( unsigned int textureId ); 00054 00055 protected: 00056 00058 virtual void bindVertexArrays( 00059 const DtOffsetColoredTexturedVertex* vertexArray ); 00060 00062 virtual void unbindVertexArrays(); 00063 00064 protected: 00065 00066 DtProjected2DTexturedEffect* myEffect; 00067 00068 }; 00069 00070 }