Giter Site home page Giter Site logo

sb7code's People

Contributors

grahamsellers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sb7code's Issues

layout(binding=0) uniform sampler2D requires `#version 420 core`

Problem:
I got this when running the bumpmapping example:

VERSION: 4.6 (Core Profile) Mesa 21.2.6
RENDERER: Mesa Intel(R) UHD Graphics (CML GT2)
media/shaders/bumpmapping/bumpmapping.fs.glsl: 0:6(9): error: unrecognized layout identifier `binding'

The example application does not render correctly.


Fix:
The bumpmapping.fs.glsl shader has #version 410 core. Changing this to #version 420 core will fix this issue, and the example appears correct.

binding was made core in 4.2 and so may not work as expected in 4.1. Some drivers may have not enforced this.


I would have opened a pull request to address this, but was not able to. Thanks.

Hardcoded glfw3 in cmake

On my operating system the name of a glfw library is libglfw.so.3, not libglfw3.so*.

It looks like the glfw3 string is hardcoded into CMakeLists.txt:

pkg_check_modules(GLFW REQUIRED glfw3)
set(COMMON_LIBS sb7 glfw3 X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)

When I replaced glfw3 by the ${GLFW_LIBRARIES} it started to work.

set(COMMON_LIBS sb7 ${GLFW_LIBRARIES} X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)

Could you add this change into repository?

few bugs in vmath.h

in function
template <typename T, int len>
static inline T angle(const vecN<T,len>& a, const vecN<T,len>& b)
{
return arccos(dot(a, b));
}
my g++ 5.4.0 tell me what he don't know what is a arccos.
also it seems to me that arkosinus should be taken from the scalar product divided by the product of the lengths of the vectors.
Did i miss something?

Can't build on OSX 10.10.5

Getting this error when trying to build on mac.

James-iMac:sb7code jamesbutler$ cmake -G "Unix Makefiles"
-- The C compiler identification is Clang 7.0.0
-- The CXX compiler identification is Clang 7.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28")
-- checking for module 'glfw3'
-- found glfw3, version 3.1.1
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
-- Configuring done
-- Generating done

Installation in Windows 10 Visual Studio 2019

Windows / Microsoft Visual Studio 2019

I leave here the configuration of the installation of Visual Studio 2019 in Windows. Before modifying anything I got an error with the GLFW compiled libraries. The solution (or at least as it has worked for me) was changing the environment and assigning the platform on which the programs will run.
I have also fixed the output of the last cmake command where files were not being generated where they should be. This onstallation guide is the same as in the source code, only the essential parts are modified.

Install CMake. Windows binaries are available from http://www.cmake.org/.
Ensure that CMake is in your path.
Open a command prompt and change to the directory where you've checked out the code.

Build GLFW

If you are going to use the copy of GLFW included in the archive, enter the
GLFW directory in extern/glfw-3.0.4, and type:

cmake -G "Visual Studio 16 2019" -A Win32 .

Open the resulting GLFW.sln file in Visual Studio and build both the debug and release configurations.

Copy and rename the resulting glfw3 libraries:

  • Copy glfw-3.0.4/src/Debug/glfw3.lib into the lib directory and rename it to glfw3_d.lib.
  • Copy glf3-3.0.4/src/Release/glfw3.lib into the lib directory but don't rename it.

Build the samples

Open a command prompt and change to the build directory in the source archive.
Type:

cmake -G "Visual Studio 16 2019" -A Win32 -S .. -B .

Open the resulting superbible7.sln project in Visual Studio.

The examples will build into the bin directory.

I hope it works for you.
Good luck!

suggestion: book should reference program names in this repo

Overall the book is very helpful and I really appreciate the effort, but it would be a bit easier to cross-reference the source code described in the book if you highlighted the name of the program being discussed in the text. I'm looking at the book in Kindle reader by the way. For example, in the first OpenGL application discussed, the program name is "simpleclear" but it isn't mentioned in the book, I had to guess which one it was. Same for the next one.

Segv crashes on Linux with Catalyst 15.7

All examples works great except these two:

bindlesstex example crashes at line 156, glMakeTextureHandleResidentARB function:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff33a6c6f in ?? () from /usr/lib/dri/fglrx_dri.so
#2  0x00007ffff2c9f82e in ?? () from /usr/lib/dri/fglrx_dri.so
#3  0x00007ffff2d7b5e2 in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x00007ffff2d7cd0e in ?? () from /usr/lib/dri/fglrx_dri.so
#5  0x00007ffff2d7e1e0 in ?? () from /usr/lib/dri/fglrx_dri.so
#6  0x00007ffff2a5ddbd in ?? () from /usr/lib/dri/fglrx_dri.so
#7  0x00007ffff21443e5 in ?? () from /usr/lib/dri/fglrx_dri.so
#8  0x0000000000414820 in bindlesstex_app::startup (this=0x448f70)
    at ../src/bindlesstex/bindlesstex.cpp:156
#9  0x000000000041562e in sb7::application::run (this=0x448f70, the_app=0x448f70)
    at ../include/sb7.h:159
#10 0x0000000000414efc in main (argc=1, argv=0x7fffffffdea8)
    at ../src/bindlesstex/bindlesstex.cpp:256

sparsetexture example crashes at line 173, glTexSubImage2D function:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2d24c4c in ?? () from /usr/lib/dri/fglrx_dri.so
(gdb) bt
#0  0x00007ffff2d24c4c in ?? () from /usr/lib/dri/fglrx_dri.so
#1  0x00007ffff2ca75e9 in ?? () from /usr/lib/dri/fglrx_dri.so
#2  0x00007ffff2cb0075 in ?? () from /usr/lib/dri/fglrx_dri.so
#3  0x00007ffff2cb9774 in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x00007ffff2a5cb98 in ?? () from /usr/lib/dri/fglrx_dri.so
#5  0x00007ffff2a5fe85 in ?? () from /usr/lib/dri/fglrx_dri.so
#6  0x00007ffff2a68ac3 in ?? () from /usr/lib/dri/fglrx_dri.so
#7  0x00007ffff212e654 in ?? () from /usr/lib/dri/fglrx_dri.so
#8  0x00007ffff212f038 in ?? () from /usr/lib/dri/fglrx_dri.so
#9  0x00007ffff25d6027 in ?? () from /usr/lib/dri/fglrx_dri.so
#10 0x00000000004144a3 in sparsetexture_app::render (this=0x447f70, 
    currentTime=0.07021405) at ../src/sparsetexture/sparsetexture.cpp:173
#11 0x0000000000414d5a in sb7::application::run (this=0x447f70, the_app=0x447f70)
    at ../include/sb7.h:163
#12 0x0000000000414626 in main (argc=1, argv=0x7fffffffdea8)
    at ../src/sparsetexture/sparsetexture.cpp:207

I guess ?? in backtraces mean that driver has no debug symbols in it, don't know how to debug it further.

No "CmakeList.txt" under build folder

When following this step of the build instructions:

Open a command prompt and change to the build directory in the source archive.
Type:
cmake -G "Visual Studio 12" .

The following error is thrown;

Make Error: The source directory "D:/Projects/sb7code/build" does not appear to contain CMakeLists.txt.

Despite there being a file named

!RUN CMAKE FROM HERE.txt

However running it from the root directory works.

creating your own project on visual studio

Thank you for all these great examples in the book. I am looking forward to go through them. I am new to opengl and I just purchased your book and was able to build on my Windows system and I go to run your examples. Then I wanted to add my own project in my VS2013 solution. I replicated all settings for running examples into my new small project. However, this is not trivial. Is there a go-by that you, the author, or anyone else can provide?
Thanks.

writing the first application

I followed the instructions and successfully built glfw and superbible7 in visual studio 2019.
I'm trying to follow through the book from the second chapter
But I'm not sure what to do next. There is no guide in between.
I have a good knowledge of C++ not so much on setups.
Can you tell me where I should start?

Can´t get them to run on windows 10

The examples compile without any errors but when i try to run them nothing happens.
When i try to debug them from visual studio it freezes. When i try to open them from windows, explorer freezes.
I´m using Windows 10, Visual Studio 2013 and my graphics card is a nvidia gtx 680m

flare.ktx broken

Hi,
the mirrorclampedge example results in black screen. I tracked down the reason down to the flare.ktx being most likely broken.
The problem being:

---------------
GL_INVALID_ENUM in glTexStorage2D(internalformat = GL_RGB)
Message ID: 5
Source: API
Type: Error
Severity: high
---------------
GL_INVALID_OPERATION in glTexSubImage2D(invalid texture level 0)
Message ID: 5
Source: API
Type: Error
Severity: high
---------------
GL_INVALID_OPERATION in glGenerateMipmap(zero size base image)
Message ID: 5
Source: API
Type: Error
Severity: high

ktxinfo utility says the following:

> ktxinfo flare.ktx 
Header

�KTX 11�
�
������
endianness: 0x4030201
glType: 0x1401
glTypeSize: 1
glFormat: 0x1907
glInternalformat: 0x1907
glBaseInternalformat: 0x1907
pixelWidth: 512
pixelHeight: 512
pixelDepth: 0
numberOfArrayElements: 0
numberOfFaces: 0
numberOfMipLevels: 1
bytesOfKeyValueData: 0
The KTX 1 file pHeader is invalid:
  it has invalid data such as bad glTypSize, improper dimensions,
improper number of faces or too many levels.

Do you have working version of flare.ktx?

bug sb7code/include/vmath.h

Lines 1298 and 1304 of vmath.h have a bug in the implementation of mix(). According to the definition of linear interpolation, the code implementation seems to be should be

template <typename T>
static inline T mix(const T& A, const T& B, typename T::element_type t)
{
    return A + t * (B - A);
}

OpenGL 4.1?

Hi There,

Do the provided examples work with OpenGL 4.1 drivers?
I can build a project, but when I run .exe file nothing happens.

Thank you.

spinnycube doesn't show cube/s

The window is green, no cube is displayed. (Debian 8)

`#include <sb7.h>
#include <vmath.h>

// Remove this to draw only a single cube!
// #define MANY_CUBES

class singlepoint_app : public sb7::application
{
void init()
{
static const char title[] = "OpenGL SuperBible - Spinny Cube";

    sb7::application::init();

    memcpy(info.title, title, sizeof(title));
}

virtual void startup()
{
    static const char * vs_source[] =
    {
        "#version 410 core                                                  \n"
        "                                                                   \n"
        "in vec4 position;                                                  \n"
        "                                                                   \n"
        "out VS_OUT                                                         \n"
        "{                                                                  \n"
        "    vec4 color;                                                    \n"
        "} vs_out;                                                          \n"
        "                                                                   \n"
        "uniform mat4 mv_matrix;                                            \n"
        "uniform mat4 proj_matrix;                                          \n"
        "                                                                   \n"
        "void main(void)                                                    \n"
        "{                                                                  \n"
        "    gl_Position = proj_matrix * mv_matrix * position;              \n"
        "    vs_out.color = position * 2.0 + vec4(0.5, 0.5, 0.5, 0.0);      \n"
        "}                                                                  \n"
    };

    static const char * fs_source[] =
    {
        "#version 410 core                                                  \n"
        "                                                                   \n"
        "out vec4 color;                                                    \n"
        "                                                                   \n"
        "in VS_OUT                                                          \n"
        "{                                                                  \n"
        "    vec4 color;                                                    \n"
        "} fs_in;                                                           \n"
        "                                                                   \n"
        "void main(void)                                                    \n"
        "{                                                                  \n"
        "    color = fs_in.color;                                           \n"
        "}                                                                  \n"
    };

    program = glCreateProgram();
    GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
    glShaderSource(fs, 1, fs_source, NULL);
    glCompileShader(fs);

    GLuint vs = glCreateShader(GL_VERTEX_SHADER);
    glShaderSource(vs, 1, vs_source, NULL);
    glCompileShader(vs);

    glAttachShader(program, vs);
    glAttachShader(program, fs);

    glLinkProgram(program);

    mv_location = glGetUniformLocation(program, "mv_matrix");
    proj_location = glGetUniformLocation(program, "proj_matrix");

    glGenVertexArrays(1, &vao);
    glBindVertexArray(vao);

    static const GLfloat vertex_positions[] =
    {
        -0.25f,  0.25f, -0.25f,
        -0.25f, -0.25f, -0.25f,
         0.25f, -0.25f, -0.25f,

         0.25f, -0.25f, -0.25f,
         0.25f,  0.25f, -0.25f,
        -0.25f,  0.25f, -0.25f,

         0.25f, -0.25f, -0.25f,
         0.25f, -0.25f,  0.25f,
         0.25f,  0.25f, -0.25f,

         0.25f, -0.25f,  0.25f,
         0.25f,  0.25f,  0.25f,
         0.25f,  0.25f, -0.25f,

         0.25f, -0.25f,  0.25f,
        -0.25f, -0.25f,  0.25f,
         0.25f,  0.25f,  0.25f,

        -0.25f, -0.25f,  0.25f,
        -0.25f,  0.25f,  0.25f,
         0.25f,  0.25f,  0.25f,

        -0.25f, -0.25f,  0.25f,
        -0.25f, -0.25f, -0.25f,
        -0.25f,  0.25f,  0.25f,

        -0.25f, -0.25f, -0.25f,
        -0.25f,  0.25f, -0.25f,
        -0.25f,  0.25f,  0.25f,

        -0.25f, -0.25f,  0.25f,
         0.25f, -0.25f,  0.25f,
         0.25f, -0.25f, -0.25f,

         0.25f, -0.25f, -0.25f,
        -0.25f, -0.25f, -0.25f,
        -0.25f, -0.25f,  0.25f,

        -0.25f,  0.25f, -0.25f,
         0.25f,  0.25f, -0.25f,
         0.25f,  0.25f,  0.25f,

         0.25f,  0.25f,  0.25f,
        -0.25f,  0.25f,  0.25f,
        -0.25f,  0.25f, -0.25f
    };

    glGenBuffers(1, &buffer);
    glBindBuffer(GL_ARRAY_BUFFER, buffer);
    glBufferData(GL_ARRAY_BUFFER,
                 sizeof(vertex_positions),
                 vertex_positions,
                 GL_STATIC_DRAW);
    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);
    glEnableVertexAttribArray(0);

    glEnable(GL_CULL_FACE);
    glFrontFace(GL_CW);

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
}

virtual void render(double currentTime)
{
    static const GLfloat green[] = { 0.0f, 0.25f, 0.0f, 1.0f };
    static const GLfloat one = 1.0f;

    glViewport(0, 0, info.windowWidth, info.windowHeight);
    glClearBufferfv(GL_COLOR, 0, green);
    glClearBufferfv(GL_DEPTH, 0, &one);

    glUseProgram(program);

    glUniformMatrix4fv(proj_location, 1, GL_FALSE, proj_matrix);

#ifdef MANY_CUBES
int i;
for (i = 0; i < 24; i++)
{
float f = (float)i + (float)currentTime * 0.3f;
vmath::mat4 mv_matrix = vmath::translate(0.0f, 0.0f, -6.0f) *
vmath::rotate((float)currentTime * 45.0f, 0.0f, 1.0f, 0.0f) *
vmath::rotate((float)currentTime * 21.0f, 1.0f, 0.0f, 0.0f) *
vmath::translate(sinf(2.1f * f) * 2.0f,
cosf(1.7f * f) * 2.0f,
sinf(1.3f * f) * cosf(1.5f * f) * 2.0f);
glUniformMatrix4fv(mv_location, 1, GL_FALSE, mv_matrix);
glDrawArrays(GL_TRIANGLES, 0, 36);
}
#else
float f = (float)currentTime * 0.3f;
vmath::mat4 mv_matrix = vmath::translate(0.0f, 0.0f, -4.0f) *
vmath::translate(sinf(2.1f * f) * 0.5f,
cosf(1.7f * f) * 0.5f,
sinf(1.3f * f) * cosf(1.5f * f) * 2.0f) *
vmath::rotate((float)currentTime * 45.0f, 0.0f, 1.0f, 0.0f) *
vmath::rotate((float)currentTime * 81.0f, 1.0f, 0.0f, 0.0f);
glUniformMatrix4fv(mv_location, 1, GL_FALSE, mv_matrix);
glDrawArrays(GL_TRIANGLES, 0, 36);
#endif
}

virtual void shutdown()
{
    glDeleteVertexArrays(1, &vao);
    glDeleteProgram(program);
    glDeleteBuffers(1, &buffer);
}

void onResize(int w, int h)
{
    sb7::application::onResize(w, h);

    aspect = (float)w / (float)h;
    proj_matrix = vmath::perspective(50.0f, aspect, 0.1f, 1000.0f);
}

private:
GLuint program;
GLuint vao;
GLuint buffer;
GLint mv_location;
GLint proj_location;

float           aspect;
vmath::mat4     proj_matrix;

};

DECLARE_MAIN(singlepoint_app)`

Add a LICENSE.txt

Make it easier for people to find the license.

MIT from file comments I've looked into.

tweak to CMakeLists.txt for Fedora 27

This is what I did to get this repo to build on Fedora 27:

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 580758a..2b8d9d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ set(COMMON_LIBS sb7 optimized glfw3 debug glfw3_d ${GLFW_LIBRARIES} ${OPENGL_LIB
 elseif (UNIX)
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(GLFW REQUIRED glfw3)
-set(COMMON_LIBS sb7 glfw3 X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)
+set(COMMON_LIBS sb7 glfw X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)
 else()
 set(COMMON_LIBS sb7)
 endif()

am running with glfw-3.2.1-6.fc27.x86_64 RPM. Is this supported? I am seeing some segfaults in some of the example programs. Thx again for the book.

Missing perftest shaders

Hi,

I'm trying to work through your perf-readpixels project in the source code for the OpenGL Superbible. However, I notice that the shaders (and entire perftest folder) 'perftest/render.vs.glsl' & 'perftest/render.fs.glsl' are missing from the downloaded media. Can you make those two shaders available for download?

Thanks in advance (and for the book!)

sdfdemo - virus warning

For some reason Kaspersky Antivirus detects HEUR Trojan in built binary of sdfdemo.
More info at: virustotal.

Built using VS2013 against Windows 7 x64 bit using latest version of cmake (cmake-3.5.2-win32-x86)

Cannot compile in Ubuntu 17.10

the cmake command executes correctly, the make returns an error:

/usr/bin/ld: cannot find -lglfw3 /usr/bin/ld: cannot find -lXinerama /usr/bin/ld: cannot find -lXi /usr/bin/ld: cannot find -lXcursor collect2: error: ld returned 1 exit status CMakeFiles/wrapmodes.dir/build.make:95: recipe for target '../bin/wrapmodes' failed make[2]: *** [../bin/wrapmodes] Error 1 CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/wrapmodes.dir/all' failed make[1]: *** [CMakeFiles/wrapmodes.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

I tried both on Wayland and x11, none works, same issue, I do have glfw3 and glfw3-dev

Hints?

Will the media files get their own repository?

I would like to create a pull request for some shaders I tweaked, and also ask that media/textures/salad-gray.ktx is uploaded - it's not available in the .ZIP as of today (July 24th), and it is needed in line 90 of src/prefixsum2d/prefixsum2d.cpp.

Possible bug in prefixsum.cs.glsl file

Hi!

Could you check prefixsum.cs.glsl shader.
There could be a bug in the line 32. There is step < steps and I think it should be step <= steps, because in the first version it doesn't calculate the last step.

Can not build on Mac

can not build on Mac OS 10.11.
/sb7code/include/GL/glext.h:6165:22: error: typedef redefinition with different types ('unsigned int' vs 'void *') typedef unsigned int GLhandleARB; ^ /System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:28:18: note: previous definition is here typedef void *GLhandleARB; ^ 1 warning and 1 error generated.

bumpmapping cannot work

i compile the solution under vs2015 with recompiled glew lib, sb7 lib. but the bumpmapping project cannot work, it seems the texture cannot display properly.
screenclip

An example of bumpmapping cannot appear.

Your GitHub repository is fine, but your media/shader has a trivial error:

media/shaders/bumpmapping/bumpmapping.fs.glsl:0(6) : error C7532: layout(binding) requires "#version 420" or later
0(6) : error C0000: ... or #extension GL_ARB_shading_language_420pack : enable
0(7) : error C7532: layout(binding) requires "#version 420" or later
0(7) : error C0000: ... or #extension GL_ARB_shading_language_420pack : enable

I fixed a version over 420 in your (fragment/vertex)shader code and it was working, yes that was trivial.

Convert files into UTF8

QtCreator complains about non utf8 character and forces me to chose an encoding. It is probably due to special character after "Copyright" word in files' headers.

Could you convert all files into UTF8 or remove special characters?

How to build on VS2017

I am trying to build the system following the instructions, but it is failing.

I am using Windows 10 and Visual Studio 2017. Are there some up-to-date instructions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.