Git Product home page Git Product logo

openglinsightscode's Introduction

openglinsightscode's People

Contributors

cameni avatar pjcozzi avatar stegu 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openglinsightscode's Issues

building for Windows 7, Chapter 11 Antialiased Volumetric Lines

Hello, I tried to compile the code project for Chapter 11, using Visual Studio Express 2012 on a machine running Windows 7.

I am not super-familiar with openGL on the desktop, nor with Visual Studio -- in fact I just downloaded VS to try to compile this book's project.

I'm getting an error when I try to run it.
Status: Using GLEW 1.7.0
Error, Shader compilation failed for vertex_program :'1':

Vertex shader failed to compile with the following errors:
ERROR: 0:1: error<#106> Version number not supported by GL2
ERROR: 0:1 error<#308> Profile is invalid before glsl1.5.
ERROR 0:9: error<#279> Invalid layout qualifier 'location'
ERROR: 0:10 error<#279> Invalid layout qualifier 'location'
WARNING: 0:12: warning<#312> interface block with instance is supported in GLSL 1.5
ERROR: error<#273> 4 compilation errors. No code generated

GPUProgram fullscreen not built! Press any key to continue . . .

I hope someone knows the answer because that sure was a pain to type in by hand. Does Visual Studio let you copy and paste text from the program output, because I could not do it! :)

Thanks
Bob

Chapter 28

I have dowload glm (ver 0.9.2.6). But I cannot complie the project in vs2010.
There is error in scene.cpp,
"glm/gtc/swizzle.hpp": No such file or directory.
Is the glm is the right version?

Chapter 37 - Performance State Tracking

Hi, (sorry for my bad english)

I'm just trying to understand Pstates by myself,
i have downloaded the lastest nvapi and adl from the officals websites

i have open the Ch37.sln, and i can't compile it !

i can't find the error strings into nvapi, with manual text saerching.
i search "NV_GPU_PERF_PSTATE_ID" too on google, and the only one answer it return is in your book.
i don't understand how compiling this source is possible, please help me !
thanks !

error log :

1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(56): error C2065: 'NV_GPU_PERF_PSTATE_ID' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(56): error C2146: syntax error : missing ';' before identifier 'currentPState'
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(56): error C2065: 'currentPState' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(57): error C2065: 'currentPState' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(57): error C3861: 'NvAPI_GPU_GetCurrentPstate': identifier not found
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(60): error C2065: 'currentPState' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(68): error C2065: 'NV_GPU_PERF_PSTATES_INFO' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(68): error C2146: syntax error : missing ';' before identifier 'PerfPstatesInfo'
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(68): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(69): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(69): error C2228: left of '.version' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(69): error C2065: 'NV_GPU_PERF_PSTATES_INFO_VER' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(71): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(71): error C3861: 'NvAPI_GPU_GetPstatesInfoEx': identifier not found
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(74): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(74): error C2228: left of '.numPstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(75): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(75): error C2228: left of '.numClocks' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(76): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(76): error C2228: left of '.numVoltages' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(81): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(81): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(81): error C2228: left of '.pstateId' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(86): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(86): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(86): error C2228: left of '.clocks' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(86): error C2228: left of '.domainId' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(87): error C2065: 'NVAPI_GPU_PUBLIC_CLOCK_GRAPHICS' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(88): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(88): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(88): error C2228: left of '.clocks' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(88): error C2228: left of '.freq' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(89): error C2065: 'NVAPI_GPU_PUBLIC_CLOCK_MEMORY' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(90): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(90): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(90): error C2228: left of '.clocks' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(90): error C2228: left of '.freq' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(91): error C2065: 'NVAPI_GPU_PUBLIC_CLOCK_PROCESSOR' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(92): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(92): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(92): error C2228: left of '.clocks' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(92): error C2228: left of '.freq' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(97): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(97): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(97): error C2228: left of '.voltages' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(97): error C2228: left of '.domainId' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(98): error C2065: 'PerfPstatesInfo' : undeclared identifier
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(98): error C2228: left of '.pstates' must have class/struct/union
1> type is ''unknown-type''
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(98): error C2228: left of '.voltages' must have class/struct/union
1>u:\programmation[ressources][livres payants]\openglinsights-openglinsightscode-bb2d6c6\chapter 37 performance state tracking\ch37\pstatenv.cpp(98): error C2228: left of '.mvolt' must have class/struct/union
1> PStateAMD.cpp
1> PState.cpp
1> Ch37Dlg.cpp
1> Ch37.cpp
1> Generating Code...
1>
1>Build FAILED.

Chapter 29 build issues in release mode

Hi

The chapter 29 have some build issue in release mode only:

The precompiled header is set to "Use (/Yu)" instead of "Create (/Yc)"
untitled

The glew32.lib is also missing in Linker input additional dependencies:

untitled2

Thanks for your concern about this .

Does Chapter 29 Fermi... should work on AMD?

Chapter 29 Fermi Asynchronous Texture Transfers sample (CopyEngine.exe) crash on my AMD FirePro W9100 running on Windows7 64 with last drivers installed.

untitled
untitled2

(I also try with a W5100 on Windows 8.1 64 and the problem is the same)

In release the STATUS_FATAL_APP_EXIT exception occured in atioglxx.dll Fault offset: 0x014250bf:
When a debugger is attached, the process seems to freeze execution in amd driver callstack coming from wglMakeCurrent(NULL, NULL) call.

I successfully made this sample work on Quadro K2000M and Geforce GTX 680.
I completely understand that Fermi architecture is Nvidia specific.
But it seems that this sample use standard OpenGL ARB code with classic win32 API.
So for me, it is expected to work everywhere.

Do you think it's a driver issue forcing me to install an older version.
Or do I miss something else ?
AMD Firepro hardware seems to have DMA too behind the DirectGMA feature. (used to transfere buffer from video capture card). I do not know if this can by considered as a "Copy Engine hardware" as understood in the chapter 29 of the book.

Any advice would be welcome,
Thanks in advance for this.

compile chapter 12 for Mac OSX Mountain Lion?

For chapter 12, about distance fields, I want to compile the demo for a mac.

I try 'make' on a mac running 10.8.2, and it says

bob$ make
Usage: make Win32 | Linux | MacOSX | clean | distclean
bob$ make MacOSX
./bundle.sh contourdemo
make: ./bundle.sh: No such file or directory

It is probably something extremely simple but what do I need to do?
Thanks!
Bob

Chapter 7 demo fails to compile due to missing file

It seems the issues in this repo are not being monitored, but I will post it here anyway for the lack of a more appropriate place.

When I compile the codes in both demo1 and demo2 using GNU Make, the following error occur:

$ make Linux
gcc -I. -I/usr/include shaderdemo.c -lglfw -lGLU -o shaderdemo
In file included from shaderdemo.c:29:0:
./GL/glfw.h:162:20: fatal error: GL/gl.h: No such file or directory
compilation terminated.
Makefile:11: recipe for target 'Linux' failed
make: *** [Linux] Error 1

It appears GL/gl.h is needed for compilation but is missing for some reason.

Chapter 21: shaders use 4.2's binding but #version number's are 330

They don't compile for me on the latest nvidia drivers under linux:

0(7) : error C7532: layout qualifier 'binding' requires "#version 420" or later
0(7) : error C0000: ... or #extension GL_ARB_shading_language_420pack : enable

Changing the version numbers to 420 fixes it.

Chapter 28 Scenario4 Cannot find file.

Hi
Thanks for this wonderful book and samples.

There is an issue with Chapter 28 Scenario4

base::app::renderer_side_start@....\src\base\app.cpp(79) Cannot find file "fonts/lucida_console_13.fnt".

Tested with Visual Studio 2015 in Debug win32

untitled

Edit: in fact its just because the async_vbo_transfers_Scenario4.vcxproj.user file have not been added to git repository, so debugging working directory is not set to $(TargetDir) as other project does.
may be their still missing others settings.

Edit2: same issue for async_vbo_transfers_bw.vcxproj.user

Thanks for your concern about this.

Code of chapter 22 missing..

Hi,
reading sample chapter 22 "Octree-Based Sparse Voxelization Using the GPU Hardware Rasterizer " I read :
"Details can be found in the accompanying source code"
but I can't find here on github.. any info on where code is posted?
thanks..

Ambiguous code license

MIT
https://github.com/OpenGLInsights/OpenGLInsightsCode/blob/master/Chapter%2012%202D%20Shape%20Rendering%20by%20Distance%20Fields/LICENSE.txt

The distance transform code in the console
application to create distance field textures, located in
the file "edtaa3func.c", is MIT licensed, and free to use
under the following conditions.

GPL
https://github.com/OpenGLInsights/OpenGLInsightsCode/blob/master/Chapter%2012%202D%20Shape%20Rendering%20by%20Distance%20Fields/makedist/edtaa3func.c#L38

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

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.