mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-10 07:50:44 +00:00
Add cubemap arrays, as well as control for generation of MIPs on texture targets.
This commit is contained in:
parent
e32a431a6c
commit
83dd55e851
25 changed files with 412 additions and 60 deletions
|
|
@ -495,6 +495,12 @@ void GFXGLDevice::clear(U32 flags, const LinearColorF& color, F32 z, U32 stencil
|
|||
glStencilMask(desc->stencilWriteMask);
|
||||
}
|
||||
|
||||
void GFXGLDevice::clearColorAttachment(const U32 attachment, const LinearColorF& color)
|
||||
{
|
||||
const GLfloat clearColor[4] = { color.red, color.green, color.blue, color.alpha };
|
||||
glClearBufferfv(GL_COLOR, attachment, clearColor);
|
||||
}
|
||||
|
||||
// Given a primitive type and a number of primitives, return the number of indexes/vertexes used.
|
||||
inline GLsizei GFXGLDevice::primCountToIndexCount(GFXPrimitiveType primType, U32 primitiveCount)
|
||||
{
|
||||
|
|
@ -749,9 +755,9 @@ void GFXGLDevice::setStateBlockInternal(GFXStateBlock* block, bool force)
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
GFXTextureTarget * GFXGLDevice::allocRenderToTextureTarget()
|
||||
GFXTextureTarget * GFXGLDevice::allocRenderToTextureTarget(bool genMips)
|
||||
{
|
||||
GFXGLTextureTarget *targ = new GFXGLTextureTarget();
|
||||
GFXGLTextureTarget *targ = new GFXGLTextureTarget(genMips);
|
||||
targ->registerResourceWithDevice(this);
|
||||
return targ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue