Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
50 user(s) are online (21 user(s) are browsing Forums)

Members: 0
Guests: 50

more...

Headlines

Forum Index


Board index » All Posts (Capehill)




Re: SDL2
Just can't stay away
Just can't stay away



Go to top


Re: Amiga games Quake 2 and Battle Squadron
Just can't stay away
Just can't stay away


@MamePPCA1

Quote:

And Quake 2? Well I have the original CD on a DVD box and I installed and later downloaded the Quake 2 package from os4depot and I don't kinow why doesn't run it.


AFAIK there is only one Quake2 port on OS4Depot and it requires MiniGL + Warp3D. Which graphics card do you use and are you able to run other MiniGL apps?

Go to top


Re: MacOS PPC CroMag Rally game port
Just can't stay away
Just can't stay away


@kas1e

Quote:

Shell Process 'test': OGLES2_glShaderSource: shader 384, count 4, string 0x616f1a98 length 0x0
Line 0: '#version 120'
Line 1: '
layout(location = 0) in vec4 vecPos;
'
Line 2: 'layout(location = 0) uniform mat4 matMVP;
'
Line 3: 'void main() {
gl_Position = matMVP * vecPos;
}
'
Shell Process 'test': OGLES2_glCompileShader: shader 384
Shell Process 'test': GL error 1282 (GL_INVALID_OPERATION) detected after CompileShader


My guess is that #version should be "310 es" rather due to uniform location.

Go to top


Re: SDL2
Just can't stay away
Just can't stay away


@kas1e

If GL error comes from OGLES2 then glSnoop may help. But it might come from GL4ES too?

@Raziel

This is is a type of question I shouldn't try to answer without reading ScummVM code but IIRC choosing ScummVM's OpenGL renderer means that application uses OpenGL context directly so SDL_Renderer is not involved.

Go to top


Re: SDL2
Just can't stay away
Just can't stay away


@kas1e

Thanks, adding SDL_GetPreferredLocales for the next RC.

@Raziel

Default: ok, I will see if help can be improved. Some settings like batching depend on the driver if I remember correctly. Have you checked https://wiki.libsdl.org/CategoryHints already?

Program can request any driver by index: https://wiki.libsdl.org/SDL_CreateRenderer . Please see also related functions.

If program passes -1 for the index, then SDL will check the hint. https://github.com/AmigaPorts/SDL-2.0/ ... /render/SDL_render.c#L971

Quote:

start a program that explicitely uses OGLES2


What do you mean by this? Do you have some code example in mind?

Go to top


Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


@Raziel

It seems to me that you need to cast TimerBase like:

ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL);

Go to top


Re: Irrlicht Engine 1.9 for OpenGLES2 : in progress
Just can't stay away
Just can't stay away


@kas1e

Interesting bug. After some testing (glslangvalidator + Nova only), it seems to me that the minimum condition for crashing W3DN_CreateShaderPipeline is to define 2 "out" arrays of size 2 in vertex shader and similarly 2 "in" arrays of size 2 in fragment shader, like

out vec2 foo[2];
out vec2 bar[2];

and

in vec2 foo[2];
in vec2 bar[2];

Removing the other array, or using size 1 doesn't seem to crash. I suppose we need Hans here.

Quote:

is there any easy was how we can get rid of arrays in shaders to make them works as expected just without arrays


You can unroll the light loops and use separate variables as a workaround.

Go to top


Re: Irrlicht Engine 1.9 for OpenGLES2 : in progress
Just can't stay away
Just can't stay away


Okay, full log shows that shader pipeline creation failed:

Quote:

Shell Process '01.HelloWorld': OGLES2_glLinkProgram: program 273
Shell Process '01.HelloWorld': W3DN_CreateShaderPipeline: errCode 0x618ec698, tags 0x618ec678 ([W3DNTag_Offset: 0x601C92C8][W3DNTag_Offset: 0x601C9368])
W3DN_GCN.library (0): Previous pipeline stage's (null) output is incompatible with the fragment shader's input of the same name
Shell Process '01.HelloWorld': W3DN_CreateShaderPipeline: <- errCode 18 (W3DNEC_SHADERSINCOMPATIBLE). Shader pipeline address 0x0
Shell Process '01.HelloWorld': Warning: NULL pointer detected
Shell Process '01.HelloWorld': Warning: unsuccessful operation detected
Shell Process '01.HelloWorld': GL error 1282 (GL_INVALID_OPERATION) detected after LinkProgram


So, we need to investigate related shaders.

Go to top


Re: Irrlicht Engine 1.9 for OpenGLES2 : in progress
Just can't stay away
Just can't stay away


@kas1e

Was glSnoop log filtered in some way? I am just wondering why there were only 2 GL calls shown.

glCreateShader can return 0 on error (line 222) so this should be checked: https://sourceforge.net/p/irrlicht/cod ... MaterialRenderer.cpp#l222

Go to top


Re: Irrlicht Engine 1.9 for OpenGLES2 : in progress
Just can't stay away
Just can't stay away


@kas1e

Where is glCreateShader?

https://registry.khronos.org/OpenGL-Re ... html/glShaderSource.xhtml -> "GL_INVALID_OPERATION is generated if shader is not a shader object."

Go to top


Re: SDL1 open issues
Just can't stay away
Just can't stay away


@kas1e

You probably should skip SDL_OPENGL flag in this scenario.

Try using SDL_GetWMInfo() to get window pointer.

Go to top


Re: SDL1 open issues
Just can't stay away
Just can't stay away


@kas1e

Yes, it should be possible. You need the Intuition window pointer first. Then, call aglCreateContext and pass the window pointer. Now you should have a GL context which you can make current, draw, swap the buffers and destroy later (before window closing, probably). And in case window pointer changes it has to be refreshed.

There might be some conflicts if app calls SDL_Flip or similar. These probably should be deactivated.

Go to top


Re: SDL1 open issues
Just can't stay away
Just can't stay away


@kas1e

I think SDL 1.2 supports mostly old OpenGL.

If you need a system window pointer, try SDL_GetWMInfo: https://github.com/AmigaPorts/SDL-1.2/ ... /include/SDL_syswm.h#L237

Go to top


Re: Need help with shader optimisation
Just can't stay away
Just can't stay away


@kas1e

Quote:

What about writing analogue of "slow for us" quake3map irrlicht test, workingdirectly over nova and/or ogles2, so we can see if it will give us 500 fps at least, or will be on the same level as it now with gl4es ?


What is the status of Irrlicht's OpenGLES2 renderer?

Go to top


Re: gcc bug or am I a looser?
Just can't stay away
Just can't stay away


@yescop

Just to clarify, by precision I meant cout output's display precision (how many digits you see), instead of amount of bits in variables (float or double).

Go to top


Re: Need help with shader optimisation
Just can't stay away
Just can't stay away


@kas1e

https://github.com/elnormous/Realistic ... master/RealisticWater.cpp

It would be interesting to know what happens if you comment out refraction (133-140) or reflection (142-169) parts.

Go to top


Re: gcc bug or am I a looser?
Just can't stay away
Just can't stay away


@yescop

Try "std::fixed << std::setprecision(8)" when printing those numbers. 8 or more, I don't remember how many digits were exactly required but it should show the issue with those floating point numbers.

Go to top


Re: How to measure program execution time?
Just can't stay away
Just can't stay away


Thanks all, learned new things again. Seems there is no need to reinvent wheels here.

Go to top


Re: How to measure program execution time?
Just can't stay away
Just can't stay away


@Raziel

I was looking for something that works like this:

Shell> time wait 3

Duration 3010 ms.

Shell> time make -f something.make

Duration 10503 ms.

So the purpose is to time random executables or scripts.

Go to top


How to measure program execution time?
Just can't stay away
Just can't stay away


Is there anything like "time" command (Linux) on AmigaOS 4? I wrote a simple tool that uses gettimeofday() + system() to get some figures but maybe there are better tools already?

Here is the source, very little tested:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>

static char buffer[1024];

int main(int argcchar** argv)
{
    for (
int i 1argci++) {
        
int len strlen(buffer);
        
snprintf(buffer lensizeof(buffer) - len"%s "argv[i]);
    }

    
//printf("buffer '%s'\n", buffer);

    
struct timeval beforeafter;

    
gettimeofday(&beforeNULL);

    
int result system(buffer);

    
gettimeofday(&afterNULL);

    
uint32_t duration = (after.tv_sec before.tv_sec) * 1000000 + (after.tv_usec before.tv_usec);

    
printf("\nCommand result %d. Duration [%u] microseconds or [%u] milliseconds\n"resultdurationduration 1000);

    return 
0;
}

Go to top



TopTop
« 1 ... 7 8 9 (10) 11 12 13 ... 84 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project