Ignore:
Timestamp:
08/31/08 13:15:30 (16 years ago)
Author:
mattausch
Message:

made changes to view transformation but still not working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp

    r2879 r2887  
    55#include "SceneQuery.h" 
    66#include "RenderTraverser.h" 
     7#include "FrameBufferObject.h" 
     8 
    79#include <IL/il.h> 
    810#include <assert.h> 
    9 #include "FrameBufferObject.h" 
     11 
    1012 
    1113 
     
    3335 
    3436 
    35 void startil() 
     37static void startil() 
    3638{ 
    3739        ilInit(); 
     
    4042 
    4143 
    42 void stopil() 
     44static void stopil() 
    4345{ 
    4446        ilShutDown(); 
     
    5153 
    5254 
    53 //void GrabDepthBuffer(float *data, RenderTexture *rt) 
    54 void GrabDepthBuffer(float *data, GLuint depthTexture) 
     55static void GrabDepthBuffer(float *data, GLuint depthTexture) 
    5556{ 
    5657        glEnable(GL_TEXTURE_2D); 
     
    6465 
    6566 
    66 void ExportDepthBuffer(float *data) 
     67static void ExportDepthBuffer(float *data) 
    6768{ 
    6869        startil(); 
     
    9293 
    9394 
    94 SceneQuery::SceneQuery(const AxisAlignedBox3 &sceneBox, RenderTraverser *renderer):  
     95SceneQuery::SceneQuery(const AxisAlignedBox3 &sceneBox,  
     96                                           RenderTraverser *renderer):  
    9597mSceneBox(sceneBox), mDepth(NULL) 
    9698{ 
     
    135137 
    136138        orthoCam->SetNear(0.0f); 
    137         orthoCam->Yaw(M_PI * 0.5f); 
    138  
     139        orthoCam->SetDirection(Vector3(0, 0, 1)); 
     140 
     141        cout << orthoCam->GetDirection() << endl; 
    139142        Vector3 pos = Vector3(mSceneBox.Center().x, mSceneBox.Center().y, mSceneBox.Max().z); 
    140143        orthoCam->SetPosition(pos); 
     
    147150 
    148151        glDrawBuffers(1, mrt); 
    149          
     152 
     153        glPushAttrib(GL_VIEWPORT_BIT); 
    150154        glViewport(0, 0, texWidth, texHeight); 
    151         glPushAttrib(GL_VIEWPORT_BIT); 
    152155 
    153156        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
     
    186189 
    187190        GrabDepthBuffer(mDepth, fbo->GetDepthTex()); 
    188         //ExportDepthBuffer(mDepth); PrintGLerror("grab"); 
     191        ExportDepthBuffer(mDepth); PrintGLerror("grab"); 
    189192 
    190193        DEL_PTR(fbo); 
Note: See TracChangeset for help on using the changeset viewer.