Author Topic: OpenGL SuperBible - Source Code  (Read 2491 times)

LiaoMi

  • Member
  • ****
  • Posts: 943
OpenGL SuperBible - Source Code
« on: December 07, 2020, 06:09:26 AM »
Hi,

I noticed a very interesting book called https://www.amazon.de/OpenGL-Superbible-Comprehensive-Tutorial-Reference/dp/0672337479, the book contains a large archive of source codes in c++, but the code can be easily translated:
https://github.com/openglsuperbible/sb7code/archive/master.zip
http://openglsuperbible.com/files/superbible7-media.zip

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #1 on: December 07, 2020, 07:30:51 PM »
 :thumbsup:
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #2 on: December 07, 2020, 08:05:59 PM »

first try to compile:
unistd.h is missing : sb7.h(36): fatal error C1083
Search in the pack ,not found
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #3 on: December 08, 2020, 03:44:25 AM »

Need the GLFW  https://www.glfw.org/download.html
Need to build a library in  \Glu_bible\src\sb7
.........
Quote
alienrain.obj : error LNK2019: symbole externe non r‚solu "int __cdecl sb6IsExtensionSupported(char const *)" (?sb6IsExtensionSupported@@YAHPEBD@Z) r‚f‚renc‚ dans la fonction "public: virtual void __cdecl sb7::application::run(class sb7::application *)" (?run@application@sb7@@UEAAXPEAV12@@Z)
alienrain.obj : error LNK2019: symbole externe non r‚solu "private: static void __cdecl sb7::application::debug_callback(unsigned int,unsigned int,unsigned int,unsigned int,int,char const *,void *)" (?debug_callback@application@sb7@@CAXIIIIHPEBDPEAX@Z) r‚f‚renc‚ dans la fonction "public: virtual void __cdecl sb7::application::run(class sb7::application *)" (?run@application@sb7@@UEAAXPEAV12@@Z)
alienrain.obj : error LNK2019: symbole externe non r‚solu "unsigned int __cdecl sb7::ktx::file::load(char const *,unsigned int)" (?load@file@ktx@sb7@@YAIPEBDI@Z) r‚f‚renc‚ dans la fonction "private: virtual void __cdecl alienrain_app::startup(void)" (?startup@alienrain_app@@EEAAXXZ)
alienrain.obj : error LNK2001: symbole externe non r‚solu "protected: static class sb7::application * sb7::application::app" (?app@application@sb7@@1PEAV12@EA)
s

Made a global scope on *.c *.cpp,names not found ?


Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 943
Re: OpenGL SuperBible - Source Code
« Reply #4 on: December 08, 2020, 07:39:17 AM »

first try to compile:
unistd.h is missing : sb7.h(36): fatal error C1083
Search in the pack ,not found

Hi TouEnMasm,

https://github.com/openglsuperbible/sb7code/blob/master/HOWTOBUILD.txt
glfw Library Release x32
glfw Library Release x64
https://www.upload.ee/files/12614195/Release.7z.html

LiaoMi

  • Member
  • ****
  • Posts: 943
Re: OpenGL SuperBible - Source Code
« Reply #5 on: December 08, 2020, 09:06:19 AM »
glfw-Library masm example  :tongue:

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #6 on: December 08, 2020, 06:32:43 PM »
Have you tested the asm  ?
it is done with the provided include,don't seem very serious
Quote
Assembling: triangle.asm

***********
ASCII build
***********

triangle.asm(182) : error A2137:too few arguments to INVOKE
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 4
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 3
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 2
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 1
triangle.asm(188) : error A2137:too few arguments to INVOKE
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 9
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 8
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 7
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 6
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 5
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 4
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 3
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 2
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 1
LINK : fatal error LNK1181: cannot open input file "triangle.obj"
Appuyez sur une touche pour continuer...

For the   C ,it use cmake the one thing who never work because there is too many formal instructions in text.
The version had evoluate and .....
Try to made a build (alienrain is the one i have tried to compile) and say me if you get a result with the C code provided.
Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 943
Re: OpenGL SuperBible - Source Code
« Reply #7 on: December 09, 2020, 01:38:33 AM »
Have you tested the asm  ?
it is done with the provided include,don't seem very serious
Quote
Assembling: triangle.asm

***********
ASCII build
***********

triangle.asm(182) : error A2137:too few arguments to INVOKE
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 4
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 3
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 2
triangle.asm(182) : error A2114:INVOKE argument type mismatch : argument : 1
triangle.asm(188) : error A2137:too few arguments to INVOKE
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 9
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 8
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 7
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 6
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 5
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 4
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 3
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 2
triangle.asm(188) : error A2114:INVOKE argument type mismatch : argument : 1
LINK : fatal error LNK1181: cannot open input file "triangle.obj"
Appuyez sur une touche pour continuer...

For the   C ,it use cmake the one thing who never work because there is too many formal instructions in text.
The version had evoluate and .....
Try to made a build (alienrain is the one i have tried to compile) and say me if you get a result with the C code provided.

Hi TouEnMasm,

alienrain VS2019 Solution
https://www.upload.ee/files/12615892/alienrain.7z.html

In the example, the version of the library is too old (Moving from GLFW 2 to 3 - https://www.glfw.org/docs/3.0/moving.html), so the headers need to be converted again, I corrected the function prototypes, but did not check the function parameters, so the program does not start. In addition, you need to use CDECL = C
https://www.upload.ee/files/12616492/triangle_glfw_examples.7z.html

New libraries(32-64) in which I removed Enable Security Check (/GS)
https://www.upload.ee/files/12616616/glfw_Release_12.2020.7z.html

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #8 on: December 09, 2020, 03:03:36 AM »
Ah more fun,
version glfw , i have 3.04
I have forgotten,unistd.h can be replace by io.h
perhaps later ...

Later,a sample with the alienrain exe will be greatly usefull.
There is problem beetween the C cpp in the lib + lib + %*#

Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 943
Re: OpenGL SuperBible - Source Code
« Reply #9 on: December 09, 2020, 03:17:26 AM »

:biggrin: I took the last archive with the source code here https://github.com/glfw/glfw

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #10 on: December 09, 2020, 04:02:29 AM »

There is an impressive list of bug fix..
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #11 on: December 09, 2020, 06:01:53 PM »

Visual studio (c,c++) offer a simple way to build all that.
Oen it,in " files >> OPEN >> cmake"   and choose a cmake*.TXT .Thats all
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: OpenGL SuperBible - Source Code
« Reply #12 on: December 11, 2020, 03:00:09 AM »
Good news,
After a soap made with sb7code-master and glfw-master (the glfw must be inside the sb7) and yhe help of VS 2019
I have build the sb7.lib and the glfw3.lib + samples  inside the glfw-master
For the samples in the sb7code-master,They need doxygen,dowloaded.
They also need
Quote
Most of the samples require some media files. The media files package is a
separate download available from http://www.openglsuperbible.com and is
rougly 100MB of textures, object files and shader code. Unpack the archive
to the bin/media directory before trying to run these samples.
Quote
There is nothing to the link http://www.openglsuperbible
Any idea ?
Later :
http://openglsuperbible.com/files/superbible7-media.zip.
https://github.com/ziacko/sb7code




Fa is a musical note to play with CL