Tag Archives: Environment configuration

OpenGL Programming Guide 8th Edition 9th Edition vs2015 vs2017 configuration method

“OpenGL Programming Guide” 8th Edition 9th Edition VS2015 VS2017 configuration method
“OpenGL programming guide” source download and source code in VS2015 VS2017 configuration method
directory
“OpenGL programming guide” version 8 version 9 environment configuration VS2015
1. Source download:
2. Cmake build configuration
3. VS2015 configuration
4. Run the example
5. Special Settings


1. Source download:
Version 9 can be downloaded from the official website: http://www.opengl-redbook.com/
Making the source address: https://github.com/openglredbook/examples

Note, direct source code downloaded from making, using CMake build VS2015 always appear a lot of mistakes, later on the issue of https://github.com/openglredbook/examples/issues/2, found that has successfully solved the great god, therefore, recommended directly download the source code of the lot:
https://github.com/elmindreda/examples

For the convenience of everyone to use, here I have configured the VS2015 to provide everyone to download, save you to build:
https://download.csdn.net/download/guyuealian/10878513 (direct download decompression, opened by VS2015/VS2017 my_build/vermilion9 SLNS, detected and then you can happy to run the example la la la la la)


2. Cmake build configuration
Install Cmake in Windows and set the following Settings:

If you click “Configure” :, the compiler will be selected, and you can select Visual Studio 14 2015 for VS2015


“Configuring Done” indicates that the configuration is OK. Forget the warnings that appear in red
Click “Generate” : “Generate done” will be displayed.
Finally, “Open Project” will be opened by default with VS2015


3. VS2015 configuration
Mouse select “ALL_BUILD” → Recompile
Select “Install” → Recompile with the mouse


4. Run the example
If you want to test running an example from a book, just select the example, like “01-triangles,” set it to “Set as Start Project,” and you’ll be ready to go

A triangular window will appear after successful operation:


5. Special Settings
Some examples, such as “12-imageprocessing,” will show a black window with nothing at all. This is because some of the shaders are not set to the correct file paths. Many of the resource files in the book are in: examples, bin, media.
A simple way to do this is to set up the working directory so that the relevant resource files can be found at runtime:

The working directory is: $(projectDir).. \bin

Construction of vs2015 OpenGL configuration environment

OpenGL configuration
Main solutions:
What is OpenGL?How to configure successfully to create a window?
1. OpenGL is what?
A set of specifications that defines a set of functions, what arguments are passed in, and what results are sent out. Since it is only such a set of specifications, anyone can implement functions in different ways as long as they conform to the specifications. VS with OpenGL library (should be able to directly use VS own, but here is the configuration of their own this way, after your add)
OpenGL itself is a big state machine: there are many variables can be set up so that we can control its operations. The state of OpenGL is often referred to as a context. So what we do with OpenGL is we change the context in which it runs by changing its state, so that OpenGL gives us the results that we want
2. The configuration
2.1 What tools need to be prepared for configuration?

2.VS2015
. Glad source is used to encapsulate the function called in OpenGL library
4>make is used to compile source code (GLFW library).
2.1.1 download GLFW
Website address is: http://www.glfw.org/download.html (you need over the wall to access)
in baidu network location to download, links:

https://pan.baidu.com/s/1ceyucgFRYImnjmG-LmkuwA password: 9 SMQ
2.1.2 download Cmake
Through CMake GLFW source is needed to compile the
website address is: https://cmake.org/download/ (also need over the wall to access)
baidu network location to download
link: http://pan.baidu.com/s/1clPRIm password: ct24
install CMake, the following configuration, click the configure, choose vs2015 (vs) according to oneself, click the generate, later. At this point, look at the cmake file under the generated GLFW project.
## 2.1.3





Click the Generate button at the bottom right corner of the page, and on the following page, click Glad. Zip to press

2.1.4 The download is done, the next to assemble the library used

1
1
1
1
1
1 New folder Opengl
2. Will GLFW directory of the include directory is copied to the Opengl directory to
3. Opengl folder under a new folder, named lib
4. Will be compiled GLFW library is copied to the lib folder
GLFW library position is: GLFW – 3.2.1 \ SRC, the inside of the Debug and Release two directory replication, copied to the lib folder
note: Debug and Release do not exist at the beginning of this time, you need to open the GLFW solution in VS2015, run the two modes (Debug/Release), to produce, run after the Win32 folder will have these two folders, do not bother, just copy the two SRC. A lot of readers didn’t know what I was looking at on the blog, so let me make a statement here.
5. Copy glad decompression folder, the include directory two folders glad and KHR copy, copy to the OpenGL directory, include folder

Include
lib
ah
2.1.5 OK, finally can use VS2015 to create projects, add libraries
1.VS2015, create an empty project,
copy from glad folder to project source file.
click on the project, set the properties, VC ++ directory, set respectively


br> *>lick on the connector, enter, and add additional dependencies
** Note: !!!!!!!!!!!

OpenGL environment configuration under VS2010 / vs2012 / vs2015

Please read every word carefully.  
In order to learn “OpenGL Super Bibliography (Fifth Edition)” must configure OpenGL environment, is the so-called work to do its thing must first benefit its device. Through a lot of online configuration tutorial, have a lot of problems, but also has the essence of the detailed tutorial, such as a blog: http://www.zyh1690.org/build-opengl-super-bible-fifth-edition-development-environment/. While the tutorial is detailed, there are a few details that the blog doesn’t go into. Configuring the OpenGL environment must be careful and patient. Because a little oversight can cause the final configuration environment to fail. Although this is for the “Win7 X64 +VS2010” environment configuration process, but I in VS2012/VS2015 also built successfully, VS2012/VS2015 configuration OpenGL principle is also very simple, is one of the Microsoft Visual Studio 10.0 to add files into Microsoft Visual Studio 12.0 or Microsoft Visual Studio 15.0 to add related files.
Configure environment:
win7 X64 + Visua Studio 2010
win7 X64 + Visua Studio 2012
win7 X64 + Visua Studio 2015
Required configuration files and tools:

Baidu cloud disk Download Address:
Link: http://pan.baidu.com/s/1kVsKUGJ password: XXQQ
Link: http://pan.baidu.com/s/1slu9RK5 password: asj8
Here is the official setup:>; > > > > > > > > > > > > > > > > > > > > > > > Line & gt; > > > > > > > > > > > > > > > > > > > > > > > > Line & gt; > > > > > > > > > > > > > > > > > > > > > > > >

The FreeGLUT configuration

Open the x:\x\ FreeGlut-2.8.1 \VisualStudio\2010\ FreeGlut.SLN project project, (if you are configuring VS2015, you can select x:\x\…. \2015\ FreeGlut.SLN Project Project)

The solution is generated in Debug mode and Release mode, respectively. (You can generate only one. It is recommended to compile in debug mode without execution. If you run the pop-up black box, ignore it. 32-bit operating systems note that eventually, when running the code in Bluebook chapter01\ Block, if you encounter a problem with freeglut_static. Lib not being opened, you should choose Debug_Static mode to recompile and generate the required freeglut_static. Lib and add it to the specified folder.)
You will see the generated.dll and.lib files in the x:\x\ FreeGlut-2.8.1 \lib\x86 directory. Please add _d to the.dll and.lib files in the Debug directory to distinguish them later. As shown in figure:

 
X :\x\ FreeGlut-2.8.1 \ Include \GL: :\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ Include \GL: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
Copy the.dll file in the x:\x\ FreeGlut-2.8.1 \ Lib \x86 folder (and the Debug folder) to the C:\ Windows&syswow64 directory (x86 to the System32 directory).
Copy the.lib file in the x:\x\ FreeGlut-2.8.1 \lib\x86 folder (and the Debug folder) to x:\x\Microsoft Visual Studio 10.0\VC\lib.
So now the FreeGlut is done!
(Once you’ve done this, you can code check.
Test 1: build Win32 console project, add test code, compile and run.
Test two: build Win32 console project, add test code, compile and run.

II. GLEW configuration
Copy the.h file in the folder x:\x\glew-1.11.0\include\GL to the directory x:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL.
Copy the.lib file in the folder x:\x\glew-1.11.0\lib\Release\Win32 to the directory x:\x\Microsoft Visual Studio 10.0\VC\lib.
Copy the.dll file from the x:\x\glew-1.11.0\bin\Release\Win32 folder to the C:\ WindowsSYSWOW64 directory. (If not, skip it.)
(Note that if VS2015 is supplied, you need to put the configuration file in x:\x\Microsoft Visual Studio 15.0…. C)

Third, GLUT configuration
Copy the.h file in the folder x:\x\ Glutdlls37Beta to the directory x:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL.
Copy the.lib file under the x:\x\ Glutdlls37Beta folder to the x:\x\Microsoft Visual Studio 10.0\VC\lib directory.
Copy the.dll file under the x:\x\ Glutdlls37Beta folder to the C:\ WindowsSYSWOW64 directory.
(Note that if VS2015 is supplied, you need to put the configuration file in x:\x\Microsoft Visual Studio 15.0…. )
4. Build GLTools library
Create a new GLTools Win32 project, as shown in the figure below:

 

First compile, (original here has error, below is I modify)
Copy the.cpp file (excluding glew.c file) in the x:\x\SB5\Src\GLTools\ Src directory to x:\x\ GLTools\ GLTools.
Copy the.h file (excluding the GL folder) in the x:\x\SB5\Src\GLTools\include directory to x:\x\ GLTools\ GLTools.
Right-click on the header file and the source file respectively and add ->; The existing item adds.h and.cpp files to the project. As shown in figure:

 
The compiler prompts are as follows:

The gltools.lib file was generated successfully. It can be viewed under the x:\x\gltools\Debug directory.
Copy the.lib file to the x:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib folder.
Copy the.h file to the x:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include folder (note that this is not the GL folder).
So gltools is OK.

Five, the test
Let’s test the environment using the examples given in the book. If the test is successful, then the OpenGL environment is ready.
The project of establishing TEST:


We use the example from Chapter 1 to test by copying all the files in the x:\x\SB5\Src\Chapter01\Block into the x:\x\test\test folder. Also right-click on the source file and add ->; The existing entries include the block.cpp file.
Adding Additional Dependencies (first figure) :(This way of adding dependencies only works for the current Test project. To make these.lib files available to other projects, you should add dependencies to the properties manager, as shown in the second figure below.


Compile and run the project, and the effect is as follows :(If there is an error in compilation, search the error information with Baidu Browser to find the corresponding solution. Or check out “Some special cases handling” at the end of this blog post for help.)
Press the space bar to transform the display effect, a total of six effects:






VI. Handling of some special cases:
Configuring the OpenGL environment exactly as described above will work on most computers. However, there are always exceptions. If the configuration fails, the following configuration details may help you solve the problem.
Case1: freeglut_static.lib could not open the problem
OpenGL SuperBibliography \SB5\SB5\ FreeGlut-2.6.0 \VisualStudio2008Static\Release FreeGlut_Static. Lib to X :\Program Files (x86)\Microsoft VisualStudio 10.0\VC\ Lib If you fail, try Plan 2.
Solution 2: Take a closer look at the FreeGLUT configuration section of this blog post, which is highlighted in bold red. Pay attention to configuration details.
case2: “math3d.h” : No such file or directory
C :\project\gltools\gltools\math3d.cpp(45): fatal error C1083: failed to open the “math3d.h” : No such file or directory header file.
Case3: UCrtBased. DLL missing
in Visual Studio 2015
Can follow this link: http://blog.csdn.net/so_geili/article/details/53009680, choose the “solution” to solve the problem.

OpenGL development environment configuration [vs2017] + common problems

The article detailed configuration:
the reference 1: OpenGL development environment configuration (Windows) – Visual Studio 2017 + GLFW + GLAD detailed graphic tutorials
reference 2: OpenGL + VS2017 environment configuration reference 3:
[OpenGL] configuration GLFW
configuration process are detailed in this article, I mainly to mention a few configuration in the pit

    create an empty project. If you create a new Windows console application, the program will automatically include the pch.h header. You must consult include "pch.h" o>me other precompiled header at the beginning of the source file. E0035 # error instructions: OpenGL header already included, remove this include, glad already provides it there are two solutions:
    2.1 leave out the third line glad. H header file, the header file
    define conflict
    2.2 this method is more brutal, I saw from the Internet: In the glad. H file commented error: OpenGL header already included, remove this include, glad already provides it GL_COLOR_BUFFER_BIT defined variables is not found, such as:
    the solution: The iostream. H file in header file at the end of the

Some configuration problems of OpenGL in VS2008

1. Just for the first time today in VS2008 using OpenGL, configuration when met some problems, then checked the online to find a better way to site at: http://blog.csdn.net/joven0/article/details/7639715. Most of them are correct, but there is something wrong with the download address of GLEW given by the author. The downloaded file does not have DLL file and lib file. Later, I searched the Internet and found a relatively complete program zip package. Click to download the zip package.
You can’t start this program because GLUT32. DLL is missing from your computer. You can put GLUT32. DLL together with the exe file of this program, but I don’t know why this works.
Today I write here, later if you have any questions to supplement.
Added: Later, I got some advice from one of my classmates, because my system is 64-bit, so glut32.dll should be placed in the folder SysWOW64. Later, I put glut32.dll file in this file and the problem was solved.

Installing nmap on Mac OS

brew install nmap

michael01s-Mac:~ michael01$ nmap 192.168.3.3
Starting Nmap 7.70 ( https://nmap.org ) at 2018-04-08 20:14 PDT
Nmap scan report for 192.168.3.3
Host is up (0.0084s latency).
Not shown: 993 filtered ports
PORT     STATE SERVICE
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
443/tcp  open  https
445/tcp  open  microsoft-ds
912/tcp  open  apex-mesh
5357/tcp open  wsdapi
8080/tcp open  http-proxy


Nmap done: 1 IP address (1 host up) scanned in 15.94 seconds
michael01s-Mac:~ michael01$ 

Check whether the specified port is enabled:

michael01s-Mac:~ michael01$ nmap -n --open -p 1008 192.168.3.3/24
Starting Nmap 7.70 ( https://nmap.org ) at 2018-04-08 20:19 PDT
Nmap scan report for 192.168.3.3
Host is up (0.0040s latency).


PORT     STATE SERVICE
1008/tcp open  ufsd


Nmap done: 256 IP addresses (3 hosts up) scanned in 3.99 seconds

The simplest way to completely unload cygwin under Windows

Cygwin

[the statement] welcome to reprint, but please keep original article source: http://blog.csdn.net/yelangjueqi/article/details/45199209

This thing is difficult to install, uninstall the same trouble, all kinds of ways tried, but can not remove. After a lot of trial and error, I finally found the easiest way. Remember the setup.exe when you installed Cygwin?You can completely remove Cygwin with this thing! If you forget the setup. Exe this place where, can go to the website (https://cygwin.com/install.html) to download a setup. Exe.

Follow these steps to uninstall Cygwin completely.

Double-click to start setup.exe and follow these steps:

The next step

Next, browse to the local cygwin installation directory: D:\cygwin_again

The next step

Next, and this is an important step, click the cursor position to go to: Uninstall mode

Unable to call numpy in pychar, module notfounderror: no module named ‘numpy’

Python was installed before, and then Anaconda was installed because I was practicing using Python to write scientific calculations. However, after installing Anaconda, another problem occurred. When I wrote Python commands to call numpy on the command line, it could be used normally, but the call in PyCharm would report No module named ‘numpy’, that is, numpy could not be found, as shown below.
Numpy can be used normally on the command line:

However, numpy cannot be used properly in PyCharm:

This problem occurs because the interpreter that Pycharm USES is not the installed Python 3.6, but comes with the Python.exe interpreter, and there are only two modules PIP and SetupTools, so that many third-party libraries cannot be used in Pycharm. Only the Settings on PyCharm (File-> settings-> Project: Current project name -& GT; Set Interpreter in the Project Interpreter. Set it to Anaconda, as shown in the figure below.


Then the program will run normally

The experimental procedure for this example is as follows

from numpy import *
import operator

a = random.rand(4,4)
print(a)

Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda

for the python that comes with the system, vanilla python. We tend to select virtualenv for installation, but if the system’s default python environment is shipped with anaconda, the following error

pops out when executing the command

setuptools pip wheel failed with error code 1

for python on Anaconda, how do we set up a virtual environment?There are two ways.


1. Using conda to install virtualenv, execute the following command

PIP uninstall virtualenv
conda install virtualenv
virtualenv YourVirtualEnvName
this method is available for pro test.

bis. Conda comes with the function of creating virtual environment

  • check whether conda has

    installed

    conda -V

  • check if conda has been updated to the latest version

    conda update conda

    Blockquote>

  • create virtual environment

    conda cret-n YourVirtualEnvName python= X.X.X anaconda
    this X.X.X is a version of python that can be used by using the command conda search "^python$".

  • activate virtual environment

    source activate YourVirtualEnvName

  • install third-party package

    conda install -n YourVirtualEnvName [Package]
    if -n YourVirtualEnvName is not added, the installation will execute

    under system python
    Blockquote>

  • inactivated virtual environment

    source deactivate

    Blockquote>

  • delete virtual environment

    conda remove -n YourVirtualEnvName -all

X Error of failed request: BadWindow (invalid Window parameter)

error occurs when loading the display point cloud.

X Error of failed request: BadWindow (invalid Window parameter)

Major opcode of failed request: 10 (X_UnmapWindow)

Resource id in failed request: 0x1a00001

Serial number of failed request: 204

Current serial number in output stream: 207

well, the NVIDIA installation has chosen to turn off OPENGL. The VTK in PCL needs to use OPENGL to display the point cloud.

solution: reinstall NVIDIA.