rongguodong / oglsuperbible5 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/oglsuperbible5
Automatically exported from code.google.com/p/oglsuperbible5
glUniform1i(locTexture, 1);
from Dissolve.cpp should be:
glUniform1i(locTexture, 0);//we use texture unit zero!
Also, the fragment shader samples the texture, discards the texel if needed,
but never applies the sampled texture color to the texel, hence, one must add
this line:
vFragColor *= texture(cloudTexture, vVaryingTexCoord);
after the code that applies the ambient and diffuse colors for the texture to
be able to appear on screen at all.
Original issue reported on code.google.com by [email protected]
on 3 Jul 2011 at 1:09
In the Ch13 code, the wglChoosePixelFormatARB attribute code is
WGL_ACCELERATION_ARB, 1, // must be HW accelerated
but WGL_ACCELERATION_ARB's value should be one of the values
WGL_NO_ACCELERATION_ARB 0x2025
WGL_GENERIC_ACCELERATION_ARB 0x2026
WGL_FULL_ACCELERATION_ARB 0x2027
This error causes the Ch13 examples to fail on an NVIDIA Quadro FX
880M/PCI/SSE2 Quadro FX 880M/PCI/SSE2.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2011 at 7:30
What steps will reproduce the problem?
1. Use an editor that can show the whitespace.
2. See all the mixed spaces and tabs.
3. Feel uncomfortable.
It might be my OCD acting up but this mixed use of spaces and tabs really
upsets me. I'd be more than willing to go trough the source files and fix this.
If you can give me some pointers on what you would like (spaces/tabs etc) I can
get started and provide patches.
Original issue reported on code.google.com by [email protected]
on 25 Nov 2010 at 10:30
What steps will reproduce the problem?
1. I get into problems when the code gets down to the GLEW library init
2. I am running Win Vista 64bit w/ new OpenGL drivers, developing in Visual C++
2010 Express Edition.
3. If you have read or know the first example, it's in Chapter 2.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
It wont compile.
Original issue reported on code.google.com by [email protected]
on 22 Feb 2011 at 2:29
What steps will reproduce the problem?
1. Build the chapter 7 PointSprites example on Linux
2. Run the example
What is the expected output? What do you see instead?
You get a black screen instead of a field of stars
What version of the product are you using? On what operating system?
Ubuntu 10.10
Please provide any additional information below.
The problem is the source code references 'Star.tga', while the actual filename
is 'star.tga', causing the loading of the file to fail.
Original issue reported on code.google.com by [email protected]
on 1 Dec 2010 at 9:49
What steps will reproduce the problem?
1. Download a SVN client(like Tortoise SVN)
2. Try to download using the provided URL
(http://oglsuperbible5.googlecode.com/svn/trunk/ oglsuperbible5-read-only)
3. Sometimes the provided URL, doesn't work, so then I use
this(http://oglsuperbible5.googlecode.com/svn/trunk)
What is the expected output? What do you see instead?
I expect the files, but midway through it stops, the errors are usually
random, mostly about corrupted files and folders or about not being able to
read something.
What version of the product are you using? On what operating system?
Tortoise SVN(Latest update)
Rapid SVN(Latest stable version)
Original issue reported on code.google.com by [email protected]
on 15 Dec 2010 at 4:15
What steps will reproduce the problem?
1. Compile & run the code from Chapter 2 in either VS 2008 or 2010
What is the expected output? What do you see instead?
Expected Output: Blue background with red triangle.
What I see: Blue background
What version of the product are you using? On what operating system?
I've used GLtools and freeglut_static straight from SVN, Revision #193. Windows
7 64-bit SP1
Please provide any additional information below.
No compiler warnings or errors, everything is linked up just as the book says.
In order for the code to work, I have to declare the following three lines
twice consecutively:
triangleBatch.Begin(GL_TRIANGLES, 3);
triangleBatch.CopyVertexData3f(vVerts);
triangleBatch.End();
How do I get his to work without having to declare my triangles twice?
Source attached.
Original issue reported on code.google.com by [email protected]
on 27 Aug 2011 at 9:07
Attachments:
When GLBatch is declared but not used - its destructor yields a seg fault.
To fix this issue replace in GLBatch::~GLBatch() this:
#ifndef OPENGL_ES
glDeleteVertexArrays(1, &vertexArrayObject);
#endif
with this:
#ifndef OPENGL_ES
if(vertexArrayObject != 0) {
glDeleteVertexArrays(1, &vertexArrayObject);
}
#endif
Original issue reported on code.google.com by [email protected]
on 23 Jun 2011 at 5:34
What steps will reproduce the problem?
1. Set up a project according to the instructions in Chapter 2, but using the
block.cpp sourcecode from chapter 1.
2. Included libGLTools.a from the XCode.zip download into the project.
What is the expected output? What do you see instead?
The linker error that I'm getting is the typical undefined symbol:
"gltReadTGABits(char const*, int*, int*, int*, unsigned int*). It doesn't seem
to matter whether I compile 32-bit or 64-bit.
BTW, the Triangle example works fine, so I don't think the problem is my setup.
What version of the product are you using? On what operating system?
OSX 10.6, XCode 4.0
Please provide any additional information below.
I'm a little new to Mac programming as well as OpenGL -- but I see other
newbies with the same problem on other discussion boards. They've largely
solved it by copying the source of the function directly into their source
file. I'd rather figure out what the cause is and fix that.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2011 at 10:06
What steps will reproduce the problem?
1. Create a Makefile if there isn't one
2. Compile the sample program
What is the expected output? What do you see instead?
The sample is expected to show a bloom on bright areas of the image, there is
no bloom instead.
What version of the product are you using? On what operating system?
Ubuntu 10.10 x86_64 / GeForce GT220 / 260.19.12
Please provide any additional information below.
The textures "hdrTextures" and "brightBlurTextures" are setup with the
GL_LINEAR_MIPMAP_LINEAR parameter, implying the required mipmap levels are
generated somewhere before their use, but that isn't happening.
I think the sample should be corrected to ask OpenGL to generate mipmaps
whenever this is needed: ie, in the "SetupHDRProg" method binding the textures
for shaders usage.
Attached here is my Makefile and the patched hdr_bloom sample program with some
other minor fixes (filename casing, GL/GLU paths..): i'm not going to attach a
patch file since svn is mangling all the output with useless line-ending stuff
(-x --ignore-eol-style doesn't ignore eol style).
Original issue reported on code.google.com by [email protected]
on 17 Oct 2010 at 1:13
Attachments:
What steps will reproduce the problem?
1. Change the specular colour in the ADSGouraud cpp program (eg to red)
2. Run
What is the expected output? What do you see instead?
Specular highlight is white.
Please provide any additional information below.
Simple fix - the vertex shader doesn't actually use the specular uniform
Change line 51 of ADSGouraud.vp from:
vVaryingColor.rgb += vec3(fSpec, fSpec, fSpec);
to:
vVaryingColor.rgb += fSpec * specularColor.rgb;
(This typo is also in the listing in the book)
Original issue reported on code.google.com by [email protected]
on 26 Nov 2010 at 10:35
The GLTools vs2010 project file is expected (I assume) to be found in
VisualStudio2010\GLTools . But, the folder is empty.
Also, if the SuperBible5_2010 solution file is loaded, it reports a failure in
loading the aforementioned project file.
Original issue reported on code.google.com by [email protected]
on 11 May 2011 at 9:21
What steps will reproduce the problem?
1. Compile and run Primitives program from Chapter 3 or Objects program from
Chapter 4
What is the expected output? What do you see instead?
Lines are not drawn and blended over filled polygon rendering.
What version of the product are you using? On what operating system?
SVN Revision 193
Ubuntu Linux 10.10 64-bit
VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4870]
OpenGL version string: 3.3.10834 Compatibility Profile Context
Please provide any additional information below.
I found that the hardware implementations of glLineWidth() may set a maximum
line width for antialiased lines. For my particular card this limit is 2 for
lines with GL_LINE_SMOOTH enabled. Lowering the line width or commenting out
line 91 allows me to properly see the wireframe effect for these programs.
Original issue reported on code.google.com by [email protected]
on 27 Jun 2011 at 4:50
What steps will reproduce the problem?
1. Open BlockRedux in Chapter13
2. Compile and run Block_Redux in Chapter 13
Expected: see the wireframe block on the floor
Got: just a white diagonal line bisecting the screen
What version of the product are you using? On what operating system?
oglsuperbible5 svn r176
Visual Studio C++ 2010 Express
Windows 7
I have a workaround for this issue: force the program to create a lower-level
rendering context, viz:
g_hRC = wglCreateContextAttribsARB(g_hDC, 0, attribs);
if (true || g_hRC == NULL)
{
printf("!!! Could not create an OpenGL 3.3 context.\n");
attribs[3] = 2;
g_hRC = wglCreateContextAttribsARB(g_hDC, 0, attribs);
if (true || g_hRC == NULL)
{
printf("!!! Could not create an OpenGL 3.2 context.\n");
attribs[3] = 1;
g_hRC = wglCreateContextAttribsARB(g_hDC, 0, attribs);
.....presumably the cause of this problem is that a higher opengl version is
being reported than the program can create a context for. I don't really
understand the implications, or whether it should means the driver is incorrect
or that the program should be changed, but perhaps this post may be of some
help to others.
Original issue reported on code.google.com by [email protected]
on 17 Nov 2010 at 6:04
At least Triangles and Bounce VS2008 projects are broken (I assume others are
also).
You get:
LINK : fatal error LNK1104: cannot open file 'freeglut.lib'
Because 2010-12-31 the freeglut-2.6.0/include/GL/freeglut_std.h file was
modified in svn:
From:
71# pragma comment (lib, "freeglut_static.lib")
To:
71# pragma comment (lib, "freeglut.lib")
So freeglut always adds lib include for "freeglut.lib", even when
FREEGLUT_STATIC is defined.
Changing that back to "freeglut_static.lib" fixes the problem.
Original issue reported on code.google.com by [email protected]
on 8 Feb 2011 at 9:36
What steps will reproduce the problem?
Unknown
What is the expected output? What do you see instead?
InitializeStockShaders() return true; but it returns false
shaded triangle; blank triangle
What version of the product are you using? On what operating system?
Irrelevent? Windows 7 Ultimate x64, the latest SB5.zip package from the book
site.
Please provide any additional information below.
I know nothing about dealing with GLSL, hence I am reading this book.
Using the latest version of GLEW.
I have my own framework which I use to get a window to draw in etc., but I set
up everything to actually draw the triangle exactly like in the example. I can
confirm everything needed to set up OpenGL is done. The triangle draws, but the
shader apparently fails to compile and the result is a white, unshaded
triangle. Doing something like "myobjectname.InitializeStockShaders();" yields
a return value of false. I really don't understand the process of compiling
shader programs at this point, so it's extremely frustrating to delve into this
code that I have no way to understand, but it looks like in the
gltLoadShaderPairSrcWithAttributes() function the first call to glGetShaderiv()
returns GL_FALSE when processing GLT_SHADER_IDENTITY.
It boggles my mind. I have no idea what to google for. Totally stuck. Any help
is appreciated.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2011 at 2:27
Specular component in ADSGourad and ADSPhong are computed with an incorrect
equation.
The correct specular component should be computed by the scalar product of the
reflection vector and the normalized position vector of the fragment/vertex
with respect to the camera (which is normalized(vPosition3) for ADSGourad)
The incorrect code...
// Specular Light
vec3 vReflection = normalize(reflect(-vLightDir, vEyeNormal));
float spec = max(0.0, dot(vEyeNormal, vReflection));
if(diff != 0) {
float fSpec = pow(spec, 128.0);
vVaryingColor.rgb += vec3(fSpec, fSpec, fSpec);
}
The code below fixes the specular calculation and also makes a small
optimization... if diff is zero, we dont need to calculate the specular
component.
// Specular Light
if (diff != 0){ // do this only if diffusion is non zero.
vec3 vReflection = normalize(reflect(-vLightDir, vEyeNormal));
vec3 vNormPos3 = normalize(vPosition3);
float spec = max(0.0, -dot(vNormPos3, vReflection)); // correct specular component
float fSpec = pow(spec, 128.0);
vVaryingColor.rgb += fSpec * specularColor.rgb;
}
The same problem also affects ADSPhong. The fix is as follows...
Add new out attribute vVaryingPosition to ADSPhong.vp
smooth out vec3 vVaryingLightDir;
smooth out vec3 vVaryingPosition;// new line
...
...
vVaryingLightDir = normalize(vLightPosition - vPosition3);
vVaryingPosition = vPosition3; // new line
and add correct specular calculation to ADSPhong.fp
smooth in vec3 vVaryingLightDir;
smooth in vec3 vVaryingPosition; // new line
...
...
// Specular Light
if(diff != 0) {
vec3 vReflection = normalize(reflect(-normalize(vVaryingLightDir), normalize(vVaryingNormal)));
float spec = max(0.0, -dot(normalize(vVaryingPosition), vReflection));
float fSpec = pow(spec, 128.0);
vFragColor.rgb += fSpec * specularColor.rgb;
}
The incorrect and correct Phong lighting outputs are attached.
Original issue reported on code.google.com by [email protected]
on 17 Sep 2012 at 11:21
Attachments:
What steps will reproduce the problem?
1.Run Block example in VC++2010
2.
3.
What is the expected output? What do you see instead?
Pressing space bar should cycle through wireframe till textured. The textured
output gives only a black screen (up to there everything else works OK).
What version of the product are you using? On what operating system?
Superbible 5, Win7 x64
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 Sep 2012 at 12:50
What steps will reproduce the problem?
1. Compile and run chapter 13 Block_redux example.
2.
3.
What is the expected output? What do you see instead?
OpenGL window just shows white screen instead of scene.
What version of the product are you using? On what operating system?
Windows 7
Please provide any additional information below.
Setting double buffering is missing when specifying pixel attributes:
WGL_DOUBLE_BUFFER_ARB, GL_TRUE, // Double buffered context
Original issue reported on code.google.com by [email protected]
on 20 Jan 2012 at 2:53
What steps will reproduce the problem?
1. run any of those 3 demos on my laptop
What is the expected output? What do you see instead?
I expect to see a torus in the middle. I see no torus in the middle.
What version of the product are you using? On what operating system?
SVN revision 192. Ubuntu 11.04 "Natty" prerelease. My graphics card is an ATI
Radeon 4225.
Please provide any additional information below.
If I swap the order that the sphere and torus are assigned, the torus displays.
The original code is (There seems to be a mix of spaces and tabs used for
indentation):
// This makes a torus
gltMakeTorus(torusBatch, 0.4f, 0.15f, 30, 30);
// This make a sphere
gltMakeSphere(sphereBatch, 0.1f, 26, 13);
The code that works for me is:
// This make a sphere
gltMakeSphere(sphereBatch, 0.1f, 26, 13);
// This makes a torus
gltMakeTorus(torusBatch, 0.4f, 0.15f, 30, 30);
I don't know if this is a problem with oglsuperbible, or a problem with my
graphics card drivers. If the consensus is driver problems, I will report it
elsewhere.
Original issue reported on code.google.com by [email protected]
on 12 Apr 2011 at 3:45
What steps will reproduce the problem?
1. Run FB0 examples from chapter 8 on NVidia drivers
What is the expected output? What do you see instead?
E.g. Reflection example, should see reflection on mirror. Instead, a blank
(black) mirror is drawn.
What version of the product are you using? On what operating system?
OpenGL 3.0, NVIDIA 9300 M graphics card
Please provide any additional information below.
This can be solved by editing the FBO texture initialisation, from line 211
onwards:
// Create the reflection texture
glGenTextures(1, &mirrorTexture);
glBindTexture(GL_TEXTURE_2D, mirrorTexture);
// ADD THE FOLLOWING TWO LINES:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
OpenGL assumes mipmaps will be used for magnification and minification, these
have not been created for the reflection texture. Alternative solution
presumably to set up mipmaps, but would have to recreate these every time the
reflection image changed.
Original issue reported on code.google.com by [email protected]
on 17 Nov 2011 at 11:26
The examples are: MultiTexture, TexturedTriangle and TextureRect
Original issue reported on code.google.com by [email protected]
on 1 Dec 2010 at 9:55
I tried to run the flocking example but it displays a blank screen. I tried to
see if the opengl pipeline is fine however, calling gltCheckErrors in the
render loop tells me that there is an error.
Original issue reported on code.google.com by [email protected]
on 8 Jan 2011 at 10:04
The CubeMapped example in Chapter07 is missing some files under the Linux
folder.
First, make fails because we are missing SkyBox shader files. Once these are
copied, the program does not display anything... thats because the pos_x and
pos_y tga files are also missing. The program also does not throw an error when
it fails to find the tga files.
Copy the following files from Src/Chapter07/CubeMapped to
Linux/Chapter07/CubeMapped
pos_x.tga
SkyBox.fp
pos_y.tga
SkyBox.vp
Now you are good to go...
Original issue reported on code.google.com by [email protected]
on 18 Sep 2012 at 6:56
The folder for MultiTexture is missing from the Linux folder...
Here are steps to build this example.
Copy the folder Src/Chapter07/MultiTexture to Linux/Chapter07.
Delete the file MultiTexture.cpp from the linux folder.
Download the Makefile and move it to the Linux/Chapter07/MultiTexture folder.
Modify the following line in Src/Chapter07/MultiTexture/MultiTexture.cpp ...
-#include <Stopwatch.h>
+#include <StopWatch.h>
Make and run.
Original issue reported on code.google.com by [email protected]
on 18 Sep 2012 at 8:31
Attachments:
What steps will reproduce the problem?
1. Check out the source code from here
2. Go into Linux/Chapter01/Block folder
3. Enter "make"
What is the expected output? What do you see instead?
The example should compile withou error.
What version of the product are you using? On what operating system?
I'm using revision 176 of the source code on 64-bit GNU/Linux with GCC 4.5.1
Please provide any additional information below.
This is the error I get:
$ make
g++ -g -I/usr/include -I/usr/local/include -I/usr/include/GL
-I../../../Src/GLTools/include/ -I../../../Src/GLTools/include/GL -o Block
-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib
../../../Src/Chapter01/Block/Block.cpp ../../../Src/GLTools/src/glew.c
../../../Src/GLTools/src/GLTools.cpp ../../../Src/GLTools/src/GLBatch.cpp
../../../Src/GLTools/src/GLTriangleBatch.cpp
../../../Src/GLTools/src/GLShaderManager.cpp
../../../Src/GLTools/src/math3d.cpp -lX11 -lglut -lGL -lGLU -lm
../../../Src/GLTools/src/GLTools.cpp: In function ‘GLuint
gltLoadShaderTripletWithAttributes(const char*, const char*, const char*,
...)’:
../../../Src/GLTools/src/GLTools.cpp:1255:32: warning: format not a string
literal and no format arguments
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1214:18: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1208:18: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1200:18: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1194:18: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1187:14: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
../../../Src/GLTools/src/GLTools.cpp:1262:1: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1181:14: error: from here
../../../Src/GLTools/src/GLTools.cpp:1233:9: error: crosses initialization of
‘int iArgCount’
make: *** [Block] Error 1
Original issue reported on code.google.com by marjana.repinc.58
on 30 Oct 2010 at 5:05
Most of the examples from chapter 11 onwards which use opengl3.3 dont work. The
reason is the glew library does not expose the func. pointers.
This also is the reason for segmentation faults for perspective program in
chapter 11
Resolution: use glewExperimental=GL_TRUE; before glewInit(); for glew v 1.5.5
I m not sure whether the current glew version has changed this but it works for
glew v 1.5.5.
The fbo examples from chapter 8 dont check for framebuffer completeness which
is strange. Chapter 9 hdr_msaa example does not work because the fbo si
attached to GL_TEXTURE_2D texture (in line 291 hdr_msaa.cpp) when it should use
GL_TEXTURE_2D_MULTISAMPLE as follows
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D_MULTISAMPLE, hdrTextures[0], 0);
More errors and their reolution are pointed out here
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=28488
5#Post284885
I have successfully build and run all the samples from the book svn release.
Original issue reported on code.google.com by [email protected]
on 7 Jan 2011 at 11:49
What steps will reproduce the problem?
1. Try to compile the VisualStudion2010.vcxproj in Visual Studio c++ express. I
suspect that it some linking problem.
What is the expected output? What do you see instead?
c:\users\brte\downloads\sb5\src\chapter01\block\block.cpp(6): fatal error
C1083: Cannot open include file: 'GLTools.h': No such file or directory
What version of the product are you using? On what operating system?
I'm using MSVC++ 2010 on Windows 7
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 30 Dec 2011 at 4:40
I'm trying the examples of the book (on my Windows 7 64bit Laptop with nVidia
graphic) but block_redux does not work.
Even the svn version does not.
The window was just white:
SwapBuffers does not "paint" into the window.
Reading "http://www.opengl.org/pipeline/article/vol003_7/" I found that I need
a "glFlush" before the SwapBuffers():
There I found this explanation:
Windowed applications that use frontbuffer rendering without ever calling
glFlush or glFinish (as they should) are likely to appear completely black,
because the rendering will sit forever in the offscreen frontbuffer. Not even
switching the DWM off is likely to fix these, given that the offscreen
frontbuffer is a requirement of the driver model itself.
Additional note:
Neither the zip file nor the SVN version did come so far.
I had to replace the value "1" for
WGL_ACCELERATION_ARB to WGL_FULL_ACCELERATION_ARB
with "1" I didn't get the pixel format error message.
Original issue reported on code.google.com by [email protected]
on 1 Feb 2011 at 10:36
Specular color declared and set in shader but not used: see the vertex shader
from Chapter 6, example ADSGouraud.
Namely:
uniform vec4 specularColor;
Original issue reported on code.google.com by [email protected]
on 2 Jul 2011 at 12:11
What steps will reproduce the problem?
1. cd into Linux/Chapter11/Perspective
2. run make
3. run ./Perspective
It issues a segmentation fault.
What is the expected output? What do you see instead?
Just the segfault above.
What version of the product are you using? On what operating system?
svn co for non-registered members checked out Dec. 30, 2010.
Ubuntu (kubuntu variant) Linux, gcc 4.4.5, nvidia binary driver 260.19.06 on
X.org 1.9, GLX ver. 1.4, OGL 3.3.
Please provide any additional information below.
Not sure what else to add.
Original issue reported on code.google.com by [email protected]
on 31 Dec 2010 at 4:25
Sample pix_buffs in Ch8 should use glTexSubImage2D instead of glTexImage2D.
See file pix_buffs.cpp, lines 399, 410 in rev 186.
Original issue reported on code.google.com by [email protected]
on 29 Dec 2010 at 8:27
What steps will reproduce the problem?
Compile and run the orthographic program
What is the expected output? What do you see instead?
I expect to see a hollow tubelike box. Instead I see a hollow tubelike box with
some added artifacts.
See attached picture
What version of the product are you using? On what operating system?
Ubuntu 12.04. Radeon HD 4850 with proprietary drivers.
Please provide any additional information below.
The artifacts usually don't appear until i try to rotate the tube. The
artifacts are different each time i run the program.
Original issue reported on code.google.com by [email protected]
on 10 May 2012 at 7:26
Attachments:
What steps will reproduce the problem?
1. Check out the code
2. cd to Linux/Chapter01/Block
3. type "make"
What is the expected output? What do you see instead?
It should compile. Instead I get this:
g++ -g -I/usr/include -I/usr/local/include -I/usr/include/GL
-I../../../Src/GLTools/include/ -I../../../Src/GLTools/include/GL -o Block
-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib
../../../Src/Chapter01/Block/Block.cpp ../../../Src/GLTools/src/glew.c
../../../Src/GLTools/src/GLTools.cpp ../../../Src/GLTools/src/GLBatch.cpp
../../../Src/GLTools/src/GLTriangleBatch.cpp
../../../Src/GLTools/src/GLShaderManager.cpp
../../../Src/GLTools/src/math3d.cpp -lX11 -lglut -lGL -lGLU -lm
In file included from ../../../Src/GLTools/include/GLTools.h:70:0,
from ../../../Src/Chapter01/Block/Block.cpp:6:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
In file included from ../../../Src/GLTools/src/glew.c:32:0:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
In file included from ../../../Src/GLTools/include/GLTools.h:70:0,
from ../../../Src/GLTools/src/GLTools.cpp:36:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
In file included from ../../../Src/GLTools/include/GLBatch.h:62:0,
from ../../../Src/GLTools/src/GLBatch.cpp:36:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
In file included from ../../../Src/GLTools/include/GLTriangleBatch.h:77:0,
from ../../../Src/GLTools/src/GLTriangleBatch.cpp:46:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
In file included from ../../../Src/GLTools/include/GLShaderManager.h:63:0,
from ../../../Src/GLTools/src/GLShaderManager.cpp:31:
../../../Src/GLTools/include/GL/glew.h:1172:20: fatal error: GL/glu.h: No such
file or directory
compilation terminated.
make: *** [Block] Error 1
What version of the product are you using? On what operating system?
Rev. 193, on Ubuntu 11.10.
Please provide any additional information below.
I assume that some prerequisites are missing. I have build-essential, but I
don't know what other packages I need. Prerequisites for building the samples
should be described in a README file.
Original issue reported on code.google.com by [email protected]
on 19 Dec 2011 at 10:09
What steps will reproduce the problem?
1. Go to amazon.com
2. Look at the preview of the OpenGL Superbible and see the coupon
3. Give me a free physical book for pointing this out :)
What is the expected output? What do you see instead?
Not to see the coupon. I see the coupon.
What version of the product are you using? On what operating system?
I use amazon.com on Windows Vista in any browser.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 10 Aug 2010 at 8:23
Texture target of glFramebufferTexture2D is currently GL_TEXTURE_2D. On my
system, this will cause
glGetIntegerv(GL_SAMPLES, &sampleCount);
to return 0 instead of 8.
Using GL_TEXTURE_2D_MULTISAMPLE as the texture target for
glFramebufferTexture2D appears to be the solution.
I'm not 100% sure as the reference pages don't discuss this issue at all, but
at least it works for me.
Original issue reported on code.google.com by [email protected]
on 20 Mar 2011 at 9:27
Attachments:
Hi,
I cannot find the spring mass example program from chapter 11. I have downloaded the latest svn release but it does not contain the spring mass demo.
Thanks,
Mobeen
Original issue reported on code.google.com by [email protected]
on 20 Dec 2010 at 7:53
What steps will reproduce the problem?
1. Compile SphereWorld on Linux x64
2. Run it.
3. Notice there is no world of spheres
What is the expected output? What do you see instead?
Expected: SphereWorld as shown in the book. Instead: a black screen
What version of the product are you using? On what operating system?
Linux arch 2.6.35-ARCH x86_64 GenuineIntel GNU/Linux
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 880M/PCI/SSE2
OpenGL version string: 3.3.0 NVIDIA 260.19.21
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Nov 2010 at 11:37
What steps will reproduce the problem?
1. Compile GLTools.cpp with gcc 4.4.5
What is the expected output? What do you see instead?
I expect it to compile. Instead, it gives the error:
GLTools.cpp: In function ‘GLuint gltLoadShaderTripletWithAttributes(const
char*, const char*, const char*, ...)’:
GLTools.cpp:1255: warning: format not a string literal and no format arguments
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1214: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1208: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1200: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1194: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1187: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
GLTools.cpp:1262: error: jump to label ‘failed’
GLTools.cpp:1181: error: from here
GLTools.cpp:1233: error: crosses initialization of ‘int iArgCount’
What version of the product are you using? On what operating system?
SVN r176
Please provide any additional information below.
Attached is a patch that fixes it for me.
Original issue reported on code.google.com by [email protected]
on 30 Oct 2010 at 10:11
Attachments:
What steps will reproduce the problem?
1. just run the executables or debug inside VS.The screen shows nothing
2.
3.
What is the expected output? What do you see instead?
Just the viewport
What version of the product are you using? On what operating system?
WindowXP 64bit
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 3 Jun 2011 at 9:16
What steps will reproduce the problem?
1. go to Linux/Chapter06/TexturedTriangle folder
2. enter "make"
What is the expected output? What do you see instead?
The example should compile but I get the error:
$ make
g++ -g -I/usr/include -I/usr/local/include -I/usr/include/GL
-I../../../Src/GLTools/include/ -I../../../Src/GLTools/include/GL -o
TexturedTriangle -L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib
../../../Src/Chapter06/TexturedTriangle/TexturedTriangle.cpp
../../../Src/GLTools/src/glew.c ../../../Src/GLTools/src/GLTools.cpp
../../../Src/GLTools/src/GLBatch.cpp
../../../Src/GLTools/src/GLTriangleBatch.cpp
../../../Src/GLTools/src/GLShaderManager.cpp
../../../Src/GLTools/src/math3d.cpp -lX11 -lglut -lGL -lGLU -lm
../../../Src/Chapter06/TexturedTriangle/TexturedTriangle.cpp: In function
‘void SetupRC()’:
../../../Src/Chapter06/TexturedTriangle/TexturedTriangle.cpp:87: error:
‘myIdentityShader’ was not declared in this scope
make: *** [TexturedTriangle] Error 1
What version of the product are you using? On what operating system?
revision 176, 64-bit GNU/Linux, GCC 4.4.5
Please provide any additional information below.
myIdentityShader should be renamed to myTexturedIdentityShader, patch attached
Original issue reported on code.google.com by marjana.repinc.58
on 2 Nov 2010 at 1:57
Attachments:
What steps will reproduce the problem?
1. Using TortoiseSVN 1.16.16 64 bit
2.
3.
What is the expected output? What do you see instead?
Command: Checkout from http://oglsuperbible5.googlecode.com/svn/trunk/
oglsuperbible5-read-only, revision HEAD, Fully recursive, Externals included
Error: URL
Error:
'http://oglsuperbible5.googlecode.com/svn/trunk/%20oglsuperbible5-read-only'
Error: doesn't exist
Finished!:
What version of the product are you using? On what operating system?
Using TortoiseSVN 1.16.16 64 bit on Windows 7 Ultimate x64.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Sep 2011 at 5:16
Line 138-142 are wrong and -anyway- not essential.
// Close the fan
nVerts++;
vPoints[nVerts][0] = r;
vPoints[nVerts][1] = 0;
vPoints[nVerts][2] = 0.0f;
The vPoints array has already 8 vertices and closes correctly. Those lines of
code create a 9th vertex which wont be picked up by
triangleFanBatch.Begin(GL_TRIANGLE_FAN, 8); and anyway define a vertex in a
wrong position (the z coordinate should be -0.5f;
Original issue reported on code.google.com by [email protected]
on 28 May 2011 at 10:10
What steps will reproduce the problem?
1. Compile the program (Dissolve - Chapter 6)
2. Run the program
3.
What is the expected output? What do you see instead?
I should see a "melting torus". I see a black window.
What version of the product are you using? On what operating system?
revision 193. Running Linux Ubuntu 11.04 desktop 64bit.
Please provide any additional information below.
The problem is that the program doesn't use the texture. The problem is in the
line 143 of Dissolve.cpp file. It should be
glUniform1i(locTexture, 0);
instead is
glUniform1i(locTexture, 1);
So the fragment shader cannot use the texture and uses instead a null vector
all the time. When comparing the texture color value (that is 0 0 0 0) to the
dissolveFactor, the comparison is always false, so the fragment goes on discard
for every pixel all the time. The result is a black window.
Original issue reported on code.google.com by [email protected]
on 22 Aug 2011 at 12:43
What steps will reproduce the problem?
1. Run any Sphereworld program
What is the expected output? What do you see instead?
No crash and the program running according to what is stated in the book.
What version of the product are you using? On what operating system?
Revision 192.
OS: Gentoo Linux for AMD 64 arch.
Please provide any additional information below.
My graphics chipset is an NVIDIA GeForce 8800 GTX
Below is the backtrace of Sphereworld via gdb:
(gdb) run
Starting program:
/home/roland/Projets/cpp-prj/oglsuperbible5-read-only/Linux/Chapter04/SphereWorl
d/SphereWorld
Program received signal SIGSEGV, Segmentation fault.
0x0000000000401dfc in GLMatrixStack::GetMatrix (this=0x0) at
../../../Src/GLTools/include/GLMatrixStack.h:165
165 const M3DMatrix44f& GetMatrix(void) { return
pStack[stackPointer]; }
(gdb) backtrace
#0 0x0000000000401dfc in GLMatrixStack::GetMatrix (this=0x0) at
../../../Src/GLTools/include/GLMatrixStack.h:165
#1 0x0000000000402390 in GLGeometryTransform::GetModelViewProjectionMatrix
(this=0x649760) at ../../../Src/GLTools/include/GLGeometryTransform.h:53
#2 0x0000000000401a93 in RenderScene () at
../../../Src/Chapter04/SphereWorld/SphereWorld.cpp:102
#3 0x00007ffff787ef18 in ?? () from /usr/lib/libglut.so.3
#4 0x00007ffff7882ae9 in fgEnumWindows () from /usr/lib/libglut.so.3
#5 0x00007ffff787f403 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#6 0x00007ffff787fdb0 in glutMainLoop () from /usr/lib/libglut.so.3
#7 0x0000000000401da3 in main (argc=1, argv=0x7fffffffd9d8) at
../../../Src/Chapter04/SphereWorld/SphereWorld.cpp:144
The backtrace are similar for the other Sphereworld programs.
Original issue reported on code.google.com by [email protected]
on 14 Apr 2011 at 2:38
What steps will reproduce the problem?
1. Run the Orthographic or Perspective example in Chapter04.
2. Rotate the hollow pipe to see the inner top face.
3. The face is always black irrespective of its angle. The attached photos show
the issue where the top face is black, as compared to the bottom face.
What is the expected output? What do you see instead?
The inner top face should change color as its angle to the light changes.
What version of the product are you using? On what operating system?
Ubuntu 10.04
Please provide any additional information below.
The normals of the top inside face are specified incorrectly in both the
programs. The normals specified are
innerBatch.Normal3f(0.0f, 1.0f, 0.0f);
The comment preceding this is also incorrect
// Normal points up Y axis
The normal for the top inner face should point down.
Changing the normals to point down fixes the problem.
// Normal points down Y axis
innerBatch.Normal3f(0.0f, -1.0f, 0.0f);
Original issue reported on code.google.com by [email protected]
on 31 Aug 2012 at 8:02
Attachments:
What steps will reproduce the problem?
1. This is not a code problem... its a typo in the book.
2. Using eyes and seeing the text on page 168.
3. I probably have too much time on my hands to be reporting this issue.
What is the expected output? What do you see instead?
The variable name should be vOrigin and not vLocation. Its correct in the code.
What version of the product are you using? On what operating system?
OGL SB 5th print edition.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 12 Sep 2012 at 5:43
This is not a code problem - just a minor correction in the book.
On page 334 of the OGL SuperBible 5, the first line says "You have seen how
some buffer binding targets such as GL_PIXEL_PACK_BUFFER and
GL_COPY_READ_BUFFER are used".
However, the code does not use GL_COPY_READ_BUFFER. It uses
GL_PIXEL_UNPACK_BUFFER.
I gather that both these methods work very similarly.
Original issue reported on code.google.com by [email protected]
on 19 Sep 2012 at 10:48
In the file "math3d.h" there are two functions:
inline void m3dInjectRotationMatrix44(M3DMatrix44f dst, const M3DMatrix33f src)
inline void m3dInjectRotationMatrix44(M3DMatrix44d dst, const M3DMatrix33d src)
M3DMatrix33f and M3DMatrix33d are arrays with a size of 9:
typedef float M3DMatrix33f[9]; // A 3 x 3 matrix, column major (floats) -
OpenGL Style
typedef double M3DMatrix33d[9]; // A 3 x 3 matrix, column major (doubles) -
OpenGL Style
but inside the functions, src parameter is treated like an array of size 16:
memcpy(dst, src, sizeof(float) * 4);
memcpy(dst + 4, src + 4, sizeof(float) * 4);
memcpy(dst + 8, src + 8, sizeof(float) * 4);
I think this is not correct.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2010 at 8:43
What steps will reproduce the problem?
1. Compile the Block example for Chapter 1 on GNU/Linux (after applying the
patch from Issue 3)
2. Run the example
3. Press Space key 4 or 5 times
What is the expected output? What do you see instead?
I expected to see table and cube with textures. What was actually there was
just all black window, because textures were not shown.
What version of the product are you using? On what operating system?
This is on 64-bit GNU/Linux with GCC 4.5.1.
Please provide any additional information below.
The problem is because the texture files (*.tga) are missing from the
Linux/Chapter01/Block/ folder. The files should be copied from
Src/Chapter01/Block/ and then it works.
Original issue reported on code.google.com by marjana.repinc.58
on 31 Oct 2010 at 1:05
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.