About Store Forum Documentation Contact



Post Reply 
the second Cam Render of Texture
Author Message
djpercy Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #2
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
Visit this user's website Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
menajev Offline
Member

Post: #4
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
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #5
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
Visit this user's website Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #6
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
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #7
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
Find all posts by this user Quote this message in a reply
Grabonito Offline
Member

Post: #8
RE: the second Cam Render of Texture
this code does not create camera
11-22-2010 09:36 PM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #9
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
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #10
RE: the second Cam Render of Texture
Hi,

can Help me someone, please

Greeting Denis
11-23-2010 03:34 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: the second Cam Render of Texture
I've replied to you in this thread - http://www.esenthel.com/community/showth...3#pid18433
11-23-2010 05:16 PM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #12
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
Find all posts by this user Quote this message in a reply
Post Reply