public class SKShader extends NSObject implements NSCopying, NSSecureCoding
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
SKShader(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
void |
addUniform(SKUniform uniform) |
static SKShader |
alloc() |
static SKShader |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
NSArray<? extends SKAttribute> |
attributes() |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
static long |
hash_static() |
SKShader |
init() |
SKShader |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
SKShader |
initWithSource(java.lang.String source)
Create a custom shader with source code.
|
SKShader |
initWithSourceUniforms(java.lang.String source,
NSArray<? extends SKUniform> uniforms)
Create a custom shader with source code and uniforms.
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static SKShader |
new_objc() |
void |
removeUniformNamed(java.lang.String name) |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setAttributes(NSArray<? extends SKAttribute> value) |
void |
setSource(java.lang.String value)
Shader source must define the 'main' method of the fragment shader
|
void |
setUniforms(NSArray<? extends SKUniform> value)
You may define additional uniforms to be used in your shader here.
|
static void |
setVersion_static(long aVersion) |
static SKShader |
shader() |
static SKShader |
shaderWithFileNamed(java.lang.String name)
Loads a shader source file named 'name' from the main bundle.
|
static SKShader |
shaderWithSource(java.lang.String source) |
static SKShader |
shaderWithSourceUniforms(java.lang.String source,
NSArray<? extends SKUniform> uniforms) |
java.lang.String |
source()
Shader source must define the 'main' method of the fragment shader
|
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
SKUniform |
uniformNamed(java.lang.String name) |
NSArray<? extends SKUniform> |
uniforms()
You may define additional uniforms to be used in your shader here.
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static SKShader alloc()
public static SKShader allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static SKShader new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static SKShader shader()
public static SKShader shaderWithFileNamed(java.lang.String name)
[SKShader shaderWithSource:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:name ofType:@"fsh"] encoding:NSUTF8StringEncoding error:NULL]];
The encoding is assumed to be NSUTF8StringEncoding.
public static SKShader shaderWithSource(java.lang.String source)
public static SKShader shaderWithSourceUniforms(java.lang.String source, NSArray<? extends SKUniform> uniforms)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void addUniform(SKUniform uniform)
public NSArray<? extends SKAttribute> attributes()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic SKShader initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodingpublic SKShader initWithSource(java.lang.String source)
source - the source code for the custom fragment shader.public SKShader initWithSourceUniforms(java.lang.String source, NSArray<? extends SKUniform> uniforms)
source - the source code for the custom fragment shader.uniforms - the array of uniforms supplied to this shaderpublic void removeUniformNamed(java.lang.String name)
public void setAttributes(NSArray<? extends SKAttribute> value)
public void setSource(java.lang.String value)
Your shader must assign a premultipled fragment value to 'gl_FragColor'
The following implicit uniforms are available:
1. sampler2D u_texture (the primary texuture attached the the sprite)
The following varyings are available:
1. vec2 v_tex_coord (normalized texture coordiantes for the primary texture) 2. vec4 v_color_mix (premultiplied color value based on color & alpha)
The following functions are available:
1. vec4 SKDefaultShading() (returns the fragment value that would have been output if no shader was used)
Sample shader source that produces the same result are SpriteKit's normal rendering:
"void main() { gl_FragColor = SKDefaultShading(); }"
public void setUniforms(NSArray<? extends SKUniform> value)
All uniforms declared must be used within the source.
public java.lang.String source()
Your shader must assign a premultipled fragment value to 'gl_FragColor'
The following implicit uniforms are available:
1. sampler2D u_texture (the primary texuture attached the the sprite)
The following varyings are available:
1. vec2 v_tex_coord (normalized texture coordiantes for the primary texture) 2. vec4 v_color_mix (premultiplied color value based on color & alpha)
The following functions are available:
1. vec4 SKDefaultShading() (returns the fragment value that would have been output if no shader was used)
Sample shader source that produces the same result are SpriteKit's normal rendering:
"void main() { gl_FragColor = SKDefaultShading(); }"
public SKUniform uniformNamed(java.lang.String name)
public NSArray<? extends SKUniform> uniforms()
All uniforms declared must be used within the source.
public static boolean supportsSecureCoding()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding