Binding a sampler2D from Java 3D

View: New views
3 Messages — Rating Filter:   Alert me  

Binding a sampler2D from Java 3D

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is is possible to bind a uniform sampler2D in a GLSL shader program from Java 3D? From the javadoc it sounds like int, float, vectors, matrices, and arrays are supported but not textures. If this is not yet supported is there support planned for a future release?
[Message sent by forum member 'sarnoth' (sarnoth)]

http://forums.java.net/jive/thread.jspa?messageID=281883

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Binding a sampler2D from Java 3D

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Never mind, I found the examples that show how. For anyone else that is wondering, you bind an Integer from the Java 3D side that is an index in to the TextureUnitState array.
[Message sent by forum member 'sarnoth' (sarnoth)]

http://forums.java.net/jive/thread.jspa?messageID=281888

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


Re: Binding a sampler2D from Java 3D

by java3d-interest :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes, java3d is capable of doing that.
define the desired variables with 0,1,2,... as int.

create a TextureUnitState-Array and pass it to the Appearance.
[Message sent by forum member 'optimusprime1982' (optimusprime1982)]

http://forums.java.net/jive/thread.jspa?messageID=281889

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...