Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cuda_lab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
cuda_lab
Commits
4490dbf2
Commit
4490dbf2
authored
Mar 21, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Debug Prints
Signed-off-by:
Gaurav Kukreja
<
gmkukreja@gmail.com
>
parent
7e94e981
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
main.cu
miklos/project/main.cu
+1
-12
No files found.
miklos/project/main.cu
View file @
4490dbf2
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
using namespace std;
using namespace std;
// uncomment to use the camera
// uncomment to use the camera
#define CAMERA
//
#define CAMERA
/*********************************************************************
/*********************************************************************
*** Global Variables ******
*** Global Variables ******
...
@@ -274,21 +274,15 @@ int main(int argc, char **argv)
...
@@ -274,21 +274,15 @@ int main(int argc, char **argv)
// and make the OpenGL context current
// and make the OpenGL context current
glutInit(&argc, argv);
glutInit(&argc, argv);
cout << __func__ << ": "<< __LINE__ << ": " << endl;
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowPosition(100,100);
glutInitWindowSize(640,480);
glutInitWindowSize(640,480);
glutCreateWindow("Project");
glutCreateWindow("Project");
glutDisplayFunc(&display);
glutDisplayFunc(&display);
cout << __func__ << ": "<< __LINE__ << ": " << endl;
// Explicitly set device 0
// Explicitly set device 0
cudaGLSetGLDevice(0);
cudaGLSetGLDevice(0);
cout << __func__ << ": "<< __LINE__ << ": " << endl;
// Create buffer object and register it with CUDA
// Create buffer object and register it with CUDA
glGenBuffers(1, &outputVBO);
glGenBuffers(1, &outputVBO);
glBindBuffer(GL_ARRAY_BUFFER, outputVBO);
glBindBuffer(GL_ARRAY_BUFFER, outputVBO);
...
@@ -299,11 +293,8 @@ int main(int argc, char **argv)
...
@@ -299,11 +293,8 @@ int main(int argc, char **argv)
outputVBO,
outputVBO,
cudaGraphicsMapFlagsWriteDiscard);
cudaGraphicsMapFlagsWriteDiscard);
cout << __func__ << ": "<< __LINE__ << ": " << endl;
// Launch rendering loop
// Launch rendering loop
glutMainLoop();
glutMainLoop();
cout << __func__ << ": "<< __LINE__ << ": " << endl;
atexit(bye);
atexit(bye);
#else // CAMERA
#else // CAMERA
...
@@ -381,8 +372,6 @@ void display()
...
@@ -381,8 +372,6 @@ void display()
size_t imageBytes = (size_t)w*h*nc*sizeof(float);
size_t imageBytes = (size_t)w*h*nc*sizeof(float);
cout << __func__ << ": "<< __LINE__ << ": " << endl;
// Read a camera image frame every 30 milliseconds:
// Read a camera image frame every 30 milliseconds:
// cv::waitKey(30) waits 30 milliseconds for a keyboard input,
// cv::waitKey(30) waits 30 milliseconds for a keyboard input,
// returns a value <0 if no key is pressed during this time, returns immediately with a value >=0 if a key is pressed
// returns a value <0 if no key is pressed during this time, returns immediately with a value >=0 if a key is pressed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment