Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
87 user(s) are online (44 user(s) are browsing Forums)

Members: 1
Guests: 86

BillE, more...

Headlines

 
  Register To Post  

« 1 2 (3) 4 »
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@salas00
Seems i completely blind, as after reading your link i still think it will not help to run current minigl apps, as well as will not help to port pure opengl1 / opengl2 or pure sdl1/opengl games (such as xmoto for example) without touching code much.


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Quite a regular
Quite a regular


See User information
@kas1e
You are right about that, EGL is for managing OpenGL contexts. Think of the functions CreateContextTags, SwitchDisplay, etc in MiniGL. It was meant as a platform independent replacement for native APIs, it's used mainly on Android and Linux. People usually go for SDL, because it provides abstractions for more than just the OGL context.

This is just like television, only you can see much further.
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Not too shy to talk
Not too shy to talk


See User information
I chose EGL for reasons of ports facilities and a lot of examples are easily found.
I know he would keep a compatibility but I do not have the motivation and above all time.
This library is still initially made for me to allow me in my rapid integration portages.
Look at the last great sharing SDL2 (which I donated to the good work), there was very little porting and everyone waiting games or applications, fine workmanship that is not not fully use.
I propose this library and those who will want to use the can but I focus on something else now.
thank you for your understanding
HunoPPC

AmigaOS 4.1 Rulez
Resized Image
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@BSzili

Is anyone currently working on adding OpenGL ES 2 support to SDL2 for AmigaOS? That would definitely be useful.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Quite a regular
Quite a regular


See User information
@Hans

We should ask to capehill. He have a great knowledge of SDL/OGL.

I may help with the tests.

Retired
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information
@Hans

I can try to add OpenGL ES 2 support for SDL2 but I can't test it myself at the moment. If someone else can, then good..

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@Capehill
Quote:
I can try to add OpenGL ES 2 support for SDL2 but I can't test it myself at the moment. If someone else can, then good..

That would be great! I could test it, and I'm sure that other people with the right hardware would be willing to test it as well.

BTW, I tried compiling SDL2 last night. Compilation went okay except for one hiccup with the struct timeval hack (which isn't needed with newlib). However, I tried running a few of the tests, and they all crashed/froze.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information
@Hans

That's strange. Which compiler you use? Can you describe timeval issue and crash issue in details?

Yesterday I added one tiny feature into SDL2 and ran it without issues on my Sam440ep.

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@Capehill

Quote:
That's strange. Which compiler you use? Can you describe timeval issue and crash issue in details?

I followed the build instructions in the AmigaOS readme. In one of the files there's an #ifdef __amigaos4__ with a struct timeval definition and a note about it being a hack for clib2. The readme said to configure with newlib, and I got a struct redefinition error.

Just do a search for struct timeval, and you'll find it

As for the crashes. After building the main library I did a configure and make in the tests drawer. Running testautomation first said it couldn't find the *.so.** After fixing that, it crashed. I then tried a few different test programs at random, and they all failed. Sorry, I don't have any crashlogs right now.

NOTE: I'm using GCC 5.3.0, which may or may not be relevant. I may also have newer header files than are publicly available, which might explain why I get the struct timeval error.

Hans


** I forgot about this. Make install really should copy the *.so to SOBJS: Should I submit a bug ticket on sourceforge?

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information
@Hans

I have created a ticket for "make install": https://sourceforge.net/p/sdl2-amigaos4/tickets/16/

Feel free to add comments if needed.

I will check "timeval" issue. I haven't seen SDL2 crash in months so I definitely need more info regarding that.


Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information
@Capehill

AFAICT it's not timeval but timespec.

The timespec structure is defined in <pthread.h> for both clib2 and newlib in latest include files.

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just can't stay away
Just can't stay away


See User information
@salass00

That sounds more familiar. https://sourceforge.net/p/sdl2-amigaos ... pthread/SDL_syscond.c#l34

@Hans

With GCC 5.3.0 at least I had problems with shared objects in general. https://github.com/sba1/adtools/issues/7

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@Capehill

Quote:
That sounds more familiar. https://sourceforge.net/p/sdl2-amigaos ... pthread/SDL_syscond.c#l34

Yes, that's what I was talking about. Sorry for getting the name mixed up.

Quote:
With GCC 5.3.0 at least I had problems with shared objects in general. https://github.com/sba1/adtools/issues/7

Okay, I'll have another go using static linking.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@Capehill

I've finally had time to rerun the tests with static linking, and the tests ran just fine. That's a rather annoying problem.

Anyway, it's working fine now, so I'm ready for whatever GL-ES code you come up with.

I've put a bit of thought into how to deal with supporting both MiniGL and GL-ES. AFAIK, SDL programs need to do the following for GL-ES:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASKSDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION0);


So, checking for GL_CONTEXT_PROFILE_ES with a major version of 2 (or higher?) should be enough to decide whether to open a MiniGL or GL-ES2 context.

Hans

P.S., I know we've gone off-topic. Let's open a new thread if we need to discuss this further.

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Not too shy to talk
Not too shy to talk


See User information
Hello Hans

Could you say more about

BindVertexAttribArray(W3DN_RenderState *renderState,
uint32 attribNum, W3DN_VertexBuffer *buffer, uint32 arrayIdx);

especially int what case attribNum!=arrayIdx happen ?

attribNum seems to be the order of input variables in the shader :but what happen when vert and frag shader dont have same inputs...

I mean typically vert shader will have a position as input and frag shader will have a color : so how does it reflect in BindVertexAttribArray ?

Globally in Nova the "linking" between the vbo and shaders seems obscure

just noob questions

Also what happen when you have several vbo ? I mean one per object to draw ? arrayIdx still begin with 0 for each object or increase among them?


Last: Is there a simple way to set a default mvpMatrix & normalMatrix with constant values because my code using kmMat4Multiply/etc... seems to be wrong : I mean just to verify if this is this part that is bugged

Thanks

Alain Thellier








Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Just popping in
Just popping in


See User information
And you mentioned render to texture before, will that be possible later?

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@thellier

It's a good learning excercise for me to try and explain this, if I get it wrong Hans can correct me

Quote:


BindVertexAttribArray(W3DN_RenderState *renderState,
uint32 attribNum, W3DN_VertexBuffer *buffer, uint32 arrayIdx);

especially int what case attribNum!=arrayIdx happen ?


The first is the order of the attributes in the VBO, the second the position they appear in shader, which unless you explicitly use the (location=n) syntax in GLSL 1.4 is up to the compiler.

Comparing the AutoDocs with the examples I do wonder if the *names* of the arguments are the "wrong way round". I didn't really spot that before as I was mainly following example code, but just trying to explain it the names of the arguments seem backwards compared with how they are used in the example code.

Study the W3DNHelloTriangle example for simple usage case. The examples are really usful IMHO to get things started up.

Quote:


but what happen when vert and frag shader dont have same inputs...

I mean typically vert shader will have a position as input and frag shader will have a color : so how does it reflect in BindVertexAttribArray ?



The vertex and fragment shader almost certainy won't have the same inputs, they work in a pipeline so the output variables from the vertex shader form the inputs to the fragment shader.

I may be wrong but if you had a seperate piece of data you wanted to pass through to the fragment shader you would need to pass it to the vertex shader and then code that shader so that it passes the data straight through to the fragment shader as an output variable.

Quote:


Also what happen when you have several vbo ? I mean one per object to draw ? arrayIdx still begin with 0 for each object or increase among them?



Assuming all the VBOs have the same structure and same shaders then the array and indexes values remain the same.

Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@Caras
Quote:
And you mentioned render to texture before, will that be possible later?

Yes, it's on the to-do list.

@broadblues
Quote:
The first is the order of the attributes in the VBO, the second the position they appear in shader, which unless you explicitly use the (location=n) syntax in GLSL 1.4 is up to the compiler.

Comparing the AutoDocs with the examples I do wonder if the *names* of the arguments are the "wrong way round". I didn't really spot that before as I was mainly following example code, but just trying to explain it the names of the arguments seem backwards compared with how they are used in the example code.

Oops! Looks like I got the examples round the wrong way. I'll correct that.

Yes, vertex attributes are the inputs to the vertex shader, and vertex array indices are the indices to the individual arrays in the VBO. For example, if a shader's attribute 0 is position, and you stored the position array in VBO's array 2, then attribNum = 0, arrayIdx = 2.

You've described how the shader pipeline works accurately. I'll just add to this one:
Quote:
Also what happen when you have several vbo ? I mean one per object to draw ? arrayIdx still begin with 0 for each object or increase among them?

It's entirely up to you. You decide which VBO arrayIdx is what when you use VBOSetArray(). So, you could:
- Store the vertex attributes in the same order in all VBOs
- Store vertex attribute arrays for multiple objects in one VBO (e.g., arrays 0-2 are for object 1, arrays 3-5 for object 2, etc.)
- Store the position array in a separate VBO from your colour, surface normal, tex-coord and other arrays. Why would you do this? Well, sometimes you need to update one vertex attribute frequently, whereas the others remain static. For example, you might be rendering particles where the CPU updates the positions every frame. In that case it's best to put the position in a W3DN_STREAM_DRAW VBO while the other attributes should be in a W3DN_STATIC_DRAW VBO

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interested in learning OpenGL ES 2 or Warp3D Nova?
Home away from home
Home away from home


See User information
@all

For the curious, here's a summary of the survey responses.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top

  Register To Post
« 1 2 (3) 4 »

 




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




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project