djpercy
Member
|
the second Cam Render of Texture
Hi,
How can I create a second camera?
How can I render the view from the second camera on a 3D Object?
Greeting Denis
(This post was last modified: 11-22-2010 12:28 AM by djpercy.)
|
|
11-21-2010 09:34 PM |
|
Dynad
Member
|
RE: the second Cam Render of Texture
Please look at the tutorial: Rendering->Viewport to handle more then 1 view.
There is always evil somewhere, you just have to look for it properly.
|
|
11-21-2010 11:28 PM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi Dynad,
I know this tutorial but this tutorial make a second view from the same camera. What I want is a second view from the second camera.
Greeting Denis
|
|
11-22-2010 12:35 AM |
|
menajev
Member
|
RE: the second Cam Render of Texture
You just need to change cam position before calling Render next time.
|
|
11-22-2010 01:01 AM |
|
Dynad
Member
|
RE: the second Cam Render of Texture
Well you need to create a second Camera and use those coordinates for the second view.
There is always evil somewhere, you just have to look for it properly.
|
|
11-22-2010 02:35 AM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi,
I know that I assign a second one Camera at a View but how does it work? do you have a code snippet for me.
Greeting Denis
|
|
11-22-2010 08:56 AM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi,
I create a second camera but I can't assign the second camera at the Viewport
Code:
void Render()
{
switch(Renderer())
{
case RM_PREPARE:
{
Game::World.draw();
Cam.set();
LightPoint(25,Vec(0,3,0)).add();
}break;
}
}
void Draw() // main drawing
{
Renderer(Render);
D.viewRect(NULL);
&camera->set();
Rect rect(1,0.5,2,2);
D.viewRect(rect);
Renderer(Render);
}
}
Greeting Denis
|
|
11-22-2010 09:32 PM |
|
Grabonito
Member
|
RE: the second Cam Render of Texture
this code does not create camera
|
|
11-22-2010 09:36 PM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi,
why not? I create the second camera with this code
Code:
Camera *camera=NULL;
void InitPre()
{
....
...
Cam.dist =10;
Cam.yaw =-PI_4;
Cam.pitch=-0.5;
Cam.at.set(10,0,1);
camera = new Camera();
camera->at.set(16,0,16);
}
I think this is right.
Greeting Denis
(This post was last modified: 11-22-2010 10:17 PM by djpercy.)
|
|
11-22-2010 10:00 PM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi,
can Help me someone, please
Greeting Denis
|
|
11-23-2010 03:34 PM |
|
Esenthel
Administrator
|
RE: the second Cam Render of Texture
|
|
11-23-2010 05:16 PM |
|
djpercy
Member
|
RE: the second Cam Render of Texture
Hi,
thanks for the help.
the open question. How can i render a image on a 3D Object?
Gretting Denis
|
|
11-23-2010 10:48 PM |
|