Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Alfox

Member Since 17 Mar 2014
Offline Last Active Oct 25 2014 07:17 AM

Posts I've Made

In Topic: How to check where a point hit a triangle

22 October 2014 - 02:25 PM

Thanks a lot for all the answers guys, tomorrow I'l try to do all


In Topic: GLFW errors during c++ program compialtion on ubuntu

25 September 2014 - 02:01 AM

hi

I tried with xvfb, first of all I installed it

sudo apt-get install xvfb

than lauched with command

xvfb-run ./RayTracing

But I receive an error:

Ray.cpp Error: Failed to open GLFW window.

This is the output that I write when glfwCreateWindow() fails

window = glfwCreateWindow( WINDOW_WIDTH, WINDOW_HEIGHT, "Ray Tracing - Alfonso Oricchio", NULL, NULL);
// Open a window and create its OpenGL context
if( window == NULL ){
   fprintf( stderr, "Ray.cpp Error: Failed to open GLFW window.\n" );
   glfwTerminate();
   return -1;
   }

So maybe, I have to set up better xvfb-run? with what params?


In Topic: GLFW errors during c++ program compialtion on ubuntu

24 September 2014 - 07:17 AM

oh really thanks I'll try as soon as possible


In Topic: GLFW errors during c++ program compialtion on ubuntu

24 September 2014 - 04:52 AM

Hi followed Kaptein instruction

This is the modified Makefile

variables
MYINC=-I/isis/AlfonsoOricchio/RayTracing/src/glfw/include/ -I/isis/AlfonsoOricchio/RayTracing/src/glew/include -I/isis/AlfonsoOricchio/RayTracing/src
MYCUDAINC=-I/usr/local/cuda-5.5/include/
MYLIB=-L/usr/local/cuda-5.5/lib64/
MYCMD=$(shell pkg-config glfw3 --libs --static glew) -lcudart
NVCC=/usr/local/cuda-5.5/bin/nvcc

all: myexe

myexe: render.o controls.o objloader.o shader.o Ray.o
        g++ render.o controls.o objloader.o shader.o Ray.o $(MYLIB) $(MYCMD) -o RayTracing


Ray.o: Ray.cpp
        g++ -c $(MYINC) $(MYCUDAINC) Ray.cpp

controls.o: controls.cpp
        g++ -c $(MYINC) controls.cpp

objloader.o: objloader.cpp
        g++ -c $(MYINC) objloader.cpp

shader.o: shader.cpp
        g++ -c $(MYINC) shader.cpp

render.o:
        $(NVCC) -c -arch=sm_20 render.cu


clean:
        rm -rf *o RayTracing

Now compiling without errors.  And this is my output for statit linking

g++ render.o controls.o objloader.o shader.o Ray.o -L/usr/local/cuda-5.5/lib64/ -L/usr/local/lib -lglfw3 -lrt -lXrandr -lXi -lXxf86vm -lXrender -lXfixes -lGLEW -lGLU -lGL -lm -lXext -lX11 -lpthread -lxcb -lXau -lXdmcp   -lcudart -o RayTracing

Thanks a lot guys.

 

I have a different problem now, when I launch the program

I have this output:

X Error of failed request:  BadRRCrtc (invalid Crtc parameter)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  22 (RRGetCrtcGammaSize)
  Crtc id in failed request: 0x1a98e00
  Serial number of failed request:  62
  Current serial number in output stream:  62

I believe because the linux server has no monitor so Xrandr fails.

 

but I think I have to open another post for that. Because this is a different problem, right?


In Topic: GLFW errors during c++ program compialtion on ubuntu

23 September 2014 - 07:08 AM

thanks for reply

I thought about that, and serching what lib I have to install, I tried to download this

sudo apt-get install libglfw3-dev

but I receive this error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libglfw3-dev

PARTNERS