About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
[Solved] VI won't draw in RM_BLEND
Author Message
SamNainocard Offline
Member

Post: #1
[Solved] VI won't draw in RM_BLEND
The VI no longer draw in RM_BLEND mode for my game for quite sometimes now, but they still draw in RM_OVERLAY and RM_AMBIENT.

PHP Code:
void Trail::draw()
{

    
D.alpha(ALPHA_BLEND_DEC);
    
VI.image(Images("gfx/fx/swing trail.gfx"));
    
VI.wrap (                                );
    
REP(edges.elms()-1)
    {
        
        
Int next=Mod(edge_offset-i  edges.elms()),
             
prev=Mod(edge_offset-i-1edges.elms());

        
        
VI.face(edges[prev].vtx[1],
                  
edges[prev].vtx[0],
                  
edges[next].vtx[0],
                  
edges[next].vtx[1]);
    }
    
VI.end();

PHP Code:
static void MainRender()
{
    
Game::World.draw();

    
C RENDER_MODE &mode=Renderer();
    switch(
mode)
    {
    case 
RM_SHADOW :
        {
            ...
        }break;
    case 
RM_PREPARE:
        {
            ...
        }break;
    case 
RM_BLEND:
        {
                      
SetMatrix();
            
REPA(Trails)
            {
                
Trails[i].draw();
            }
        }break;
    }

PHP Code:
void DrawGame()
{
    
Renderer(MainRender);

(This post was last modified: 02-25-2012 05:10 AM by SamNainocard.)
02-16-2012 11:21 AM
Find all posts by this user Quote this message in a reply
SamNainocard Offline
Member

Post: #2
RE: VI won't draw in RM_BLEND
Focused on fixing this and I found that it is required SetMatrix();
02-25-2012 04:46 AM
Find all posts by this user Quote this message in a reply
Post Reply