/src/renderer/visual.h
https://bitbucket.org/vivkin/gam3b00bs/ · C Header · 54 lines · 28 code · 14 blank · 12 comment · 0 complexity · a16b43e1a0f2c59f05bd05eb46e1376d MD5 · raw file
- #pragma once
- //-----------------------------------------------------------------------------
-
- #include "renderer/device.h"
- #include "renderer/mesh.h"
- //-----------------------------------------------------------------------------
-
- struct visual_t
- {
- D3DMATERIAL9 material;
- mesh_h mesh;
- texture_h texture[2];
- vertex_layout_h v_layout;
-
- D3DXVECTOR3 position;
- float pitch;
- float yaw;
- float roll;
- float scaleu; // uniform scale
-
- D3DXMATRIX transform;
- };
-
- typedef visual_t* visual_h;
- //-----------------------------------------------------------------------------
-
- visual_h visual_create( const char* mesh_name,
- const char* texture0_path,
- const char* texture1_path );
- //-----------------------------------------------------------------------------
-
- visual_h visual_create( mesh_h mesh, texture_h tex0, texture_h tex1 );
- //-----------------------------------------------------------------------------
-
- void visual_set_position( visual_h vis, const D3DXVECTOR3& pos );
- //-----------------------------------------------------------------------------
-
- void visual_set_rotation( visual_h vis, float pitch, float yaw, float roll );
- //-----------------------------------------------------------------------------
-
- void visual_set_scaleu( visual_h vis, float scale );
- //-----------------------------------------------------------------------------
-
- void visual_remove( visual_h vis );
- //-----------------------------------------------------------------------------
-
- void visual_draw( visual_h vis );
- //-----------------------------------------------------------------------------
-
- void visual_render( visual_h vis );
- //-----------------------------------------------------------------------------
-
- void visuals_render_all();
- //-----------------------------------------------------------------------------