Ejemplo n.º 1
0
// Apply post-processing to an already-imported scene.
//
// This is strictly equivalent to calling Import() with the
// same flags. However, you can use this separate function to inspect the imported
// scene first to fine-tune your post-processing setup.
//
// The flags parameter is a bitwise combination of the #aiPostProcessSteps flags.
//
// Returns a pointer to the post-processed data. Post processing is done in-place,
// meaning this is still the same #aiScene which you passed for pScene. However,
// _if_ post-processing failed, the scene could now be NULL. That's quite a rare
// case, post processing steps are not really designed to 'fail'. To be exact,
// the #aiProcess_ValidateDS flag is currently the only post processing step
// which can actually cause the scene to be reset to NULL.
func (s *Scene) ApplyPostProcessing(flags PostFlags) (ok bool) {
	ptr := C.aiApplyPostProcessing(
		s.c,
		C.uint(flags),
	)
	if ptr == nil {
		return false
	}
	return true
}
Ejemplo n.º 2
0
func (scene *Scene) ApplyPostProcessing(flags PostProcessSteps) *Scene {
	pScene := (*C.struct_aiScene)(scene)
	pFlags := C.uint(flags)

	return (*Scene)(C.aiApplyPostProcessing(pScene, pFlags))
}