@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.
@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.
@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 ?
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.
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).
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.!
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.
@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
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 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