Aim
To run my OpenGL application in a computer with no OpenGL set up.
Process
I start a new Win32 Console Application with Visual Studio 2013
Using C++
GLUT and OpenGL libraries are linked to my project
Display mode : GLUT_RGB | GLUT_DOUBLE
Can build without error and it runs as expected in my computer
Copy just the Project\Release\Project.exe and glut32.dll to other computers with no OpenGL set up neither Visual Studio installed.
In some computers my application runs perfectly.
In the others my application runs with black screen displayed in the OpenGL window which is expected to display graphics.
The command-line interface and the OpenGL window are both active. There are keyboard events in my application by introducing the function glutKeyboardFunc(). When I press a specific key there is an update shown in the command-line interface so I know the command-line interface and the OpenGL window are active. The latter just does not display anything but black.
Look For
Answers for why my application displays differently from computer to computer
Solutions for this
Please bear with my English and stupidity...
Solved... Thanks guys
I used gluPerspetive() and gluLookAt() in my application.
On some computers they do not have glu.dll, so the glu functions in my application are not available on them, resulting in nothing displayed.
Simply I send glu.dll and glu.lib together with my .exe and it works...
Related
My system is Win 8.1 64-bit and using VS2013 Express. I can verify my video cards support the latest OpenGL and OpenCL. I used the latest code and media files from authors github and site: https://github.com/openglsuperbible/sb6code and http://www.openglsuperbible.com/example-code/ respectively.
I am able to make debug and release builds of the project(s) successfully but cannot correctly run it either via debug mode or the .exe in the bin folder. A white window will show up and then exit. I was able to step through and found that glfwOpenWindow will return false causing the exit but I cannot step further and see why it is returning so. I found some solutions that suggested changing
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
to
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, 0);
but this does not change my results. I can verify also that major version is 4 and minor is 3 for the book code. I have found a few other people having the same problem but no resolution. Another possible solution (but to a different problem it seems) was changing the project subsystem to Console from Windows but this throws an error regarding main and so it may not be what I'm looking for.
For reference, this book is using glfw version 2.7.6 when (currently) the latest is 3.0.4. I tried swapping this too but it understandably blew up due to all of the changes.
Any further ideas would be great and very helpful!
I have discovered that while my GPU does support the latest OpenGL, my computer was instead using the integrated Intel HD 4600! By switching my computer to use the dedicated GPU by default, I am able to run the latest OpenGL.
If it successfully compiled, then please do following:
Ensure that you do have the latest graphic card drivers installed (eg. if you have nVIDIA card, go to www.nvidia.com and get newest drivers).
Ensure that files which these examples are trying to load (I guess jpg/tga/png files, maybe some obj/fbx/3ds files for geometry, whatever else these examples need) are present at expected path (relative path to exe).
Run it as a debug, place breakpoints in app initialization, see that OpenGL is initialized correctly and that required files are loaded. I think you will find that required files are not in expected path(s).
P.S.
I think the best practice for learning OpenGL is not to rely on some library to open window and initalize OpenGL for you - it's better you learn it all step by step - how to open an application window, how to initialize gl render context associated with device context etc. You'd also avoid things like this when you don't know where the problem could be.
I am having problems with a Qt GUI application I created. Basically I created the application in my ubuntu to check if it compiles and works properly, however, if I set up the cross compiler (followed a tutorial and tried a hello world which works properly) and execute my code in the pi the UI does not display properly and basically I cant do anything:
· Text disappears from buttons
· Mouse disappears from screen (therefore cant click buttons)
· Cant navigate buttons using tab key
Any clues? maybe I cant use .ui files in the pi and have to use qml? Thank you in advance.
2 Screenshots of what I get with the pi and what the program should actually look like (ignore the second LCD display):
what I get http://imageshack.us/a/img17/9986/img20130508093318.jpg
I’ve been told that Qt5 has different rendering platforms, the standard for my compiled version is “eglfs”, which is fullscreen EGL accelerated mobile application style. I need to run it another platform for example xcb or x11 with the command “./myprogram -platform xcb”. Unfortunatelly i only have the following platform options and none of them work: eglfs,linuxfb,minimal,minimalegl,offscreen. I dont now how to install these, i’ll google it see if i can find anything.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=26590&p=321556
So I've been making a program for my company using Qt 4.8.4 (required). When deploying the project to a different machine, the program runs fine (I included Qtgui4.dll and Qtcore4.dll). However, when trying to view a print preview image using QGraphicsView, no other machine will show it. I even tried installing Qt 4.8.4 on the other machine and building it there to no avail. I use MSVC to compile and have installed Visual Studio on the new machine as well. I also include the imageformats folder when deploying the .exe to other machines.
I am at a loss here. I've researched this for days. I don't understand why it runs perfectly fine on my machine but will not run on others even when I replicate the development environment.
I have attached a picture of it actually working.
On all other machines, the preview image shows blank/white. However, I noticed that the image is built and that it will print. It just will not preview.
I know I haven't included any code but I won't be able to include much as it's for my company. But I have included what I could related to the QGraphicsView.
// Create a handle for the graphics view; fix bug where preview would disappear
// on first view; winId() creates the winId; Needed to initialize first
ui->graphicsView->winId();
/************************************/
if (preview)
preview(ui->graphicsView->winId(), &err);
No solution was found on my end. I finished the application with the stipulation that the OS could not be XP.
I am using DetourCreateProcesswithDLL in Visual Studio 2010 and providing replacement dlls for Opengl32.dll , glu32.dll and glut32.dll while creating process for abgr.exe demo application from glut demo programs.
That way I am intercepting Opengl32, glu32, glut32 libraries. The apis then call the respective apis from the system folder or usual dlls.
These dlls have all the apis defined in their respective libraries.
Problem is that wglMakeCurrent returns 0 or fails with glut demo app like abgr.exe on NVidia GTX480 on Win 7 x64 bit. It doesnt work with other demo apps either.
It does work if i change the Compatibility of the abgr.exe or the GLIntercept executable which is invoking DetourCreateProcesswithDLL. i.e. right click on exe -> change properties ->Compatilibity ->Check Run in 256 colors.
However this looks like a work around and the display doesn't look all that good. How can i use without have to do that. How to get a good value for wglMakeCurrent.
wglMakeCurrent is called from within glutCreateWindow.
This is not a problem on the AMD Fusion GPU. There wglMakeCurrent and returns a good value. The problem is only on NVIDIA GTX 480. Does anyone know how to fix this problem? I have updated the driver and shows version 4.3.790.0 on the NVIDIA Control Panel Help->About
wglCreateContext returns 0x00010000
I am building a C++ Console Application which makes some OpenGL printing.
The entire thing is done by glut and gl libraries. My new goal is to add some Windows Forms to the project so one could "configure" the 'game' with some textbox and other controls provided by VS before the console appliction starts.
I know that the best solution for the current problem is to add Win32 API, but I don't know how to integrate console application project with win32 API alltogether.
I know that in C# it's done quite easily with the .ShowDialog() command.
Although launching a window from a console application is perfectly doable, that window will not be responsive, because your console application does not have a message queue. (Or rather, it has a message queue, but it is implemented by code that you have no control over.) So, you can open up a window, draw in it, and force it to manually update, but you cannot receive user input in it.
I would suggest that you forget about doing it this way, and you write a little windowed application instead, which prompts for the configuration and then launches the console application passing it the configuration as command-line parameters, or fills-in a configuration file for the console application to read.