- Timestamp:
- 08/31/08 13:15:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp
r2879 r2887 5 5 #include "SceneQuery.h" 6 6 #include "RenderTraverser.h" 7 #include "FrameBufferObject.h" 8 7 9 #include <IL/il.h> 8 10 #include <assert.h> 9 #include "FrameBufferObject.h" 11 10 12 11 13 … … 33 35 34 36 35 void startil()37 static void startil() 36 38 { 37 39 ilInit(); … … 40 42 41 43 42 void stopil()44 static void stopil() 43 45 { 44 46 ilShutDown(); … … 51 53 52 54 53 //void GrabDepthBuffer(float *data, RenderTexture *rt) 54 void GrabDepthBuffer(float *data, GLuint depthTexture) 55 static void GrabDepthBuffer(float *data, GLuint depthTexture) 55 56 { 56 57 glEnable(GL_TEXTURE_2D); … … 64 65 65 66 66 void ExportDepthBuffer(float *data)67 static void ExportDepthBuffer(float *data) 67 68 { 68 69 startil(); … … 92 93 93 94 94 SceneQuery::SceneQuery(const AxisAlignedBox3 &sceneBox, RenderTraverser *renderer): 95 SceneQuery::SceneQuery(const AxisAlignedBox3 &sceneBox, 96 RenderTraverser *renderer): 95 97 mSceneBox(sceneBox), mDepth(NULL) 96 98 { … … 135 137 136 138 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; 139 142 Vector3 pos = Vector3(mSceneBox.Center().x, mSceneBox.Center().y, mSceneBox.Max().z); 140 143 orthoCam->SetPosition(pos); … … 147 150 148 151 glDrawBuffers(1, mrt); 149 152 153 glPushAttrib(GL_VIEWPORT_BIT); 150 154 glViewport(0, 0, texWidth, texHeight); 151 glPushAttrib(GL_VIEWPORT_BIT);152 155 153 156 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); … … 186 189 187 190 GrabDepthBuffer(mDepth, fbo->GetDepthTex()); 188 //ExportDepthBuffer(mDepth); PrintGLerror("grab");191 ExportDepthBuffer(mDepth); PrintGLerror("grab"); 189 192 190 193 DEL_PTR(fbo);
Note: See TracChangeset
for help on using the changeset viewer.