MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / IsValid

Method IsValid

GTE/Graphics/GL46/GLSLShader.cpp:366–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366bool GLSLShader::IsValid(Data const& goal, ConstantBuffer* resource) const
367{
368 if (!resource)
369 {
370 // resource is null
371 return false;
372 }
373
374 if (goal.type != GT_CONSTANT_BUFFER)
375 {
376 // mismatch of buffer type
377 return false;
378 }
379
380 if (resource->GetNumBytes() >= static_cast<size_t>(goal.numBytes))
381 {
382 return true;
383 }
384
385 // invalid number of bytes
386 return false;
387}
388
389bool GLSLShader::IsValid(Data const& goal, TextureBuffer* resource) const
390{

Callers

nothing calls this directly

Calls 4

GetCounterTypeMethod · 0.80
GetNumBytesMethod · 0.45
GetUsageMethod · 0.45
GetNumDimensionsMethod · 0.45

Tested by

no test coverage detected