Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 0
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
New to this Portal?
Click on Join Now to Sign Up
Join Now
Help
Feedback
Sign In
Processing Forum
Recent Topics
All Forums
Search All
Tags
Author
Advanced Search
Search
New Topic
Screen name:
novorobo
novorobo's Profile
3
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Multiple texture binding in PShader (for 2.0a7 or greater)?
[2Replies]
12-Aug-2012 08:14 AM
Forum:
Core Library Questions
Hello,
I have a question for the PShader API (maybe not if there is another interface available for this matter).
Is there any way to bind multiple textures to the shader loaded by PApplet.loadShader()?
I'd like to bind 3 or more textures in a shader at once (not a step by step sequence) for the uniform sampler2Ds,
but couldn't find any API with the PShader something like
PShader.set(String argument, PImage texture) or
PShader.set(String argument, PGraphics canvas)...
I found the PShader APIs suggests a great way to approach the GLSL, and
shader(PShader) or filter(PShader) works just fine so I loved to work with them. but,,
Well, I guess there might be language issues and reasons that the API designers didn't allow the ways like this.
Anyway,
Any suggestions for this matter?
(I'm on 2.0a7)
Thanks :)
Setting normals didn't work as I expected.
[1Reply]
03-Aug-2012 12:37 AM
Forum:
Programming Questions
I created a PShape insance and put some vertices and normals inside,
but found that the normals did not put as I expected.
How does the
PShape.normal(float x, float y, float z)
works?
How the order when I use the function effects?
after the PShape.vertex()?
To order them as I expected, I just used the function
PShape.setNormal(int index, float x, float y, float z);
and it worked clearly, but I want to know they way the 'normal()' works...
Please help.
(i'm in 2.0a7)
Cameras in PGraphics? (for 2.0a7)
[2Replies]
01-Aug-2012 01:36 AM
Forum:
Core Library Questions
Hello,
I just downloaded the version 2.0a7 and tried some new features in the alpha version of the processing 2.0.
And met some problems with the cameras between parent PApplet and the PGraphics canvas
I expected the function camera(nine floats) works separately, but it did not.
when i used below,
PGraphics canvas = createCanvas(P3D); // in the setup()
canvas.beginDraw();
canvas.camera(float values);
canvas.endDraw();
In this case, it did not work. In other words, the effect of camera weren't applied to the PGraphics Instance.
And when i just use like below,
canvas.beginDraw();
camera(float values); // not canvas.camera()
canvas.endDraw();
the camera worked both PGraphics canvas and the normal (parent) canvas.
<Codes>
PGraphics canvas;
MyModel mMyModel;
void setup() {
size(300, 300, P3D);
canvas = createGraphics(300, 300, P3D);
mMyModel = new MyModel();
mMyModel.init();
}
void draw() {
background(204);
canvas.beginDraw();
canvas.background(0, 0, 0, 100);
canvas.camera(70.0, 35.0, 120.0, 50.0, 50.0, 0.0, 0.0, 1.0, 0.0); // <<< or just canvas()
mMyModel.draw();
canvas.endDraw();
image(canvas, 0, 0);
}
Any help?
Thanks.
// updated
ok, i figured out that the camera function works just fine with the primitives like sphere() by callling
canvas.sphere(20); //
instead of mMyModel.draw();
however, the problem occurs when i define a PShape and draw them by calling shape(PShape)
Inside the mMyModel,
I defined:
PShape instance with some vertices and normal definitions for a cube, and,
void draw() {
shape(model);
}
in it.
«Prev
Next »
Moderate user : novorobo
Forum