Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
99 user(s) are online (55 user(s) are browsing Forums)

Members: 1
Guests: 98

joerg, more...

Headlines

 
  Register To Post  

(1) 2 3 4 »
GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Quite a regular
Quite a regular


See User information
Okay. We have pthreads now in CLIB2 and progress is being made with a C library for which we have source code access to. Who knows when extra features to newlib will happen.

For that reason, I continued on my quest to make improvements to mednafen.

Rather than the necessary hacks I needed to add to the mednafen source code to ensure successful builds against newlib, due to a great, but outdated 2004/5 version of pthreads, I wanted to link with CLIB2 instead of newlib.

It has been a success, but it required that a number of library be compiled with CLIB2. This, at least for mednafen, included "porting" libFLAC to CLIB2. It also required building GL4ES / SDL2_GL4ES with CLIB2.

What I am noticing is outdated libraries on OS4Depot that are linked against NEWLIB. Going forward, we probably always want to offer both. But, I worry that the LHA files and their original owners on OS4Depot are either inactive or will never update to include CLIB2 / newer versions on those libraries.

I wonder how we can solve that issue.

Tonight, I compiled bleeding-edge GL4ES using CLIB2 commit: 44cdcded7653ec5f3cc845b1b0e28c78f6f2b4d3 (this included the merged back pthreads branch). Before I say the following, I thank @kas1e, @capehill, @hans for all the work. But, I kind of needed to figure out how to build SDL2 + GL4ES on my own. @kas1e already has the GL4ES SDK, but it is with an older version of SDL2. I built SDL2@version 2.0.22 against CLIB2 - fine. I was then confused how to create SDL2 + GL4ES changes. Actually, it did not seem to be that complicated.

It was a matter of grabbing the Amiga SDL2 port and then applying the following patch file:
diff --git a/Makefile.amigaos4 b/Makefile.amigaos4
index 754d92f
..c7c28d3 100755
--- a/Makefile.amigaos4
+++ b/Makefile.amigaos4
@@ -8,+8,@@ STRIP ppc-amigaos-strip
 
 AMIGADATE 
= $(shell date +"%-d.%-m.%Y")
 
-
CFLAGS  = -gstabs -O2 -Wall -fPIC -fcommon -I./include -D__AMIGADATE__=\"$(AMIGADATE)\"
+CFLAGS  = -DSDL_GL4ES -gstabs -O2 -Wall -fPIC -fcommon -I./include -D__AMIGADATE__=\"$(AMIGADATE)\"
 
 
TARGET_STATIC  libSDL2.a
 TARGET_SHARED  
libSDL2-2.0.so
diff 
--git a/src/video/amigaos4/SDL_os4gl4es.c b/src/video/amigaos4/SDL_os4gl4es.c
new file mode 100755
index 0000000.
.c5fa921
--- /dev/null
+++ b/src/video/amigaos4/SDL_os4gl4es.c
@@ -0,+1,297 @@
+
/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "../../SDL_internal.h"
+
+
#if SDL_VIDEO_DRIVER_AMIGAOS4
+
+
#include "SDL_os4video.h"
+#include "SDL_os4window.h"
+#include "SDL_os4library.h"
+#include "SDL_os4opengl.h"
+
+
#include <proto/exec.h>
+#include <proto/intuition.h>
+
+
#include "agl.h"
+
+
#define DEBUG
+#include "../../main/amigaos4/SDL_os4debug.h"
+
+
+
int OS4_GL_LoadLibrary(_THIS, const char path)
+{
+    
dprintf("Called %d\n"_this->gl_config.driver_loaded);
+    
dprintf("Opening of libraries done inside of gl4es\n");    
+
+    return 
0;
+}
+
+
void *OS4_GL_GetProcAddress(_THIS, const char proc)
+{
+    
void *func NULL;
+
+    
dprintf("Called for '%s'\n"proc);
+
+    
func = (void *)aglGetProcAddress(proc);
+
+    if (
func == NULL) {
+        
dprintf("Failed to load '%s'\n"proc);
+        
SDL_SetError("Failed to load function");
+    }
+
+    return 
func;
+
+}
+
+
+
SDL_bool
+OS4_GL_AllocateBuffers(_THISint widthint heightint depthSDL_WindowData data)
+{
+
+    return 
SDL_TRUE;
+}
+
+
void
+OS4_GL_FreeBuffers(_THISSDL_WindowData data)
+{
+   
+} 
+
+
+
+
SDL_GLContext OS4_GL_CreateContext(_THISSDL_Window window)
+{
+
+        
int widthheight;
+        
ULONG errCode 0;
+
+        
SDL_WindowData *data window->driverdata;
+
+        
OS4_GetWindowActiveSize(window, &width, &height);
+
+
+        if (
data->glContext) {
+            
dprintf("Old context %p found, deleting\n"data->glContext);
+
+            
aglDestroyContext(data->glContext);
+
+            
data->glContext NULL;
+        }
+
+        
dprintf("Depth buffer size %d, stencil buffer size %d\n",
+            
_this->gl_config.depth_size_this->gl_config.stencil_size);
+
+
+        
struct TagItem create_context_taglist[] =
+        {
+            {
OGLES2_CCT_WINDOW, (ULONG)data->syswin},
+            {
OGLES2_CCT_DEPTH_this->gl_config.depth_size},
+            {
OGLES2_CCT_STENCIL_this->gl_config.stencil_size},
+            {
OGLES2_CCT_VSYNC0},
+            {
OGLES2_CCT_SINGLE_GET_ERROR_MODE,1},
+            {
OGLES2_CCT_RESIZE_VIEWPORT,TRUE},
+            {
TAG_DONE0}
+        };
+
+        
data->glContext aglCreateContext2(&errCode,create_context_taglist);
+
+        if (
data->glContext) {
+
+            
dprintf("OpenGL ES 2 context %p created for window '%s'\n",
+                
data->glContextwindow->title);
+
+
+            
aglMakeCurrent(data->glContext);
+
+            
// Some games (like q3) doesn't clear the z-buffer prior to use. Since we're using a floating-point depth buffer in warp3dnova,
+            // that means it may contain illegal floating-point values, which causes some pixels to fail the depth-test when they shouldn't,
+            // so we clear the depth buffer to a constant value when it's first created.
+            // Pandora may well use an integer depth-buffer, in which case this can't happen.
+            // On MiniGL it didn't happens as there is workaround inside of old warp3d (and probabaly inside of MiniGL itself too).
+            // in SDL1 with gl4es (so warp3dnova/ogles2, where no such workaround) it didn't happens probabaly because SDL1 doing something like that (but not glClear).
+
+            
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+
+            
glViewport(00widthheight);
+
+            return 
data->glContext;
+
+        } else {
+            
dprintf("Failed to create OpenGL ES 2 context for window '%s' (error code %d)\n",
+                
window->titleerrCode);
+
+            
SDL_SetError("Failed to create OpenGL ES 2 context");
+            return 
NULL;
+        }
+
+    return 
NULL;
+
+}
+
+
void OS4_GL_DeleteContext(_THISSDL_GLContext context)
+{
+        
dprintf("Called with context=%p\n"context);
+
+        if (
context) {
+
+            
SDL_Window *sdlwin;
+            
Uint32 deletions 0;
+
+            for (
sdlwin _this->windowssdlwinsdlwin sdlwin->next) {
+
+                
SDL_WindowData *data sdlwin->driverdata;
+
+                    if (
data->glContext == context) { 
+
+                        
dprintf("Found ogles2 context, destroy it and clearing window binding\n");
+
+                        
aglDestroyContext(context);
+                        
data->glContext NULL;
+                        
deletions++;
+                    }
+            }
+
+            if (
deletions == 0) {
+                
dprintf("OpenGL ES 2 context doesn't seem to have window binding\n");
+                
dprintf("So, just delete context without clearing of window binding\n");
+                
aglDestroyContext(context);
+            }
+        } else {
+            
dprintf("No context to delete\n");
+        }
+
+}
+
+
+
int OS4_GL_MakeCurrent(_THISSDL_Window windowSDL_GLContext context)
+{
+
+    
int result = -1;
+
+    if (!
window || !context) {
+        
dprintf("Called window=%p context=%p\n"windowcontext);
+    }
+
+    if (
window) {
+            
SDL_WindowData *data window->driverdata;
+
+            if (
context != data->glContext) {
+                
dprintf("Context pointer mismatch: %p<>%p\n"contextdata->glContext);
+                
SDL_SetError("Context pointer mismatch");
+            } else {
+                
aglMakeCurrent(context);
+            }
+    }
+
+    
result 0;
+
+    return 
result;
+}
+
+
+
void OS4_GL_GetDrawableSize(_THISSDL_Window windowint wint h)
+{
+    
OS4_WaitForResize(_thiswindowwh);
+}
+
+
int
+OS4_GL_SetSwapInterval(_THISint interval)
+{
+    
SDL_VideoData *data _this->driverdata;
+
+    switch (
interval) {
+        case 
0:
+        case 
1:
+            
data->vsyncEnabled interval TRUE FALSE;
+            
dprintf("VSYNC %d\n"interval);
+            return 
0;
+        default:
+            
dprintf("Unsupported interval %d\n"interval);
+            return -
1;
+    }
+}
+
+
int
+OS4_GL_GetSwapInterval(_THIS)
+{
+
+    
SDL_VideoData *data _this->driverdata;
+
+    return 
data->vsyncEnabled 0;
+}
+
+
+
+
int OS4_GL_SwapWindow(_THISSDL_Window window)
+{
+        
SDL_WindowData *data window->driverdata;
+
+        if (
data->glContext) {
+            
SDL_VideoData *videodata _this->driverdata;
+
+
+            
glFinish();
+
+            if (
videodata->vsyncEnabled) {
+                
IGraphics->WaitTOF();
+            }
+
+            
// Swap the Buffers!
+            aglSwapBuffers();
+            return 
0;
+
+        } else {
+            
dprintf("No OpenGL ES 2 context\n");
+        }
+    return -
1;
+}
+
+
+
+
SDL_bool OS4_GL_ResizeContext(_THISSDL_Window window)
+{
+    return 
SDL_TRUE;
+}
+
+
+
void OS4_GL_UpdateWindowPointer(_THISSDL_Window window)
+{
+    
SDL_WindowData *data window->driverdata;
+
+    
dprintf("Updating GLES2 window pointer %p\n"data->syswin);
+
+    
struct TagItem setparams[] =
+    {
+        {
OGLES2_CCT_WINDOW, (ULONG)data->syswin},
+        {
TAG_DONE0}
+    };
+
+    
aglSetParams2(setparams);
+}
+
+
+
void OS4_GL_UnloadLibrary(_THIS)
+{
+    
dprintf("Called %d\n"_this->gl_config.driver_loaded);
+    
dprintf("Closing of ogles2 libraries done inside of gl4es\n");
+}
+
+
#endif /* SDL_VIDEO_DRIVER_AMIGAOS4 */
diff --git a/src/video/amigaos4/SDL_os4opengl.c b/src/video/amigaos4/SDL_os4opengl.c
index 13b96b2
..87f0462 100755
--- a/src/video/amigaos4/SDL_os4opengl.c
+++ b/src/video/amigaos4/SDL_os4opengl.c
@@ -20,+20,@@
 */
 
#include "../../SDL_internal.h"
 
-#if SDL_VIDEO_DRIVER_AMIGAOS4
+#if defined (SDL_VIDEO_OPENGL) && !defined (SDL_GL4ES)
 
 #include "SDL_os4video.h"
 #include "SDL_os4window.h"
diff --git a/src/video/amigaos4/SDL_os4openglwrapper.c b/src/video/amigaos4/SDL_os4openglwrapper.c
index 07b5d72
..2fa3642 100755
--- a/src/video/amigaos4/SDL_os4openglwrapper.c
+++ b/src/video/amigaos4/SDL_os4openglwrapper.c
@@ -23,+23,@@
 
 
/* wrapper functions for MiniGL */
 
-#if SDL_VIDEO_DRIVER_AMIGAOS4
+#if defined (SDL_VIDEO_OPENGL) && !defined (SDL_GL4ES)
 
 #include <GL/gl.h>
 #include <GL/glu.h>
diff --git a/src/video/amigaos4/SDL_os4video.c b/src/video/amigaos4/SDL_os4video.c
index 806055a
..08a0a0a 100755
--- a/src/video/amigaos4/SDL_os4video.c
+++ b/src/video/amigaos4/SDL_os4video.c
@@ -361,10 +361,15 @@ OS4_LoadGlLibrary(_THIS, const char path)
         
_this->gl_config.major_version,
         
_this->gl_config.minor_version);
 
+
#ifdef SDL_GL4ES
+        OS4_SetMiniGLFunctions(_this);
+        return 
OS4_GL_LoadLibrary(_thispath);
+
#else
     
if (OS4_IsMiniGL(_this)) {
         
OS4_SetMiniGLFunctions(_this);
         return 
OS4_GL_LoadLibrary(_thispath);
     }
+
#endif
 
 #if SDL_VIDEO_OPENGL_ES2
     
if (OS4_IsOpenGLES2(_this)) {
diff --git a/src/video/amigaos4/agl.h b/src/video/amigaos4/agl.h
new file mode 100755
index 0000000..4400f09
--- /dev/null
+++ b/src/video/amigaos4/agl.h
@@ -0,+1,32 @@
+
#ifndef _AGL_H_
+#define _AGL_H_
+
+
#ifndef EXEC_TYPES_H
+#include <exec/types.h>
+#endif
+#ifndef EXEC_EXEC_H
+#include <exec/exec.h>
+#endif
+#ifndef EXEC_INTERFACES_H
+#include <exec/interfaces.h>
+#endif
+
+
#ifndef GRAPHICS_GFX_H
+#include <graphics/gfx.h>
+#endif
+
+
#ifndef OGLES2_OGLES2_DEFS_H
+// it would be better to have an include with only the CreateContextTags enum difed, to avoid conflict
+//  of other typedef with full OpenGL header file...
+#include <ogles2/ogles2_defs.h>
+#endif
+
+
voidaglCreateContext2(ULONG errcodestruct TagItem tags);
+
void aglDestroyContext(voidcontext);
+
void aglMakeCurrent(voidcontext);
+
void aglSwapBuffers();
+
void aglSetBitmap(struct BitMap *bitmap);
+
void aglSetParams2(struct TagItem tags);
+
voidaglGetProcAddress(const charname);
+
+
#endif //_AGL_H_
\ No newline at end of file


To the SDL2@released 2.0.22 branch. However, I am not sure if this is exactly correct!

The only issue I ran into was an undefined reference to:
OS4_GetWindowActiveSize

In order to get around that, I just hacked in some values for Height and Width - but I would like to get an idea of where that function went. Recall, that I am using the latest bleeding-edge GL4ES combined wth SDL2.0.22.

In any case, so far, Mednafen is running quite well with out DSI errors probably due to the bleeding-edge CLIB2 changes and the pthread support. A lot of the hacks I had to add could be removed such that the code base is a lot more closer to Mednafen version 1.29.

The points are:
- What happened to OS4_GetWindowActiveSize
- How can we all come together to ensure that CLIB2 versions of SDK/Library/Dev LHAs are available
- What about those that have uploaded versions of libraries from a few years ago that are only built with NEWLIB

Regards.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@rjd324
For sdl1/2 gl4es changes they easy yes, and on my github acc. I plan to update sdk soon with both clib2 and newlib versions as well and all libs too, but that can take some time and for you will be faster to apply changes yourself. I do have local builds of gl4es and sdls-gl4es for clib2 if need it.

As for os4depot stuff, if archive not mantained, you can replace it (it handled by os4depot admins). Especially if it was configure and make only. If it differs too much, with amiga specific changes in original archive, then you put old version inside of your archive or create different name for your upload.

Some years ago both clib2 and newlib versions were done offten by devs, but then when newlib progress and clib2 not, ppls start to ditch clib2, but now when afxgroup improve clib2 much and in end opensource clib2 is much better to work with in compare with newlib (fixes of which take years to be released) its again mean clib2 versions will happen too.


Edited by kas1e on 2022/9/3 9:07:05
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@rjd324

Did you just set -mcrt=clib2 or did you have to change more stuff?

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Amigans Defender
Amigans Defender


See User information
@raziel

Remember at moment you can't use shared objects because you have to patch ad tools or try to use specs file included on github.
I've also added the file you should replace in adtools

i'm really tired...
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@afxgroup

Ah, forgot about it already...thanks for the heads up

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Quite a regular
Quite a regular


See User information
Well, the GetWindowActiveSize was removed in a much later version. So that explains it. Just a synchronisation issue between non-exact dates.

Can live with that for now, and just apply some code changes.

===

Let me be more clear. It is the fact that I applied the GL4ES additions patch from exactly: https://github.com/kas1e/SDL2_GL4ES/co ... 8b63e66ace2ebe5dae6e8288d (this patch was for an older version of SDL, and the changes - themselves, have probably moved on) to the 2.0.22 SDL release code.

Thankfully, not too much change, so it was not really a problem.


Edited by rjd324 on 2022/9/3 15:02:09
Edited by rjd324 on 2022/9/3 15:02:41
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Can you upload clib2 version of libSDL_gl4es libSDL2_gl4es ?

I was able to compile clib2 libgl4es, but not libSDL clib2 versions

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Sinan
I do compile SDL2/newlib version now easy by downloading latest irrlicht code from my github, and changing as i say in include/IrrCompileConfig.h that:

#define _IRR_COMPILE_WITH_SDL_DEVICE_


on that:

#undef _IRR_COMPILE_WITH_SDL_DEVICE_
#define _IRR_COMPILE_WITH_SDL2_DEVICE_


Then just :

cd source/Irrlicht
make 
-f Makefile.amigaos4 NDEBUG=-j4


And there is:

ls -la  ../../lib/AmigaOS4
total 11476
drwxr
-xr-x1 user Отсутствует        0 Sep  6 06:43 .
drwxr-xr-x1 user Отсутствует        0 Sep  6 06:43 ..
-
rw-r--r--  1 user Отсутствует 11750592 Sep  6 06:43 libIrrlicht.a



So it did compiles sure for SDL2 as well. Maybe in too new SDL2 something were changed ? What errors do you have ?

Quote:

Clib2 / SDL1 compile, I get this error SDL_putenv()


You should't because include/SDL/SDL_stdinc.h have this:

#ifdef HAVE_PUTENV
#define SDL_putenv    putenv
#else
extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
#endif



Quote:

I managed to compile with commenting SDL_putenv.

I hope this is the correct way...


This line is 100% necessary or you will have black screen when will use opengl apps.

I do try to rebuild for SDL1/clib2 now as well, and it also did compiles fine, without undefs to SDL_putenv, but with issues with my own swprintf.cpp which do use _REENT stuff , which can't be added to clib2 for now, only when it will be clib2.library. And this swprintf already implemented in clib2, so need commenting out.

If you didn't have this issue, but instead have issue with SDL_putenv() then something wrong happens on your side and maybe you mix again newlib/clib2 builds. Very possible that you didn't add -mcrt=clib2 everywhere (as there and gcc and g++ used in irrlicht).


Quote:

Can you share your irrlicht clib2 so that I can compare ?



Give me few hours, i will rebuild everything with gcc11.3.0 and all latest stuff.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Sinan
While building stuff, found that there indeed issue with SDL_putenv with SDL1 when build for new clib2 and g++. But in end, SDL_putenv is simple redefine to putenv(), so this simple test case reproduce issue:

#include <stdlib.h>

char env[] = "asdfasdfas";

int main()
{
putenv(env);
}


And then:
ppc-amigaos-gcc -mcrt=newlib test.c - compiles fine, warning less
ppc-amigaos-g++ -mcrt=newlib test.c - compiles fine, warning less

ppc-amigaos-gcc -mcrt=clib2 test.c - compiles fine, but do bring warning
ppc-amigaos-g++ -mcrt=clib2 test.c - not compiles, and bring error.

But on GCC 8.3.0 + older clib2 (afxgroup's one, just not the latest) it surely works before.

Created BZ on afxgroup's page: https://github.com/afxgroup/clib2/issues/68


Edited by kas1e on 2022/9/6 17:31:23
Edited by kas1e on 2022/9/6 17:32:35
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Sinan (or anyone)

Can you test plz this (i not at home so can't test myself) : https://kas1e.mikendezign.com/a/irrlicht_quaketest_sdl1.zip

But just unpacking, go to bin/amigaos4/ directory and run test case (and when run, chooice opengl in the shell).

If it works, then at least gl4es itself, sdl1_gl4es and irrlicht for clib2 is working with all latest stuff , so i can then next made SDL2 version of irrlicht and sdl2_gl4es as well


Edited by kas1e on 2022/9/6 19:01:48
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Just can't stay away
Just can't stay away


See User information
@kas1e

https://kas1e.mikendezign.com/temp/irrlicht_quaketest_sdl1.zip


404
Not Found
The resource requested could not be found on this server!

Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@rjd324
While i at it, there is how reduntant OS4_GetWindowActiveSize() replaced: https://github.com/AmigaPorts/SDL-2.0/ ... bb614248a002323706dac3997

Probabaly you already doing it like this as well, but just in case, all you need to do is in replace

glViewport(00widthheight);


on

glViewport(00window->wwindow->h);


and remove at top of function reduntant declarations and os4_getwindowactivesize() calling



@javier
reuploaded on new place, check plz: https://kas1e.mikendezign.com/a/irrlicht_quaketest_sdl1.zip

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Just can't stay away
Just can't stay away


See User information
@kas1e

working now download.

Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Jabirulo
And test then plz SDL2 version too (same example, same run, etc):

https://kas1e.mikendezign.com/a/irrlicht_quaketest_sdl2.zip

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Both versions are working however with SDL1 version it is not possible to quit the test program with ESC key

SDL2 version you can quit whenever you wish.

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Sinan
What about FPS ? (top of the window), the same more or less ?

in SDL1 it's "alt+f4" for close, do not remember why so, probabaly just forgotten "esc", need to add if so.

So, that mean that SDL2 compiles and works fine, just with the change i quoted above.

This also mean all fine, and there are all clib2 stuff : all compiled over gcc 11.3.0. Everything of latest versions from sources (irrlicht from my page, gl4es from ptitseb's one, sdl1/sdl2 from capehill's latest ones), and all build over clib2 beta-07 from Andrea:

https://kas1e.mikendezign.com/a/gl4es_irrlicht_clib2_09_2022.zip


@rjd324
Do you need all this latest stuff for newlib also ? Or you already deal with everything yourself ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Quite a regular
Quite a regular


See User information
Hey @kas1e

I dealt with it. But it is really important for us to make progress that there is a central location. If you can update your gl4es SDK with both SDL and SDL2 that would be great.

Regards.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Just can't stay away
Just can't stay away


See User information
@kas1e

Don't understand what are/do those files in achive you posted (sdl1/sdl2).
Do I run them alone?
Or with quake (1, 2?!?!??) datafiles?
or with yout irrlitch engine data (os4depot)?

sorry for being so dumb ¿:-/


EDIT: ok runnign frrom shell (stack 1000000) both work ok.
EDIT2: got ~33fps (RX550, PowerPrefs set to dynamic & high), using OpenGL 1.5 driver (a).
EDIT3: SDL1 can move with cursor keys, but with SDL2 they don't work, just mouse for "moving" view.


Edited by jabirulo on 2022/9/6 22:06:25
Edited by jabirulo on 2022/9/6 22:08:43
Edited by jabirulo on 2022/9/6 22:10:42
Edited by jabirulo on 2022/9/6 22:14:35
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Home away from home
Home away from home


See User information
@Javier
Something VERY wrong on your side. It should be 260 FPS and not 33 (at least on my side it is). PowerPrefs should be not dynamic, but HIGH.

You probablay on running of examples choose software renderer by mistake, or something of that sort, you should choose exactly "OpenGL" driver (check for correct letter twice). I.e. you run example, and when it ask for driver, hit "a", not "d" or "e". Because 33 FPS it is kind of what you have with software rendering and/or burning video driver (which also software rendering, just a bit heavier).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: GL4ES / SDL+GL4ES / CLIB2 / Outdated NEWLIB libs and OnWards
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Thanks for the compiled libraries.

I also get 34 fps on my Sam460+RX-550 (Power Prefs - Set To High) with SDL2 version...

Here is output

LIBGLInitialising gl4es
LIBGL
v1.1.5 built on Sep  6 2022 18:31:35
LIBGL
Using GLES 2.0 backend
LIBGL
Using Warp3DNova.library v54 revision 16
LIBGL
Using OGLES2.library v3 revision 3
LIBGL
OGLES2 Library and Interface open successfuly
LIBGL
Targeting OpenGL 2.1
LIBGL
Not trying to batch small subsequent glDrawXXXX
LIBGL
: try to use VBO
LIBGL
Force texture for Attachment color0 on FBO
LIBGL
Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL
Current folder is:/RAM Disk/bin/AmigaOS4
Please select the driver you want 
for this example:
 (
aOpenGL 1.5
 
(bDirect3D 9.0c
 
(cDirect3D 8.1
 
(dBurning's Software Renderer
 (e) Software Renderer
 (f) NullDevice
 (otherKey) exit

a
Irrlicht Engine version 1.8.4
SDL Version 2.24.0
LIBGL: Hardware test on current Context...
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_texture_float  detected and used
LIBGL: Extension GL_AOS4_texture_format_RGB332 detected
LIBGL: Extension GL_AOS4_texture_format_RGB332REV detected
LIBGL: Extension GL_AOS4_texture_format_RGBA1555REV detected and used
LIBGL: Extension GL_AOS4_texture_format_RGBA8888 detected and used
LIBGL: Extension GL_AOS4_texture_format_RGBA8888REV detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Extension GL_EXT_frag_depth  detected and used
LIBGL: Max vertex attrib: 16
LIBGL: Max texture size: 16384
LIBGL: Max Varying Vector: 32
LIBGL: Texture Units: 16/16 (hardware: 32), Max lights: 8, Max planes: 6
LIBGL: Extension GL_EXT_texture_filter_anisotropic  detected and used
LIBGL: Max Anisotropic filtering: 16
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is A-EON Technology Ltd. Written by Daniel '
Daytona675x' Müßener @ GoldenCode.eu
LIBGL: GLSL 300 es supported
LIBGL: GLSL 310 es supported and used
Using renderer: OpenGL 2.1
GL4ES wrapper: ptitSeb
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Vertex shader compilation failed at position 585:
Invalid token
Pixel shader compilation failed at position 580:
Invalid value (implicit param?)
Vertex shader compilation failed at position 605:
Invalid token
Pixel shader compilation failed at position 586:
Invalid value (implicit param?)
Loaded texture: e7walldesign01b.jpg
Loaded texture: e7steptop2.jpg
Loaded texture: e7dimfloor.jpg
Loaded texture: e7brickfloor01.jpg
Loaded texture: e7bmtrim.jpg
Loaded texture: e7sbrickfloor.jpg
Loaded texture: e7brnmetal.jpg
Loaded texture: e7beam02_red.jpg
Loaded texture: e7swindow.jpg
Loaded texture: e7bigwall.jpg
Loaded texture: e7panelwood.jpg
Loaded texture: e7beam01.jpg
Loaded texture: xstepborder5.jpg
Loaded texture: lavahell.jpg
Loaded texture: e7steptop.jpg
Loaded texture: metalblackwave01.jpg
Loaded texture: pjrock1.jpg
Loaded texture: timlamp.tga
Loaded texture: gratetorch2.jpg
Loaded texture: gratetorch2b.tga
Loaded mesh: 20kdm2.bsp
Needed 47ms to create Octree SceneNode.(92 nodes, 10640 polys)
Quit SDL
LIBGL: Shuting down
LIBGL: Saved a PSA with 2 Precompiled Programs

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
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