I'm a beginner in OpenGL for sure and one of the most confusing thing (read: naming convention) that has plagued me in these last two days is OpenGL texture. Contrary to the naming for functions, constants and objects used for OpenGL texture, everything related to texture on those "interfaces" don't really apply to image/picture only. It's much more general than that. OpenGL texture is basically a "lookup-table" (array) and it can store anything as long as the data type matches with the texture that you use in your code. The naming for OpenGL texture "interface" that usually implies the use of image/picture is a legacy of the past. It was used since the day of fixed-function video card and used until now to preserve API backward-compatibility--at least that's one of the reason that I'm aware of.
Anyway, these are some useful links regarding OpenGL texture:
http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html#arrays1
http://www.arcsynthesis.org/gltut/Texturing/Tutorial%2014.html
Saturday, March 29, 2014
Friday, March 21, 2014
Adding New Directory to CodeBlocks Code Completion
CodeBlocks (http://www.codeblocks.org) cannot enumerate all of the possible C/C++ include directories automatically in some cases. For example, when you are using 3rd party C/C++ libraries which are installed in non-standard path. At least that's the state of CodeBlocks v13.12.
Now, how do you go about adding new directories to be added to the codecompletion parser? The procedure is explained in CodeBlocks FAQ at http://wiki.codeblocks.org/index.php?title=FAQ-Settings. However, as I found out, only the second method works in CodeBlocks v13.12, i.e. only the per-project non-standard include directories (to be parsed) can be configured. These are the steps:
Now, how do you go about adding new directories to be added to the codecompletion parser? The procedure is explained in CodeBlocks FAQ at http://wiki.codeblocks.org/index.php?title=FAQ-Settings. However, as I found out, only the second method works in CodeBlocks v13.12, i.e. only the per-project non-standard include directories (to be parsed) can be configured. These are the steps:
- Activate the project (either by double clicking on it in the Projects pane or right click on the project and then click "Activate")
- Click on the "Project | Properties" menu.
- Click on the "C/C++ parser options" tab.
- Add the additional include directory to be parsed by the Code Completion plugin.
- Click on OK.
Wednesday, February 26, 2014
OpenGL Application Development in Windows 8.1 64-bit
I've been doing some OpenGL application development with Visual Studio 2012 for a week or so but I found it rather frustrating because M$ doesn't provide all headers required by C99 standards. Moreover, I have yet to configure GLSL syntax highlighting successfully in Visual Studio 2012. Well, it turned out it's much better to carryout OpenGL-related development with MinGW and using CodeBlocks as the IDE.
You can download CodeBlocks from www.codeblocks.org and use the 64-bit MinGW distribution from http://nuwen.net/mingw.html. The only missing library would be freeglut for MinGW which you can download from http://www.transmissionzero.co.uk/software/freeglut-devel/. The MinGW distribution from Stephan T. Lavavej (nuwen.net) already has GLEW in it, but it doesn't have glut or freeglut.
The way I setup my development environment as follows:
- Use CodeBlocks as the IDE, i.e. download and use CodeBlocks distribution that DOESN'T include MinGW because we are going to use the one from nuwen.net.
- Use nuwen.net MinGW as the source for base GCC, GLEW and GLM tools, libraries and includes.
- Use Freeglut for MinGW as the glut replacement.
- Create an empty project in CodeBlocks.
- Add all tutorial 01 source code from the basics arc (http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Introduction) into the empty project.
- Fix all required settings before building the project, i.e. compiler include directory search paths and libraries search paths. The details are explained below.
Once everything compiled and linked successfully, you can run the application. This is how the application should look like.
Well done. Now, you can proceed developing all other OpenGL application in Windows without thinking about C99 and GLSL syntax highlighting matters :-).
Anyway, you could actually setup the compiler and linker setting in per-project basis in CodeBlocks via the Project|Build Option menu. Clicking this menu will open a similar dialog box as shown in the screenshot above. However, it will only apply to currently active project.
UPDATE:
-----------
- The CodeBlocks steps I mentioned above are rather brute force approach. I'll update it with a better solution in the future.
Well done. Now, you can proceed developing all other OpenGL application in Windows without thinking about C99 and GLSL syntax highlighting matters :-).
Anyway, you could actually setup the compiler and linker setting in per-project basis in CodeBlocks via the Project|Build Option menu. Clicking this menu will open a similar dialog box as shown in the screenshot above. However, it will only apply to currently active project.
UPDATE:
-----------
- The CodeBlocks steps I mentioned above are rather brute force approach. I'll update it with a better solution in the future.
Tuesday, February 18, 2014
Up-to-Date OpenGL Tutorial for Beginner
I found the Swiftless series article on OpenGL at: OpenGL 2 Tutorials and OpenGL 4 Tutorials
to be very compelling for newbie on the subject. They are particularly easy to follow for complete newbie.
One thing that sets them apart from other articles on the subject is they cover recent implementation of OpenGL. Therefore, it's easier to follow on present day OpenGL library available on recent systems and also features supported by present day GPUs.
Nice stuff Swiftless. Kudos to your work :-)
If you want a quite lengthy but deep introduction, head to Learning Modern 3D Graphics Programming. This is the most complete tutorial I found on the Net so far. Well, it's very well structured for my taste. I think, it's even better than http://en.wikibooks.org/wiki/OpenGL_Programming.
to be very compelling for newbie on the subject. They are particularly easy to follow for complete newbie.
One thing that sets them apart from other articles on the subject is they cover recent implementation of OpenGL. Therefore, it's easier to follow on present day OpenGL library available on recent systems and also features supported by present day GPUs.
Nice stuff Swiftless. Kudos to your work :-)
If you want a quite lengthy but deep introduction, head to Learning Modern 3D Graphics Programming. This is the most complete tutorial I found on the Net so far. Well, it's very well structured for my taste. I think, it's even better than http://en.wikibooks.org/wiki/OpenGL_Programming.
Subscribe to:
Comments (Atom)

