Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
90 user(s) are online (54 user(s) are browsing Forums)

Members: 0
Guests: 90

more...

Headlines

 
  Register To Post  

Yeah! Modern Graphics Programming Primer!!!
Quite a regular
Quite a regular


See User information
Just bought Hans De Ruiter book "Modern Graphics Programming Primer"

Can't wait to read it all

https://keasigmadelta.com/store/produc ... phics-programming-primer/

Retired
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@AmigaBlitter
This sounds like a really interesting book. If I ever find the time to get into 3D graphics, this book would be at the very top of my list.

Author of the PortablE programming language.
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Just can't stay away
Just can't stay away


See User information
Is this book available also on AmiStore? I think it should be...

Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@nubechecorre
No, it isn't in the AmiStore. It's not an AmigaOS specific ebook.

@all
You can get the accompanying tutorial series for free here. I use Visual Studio in the tutorials, but the code itself is cross-platform.

AFAIK, the code isn't usable on AmigaOS just yet, but that should be fixed at some point. Our SDL2 port has beta OpenGL ES 2+ support. I think we're just missing some GLES3 headers.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Just can't stay away
Just can't stay away


See User information
I just made a small amount of money from programming, some of which I used to buy this e-book and the Emotion video player from AmiStore .

Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@All
Just bough those books from Hans (gles3+sdl and modern graphics primer)- they pretty nice for newbes for sure ! Detailed enough and logical :)


@Hans
Btw, in the chapter about texture cube i read that:
Quote:

Second, the inputs have been given explicit locations using layout(location = n). This very handy
feature was introduced in OpenGL ES 3, and allows us to specify which vertex attribute each input is
mapped to. Before, we’d have to get or set the vertex attribute to shader variable mappings manually
in the main code. This was rather tedious, so being able to set them in the shader code is awesome.


But as far as i see, our gles2 also "eats" those location = ? At least i have no errors in gslangvalidator and co when test texture.vert with those 2 lines:

layout(location = 0) in vec2 vertPos;
layout(location = 1) in vec2 vertTexCoord;

Is they indeed works in our gles2 , or just skipped silent ?


Edited by kas1e on 2018/1/30 15:11:20
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@kas1e

Quote:

But as far as i see, our gles2 also "eats" those location = ? At least i have no errors in gslangvalidator and co when test texture.vert with those 2 lines:

layout(location = 0) in vec2 vertPos;
layout(location = 1) in vec2 vertTexCoord;

Is they indeed works in our gles2 , or just skipped silent ?

Yes, they should work in our GLES2. It's definitely supported by Warp3D Nova.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@all
I've just re-released the book and tutorials in Kindle and paperback formats, so if you prefer those formats then you can get them via the following links:
Click here for the Kindle version
Click here for the print version

I'd also like to ask a favour from anyone who buys it or has read it already: please leave a review on Amazon. It really helps sales of the books. You can click the links above, go to the listing for each book, and click on the "Write a customer review" button (it's down where the customer reviews section is).

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Not too shy to talk
Not too shy to talk


See User information
@kas1e
Quote:

But as far as i see, our gles2 also "eats" those location = ? At least i have no errors in gslangvalidator and co when test texture.vert with those 2 lines:
layout(location = 0) in vec2 vertPos;
layout(location = 1) in vec2 vertTexCoord;
Is they indeed works in our gles2 , or just skipped silent ?

It works with or without location specifiers inside ogles2.library. It is impossible to "skip" or ignore this because then the whole ogles2 <-> GLSL variable mapping would break.

@Hans
Quote:
I think we're just missing some GLES3 headers.

ogles2.lib ships with the std. GLES3 headers and a platform.h that adjusts everything accordingly. Of course only the GLES2 subset of functionality (plus extensions) is actually supported, but if you only use that and if the shaders are supported by Nova then it should work.
Congrats to that book-release btw.!

Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Just can't stay away
Just can't stay away


See User information
@Hans

Thanks for the information, I've ordered the book.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@Daytona675x

Hehe, this is what I get for posting in an old thread. Yes, the necessary header files have been available for ages now. I really should write an AmigaOS supplement for the tutorials that explains how to install SDL2 into the SDK along with the ogles2 headers, and then compile the tutorials...

@trixie
Thanks. I hope it's useful.

@all
I'd really appreciate it if people could take a few minutes to write reviews on Amazon, especially after buying a copy via Amazon. Good reviews are especially important for books. 5-10 reviews would help kickstart things on Amazon.

For convenience, here are the links again:
Click here for the Kindle version
Click here for the print version

Look for the "write a customer review" button on the product description pages.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@Hans,Daniel
Just to make you both know, all 5 tutorials from Hans's GLES3+SDL2 book works fine on amigaos4 with very little change related to SDL context creation (swap 3 on 2 when ES renderer requested).

I.e. even last example with animated-rotated cube with usage of GLM includes (for mathematic) , and those "#version ES 300" shaders , and so on : all works "as it".

Cool :)

@Hans

If you need it, i can upload somewhere changes to make all tutorials works on aos4 and on win32/msys2

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@kas1e

Quote:
If you need it, i can upload somewhere changes to make all tutorials works on aos4 and on win32/msys2

Are there any changes needed other than changing the GLES version number for AmigaOS, and the SDL_hint() call for Windows?

If not, then it might be better to update our SDL2 port to allow GLES3 to be chosen. Full GLES3 support will likely come via the GLES2 library, so I see no issue with SDL2 allowing that. IIRC, that's what happens on other platforms too (the GLES2 .so/dll delivering GLES3 as well, I mean).

Oh, and make sure that our port also compiles and works okay with the GLES hint needed on Windows. I'll be updating the tutorial code to include that.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Yeah! Modern Graphics Programming Primer!!!
Home away from home
Home away from home


See User information
@Hans
Yeah, having GLES hint for win32, do not make it any different for amigaos4 (it compiles and works on aos4 with it fine, so no needs for ifdef).

As for other changes:

1. "3" on "2" for MAJOR_VERSION. So there amigaos4 ifdef need it.

2. default SDL include in SDL2 , so <SDL2/SDL.h> , not just <SDL.h> , or , instead of changing that, on compiling time -I can be used, like -I/usr/local/amiga/ppc-amigaos/SDK/local/newlib/include/SDL2 , but imho its worse (as then will be different between native and crosscompiler builds), and better to replace everyhtng with adding <SDL2/ " , so it will fine everywhere (and for visual studio too, probabaly). For msys on win32, it also need <SDL2/.

3. For amigaos4 it should be main() , for msys/win32 it should be WinMain(), for visual studio you seems use SDL_main(). So there should be ifdefs.

4. To make works GLM includes on amigaos4 for tutorial4 and tutorial5, you need to add at top of main.cpp in both examples that:

#define GLM_ENABLE_EXPERIMENTAL 1

(that maybe because of my GLM includes being a little old, or too new , dunno).

And in GLM includes itself, in the glm/detail/setup.hpp, where part about "Has of C++ features" , add amigaos4 ifdef , so define GLM_HAS_CXX11_STL will be 0, and not 1. Because if it, it will fail with some undefs and usuall "not being a member of std::" , i.e. like this:

///////////////////////////////////////////////////////////////////////////////////
// Has of C++ features

// http://clang.llvm.org/cxx_status.html
// http://gcc.gnu.org/projects/cxx0x.html
// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx

// Android has multiple STLs but C++11 STL detection doesn't always work #284 #564
#if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED)
#    define GLM_HAS_CXX11_STL 0
#elif GLM_COMPILER & GLM_COMPILER_CLANG
#    if (defined(_LIBCPP_VERSION) && GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED)
#        define GLM_HAS_CXX11_STL 1
#    else
#        define GLM_HAS_CXX11_STL 0
#    endif
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
    #ifdef __amigaos4__
#    define GLM_HAS_CXX11_STL 0
    #else
#    define GLM_HAS_CXX11_STL 1
    #endif
#else
#    define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
        
((GLM_COMPILER GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
        
((GLM_COMPILER GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
        
((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
#endif


And compiling lines for amigaos4 are easy, like this one for tutorial05:

ppc-amigaos-g++ -athread=native main.cpp Shader.cpp Texture.cpp -lSDL2 -lSDL2_image -lpng -ltiff -ljpeg -lwebp -lz -lpthread

And that all.


Edited by kas1e on 2019/8/7 16:36:17
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project