first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,65 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
------------------------------------------------------------------------------*/
#ifndef __GPUDRAWCONTEXT__
#define __GPUDRAWCONTEXT__
#include "gpu/gpu_material.h"
namespace GS {
namespace Core { class Light; }
namespace GPU {
//
struct DrawContext
{
NPLACEMENT_NEW(Renderer)
enum Render
{
Deferred = 0,
Opaque,
Alpha
};
enum Draw
{
Base = 0,
Light
};
struct Context
{
Draw draw;
Render render;
MaterialShader::Variant variant;
};
Context ctx;
Core::Light *light;
void SetContext(Render rc, Draw dc, MaterialShader::Variant prg)
{
ctx.render = rc;
ctx.draw = dc;
ctx.variant = prg;
}
DrawContext(Render rc, Draw dc, MaterialShader::Variant prg = MaterialShader::Depth)
{
SetContext(rc, dc, prg);
light = 0;
}
};
} // GPU
} // GS
#endif // __GPUDRAWCONTEXT__