Annonces Google
Serveur IRC
Serveur : irc.portlane.se
Canal : #AmigaNG
Activité du Site

Pages vues depuis 25/07/2007 : 24 888 019

  • Nb. de membres 186
  • Nb. d'articles 1 269
  • Nb. de forums 19
  • Nb. de sujets 20
  • Nb. de critiques 24

Top 10  Statistiques

Index du forum »»  Logiciels »» Sondage et tutos Warp3D Nova / OpenGL ES

Sondage et tutos Warp3D Nova / OpenGL ES#2343

9Contributeur(s)
zzd10hK-LsinisrusElwoodAmiDARKhunoppcLiothellierPseudaxos
3 Modérateur(s)
K-LElwoodcorto
Lio Lioicon_post
content de te lire Hugues...

je serais ravi de t'aider mais bon je n'ai ni le HW (A1G4) ni le SW (enhancer pack) qui permettent de faire fonctionner NOVA donc je ne te suis pas d'une grande utilité sur ce coup là !
A1G4/Radeon9000PRO/1Go RAM; X5000/RadeonR7-250x/2Go RAM; AOS4.1FE
hunoppc hunoppcicon_post
Salut Lio
Moi aussi je suis content de te lire :-)
Ne te fais pas de soucis, tu pourras plancher sur le GUI (le design) et autres options sans avoir besoin de la carte 3d 
On arrivera toujours à faire participer tout le monde ;-)

Une petite video sur ma Sam460 en plein écran et listeur de mode écran, utilisant ma librairie


Voilà 
Merci
AmigaOs4 Rulez
- X1000 Nemo - 1800 Mhz 4 Go de Ram - Radeon HD R9 280X Version Toxic 3GO
Soundblaster live 5.1, Siil 3114 PCIe 1X, Port Serial debug
X5000/40 RX560 4Go
sinisrus sinisrusicon_post
Bravo huno il me tarde de voir les premier portage
--
Coin coin... amitheme.amiga-ng.org
Sam460 1,15Ghz - OS4.1FE - Radeon Saphir HD7750 R7 250E - 2Go de ram
zzd10h zzd10hicon_post
Salut Hugues,
Je n'ai peut-être rien compris mais est-ce que Daytona n'est pas sur un projet équivalent ? 
Je n'y connais rien, donc je me plante certainement...

Sinon, si tu as besoin, je suis OK pour des tests ponctuels (X1000 - R7-250X - Nova) mais j'ai pas trop de temps.


hunoppc hunoppcicon_post


Salut Guillaume



En fait tu as raison de poser la question ;-)



Le projet de Daytona est de réaliser la lib OpenGL ES avec
un minimum d'appel GL supportés par les API les plus courantes (je lui fais
ajouter des fonctions de temps en temps :-))



Moi je m'occuper de la partie EGL avec ses outils, fonctions
utilisées par le Raspberry PI, Android et pour finir le très bon émulateur
ANGLE (OpenGL ES sous Windows)



Cette librairie permet de retirer un nombre considérable de
lignes de code et simplifie complètement le portage voir l'intégration pour les
plus novices.



Dans les tests des exemples seront fournis et vous permettrez
d'en juger par vous-même.



Ensuite cela me permet d'ajouter de nouvelles fonctions non
présentes dans la lib de Daytona.



A savoir que cette lib est au départ crée pour moi pour
ajouter OpenGL ES dans mes portages.



Voilà



J'espère avoir été explicite

PS: Merci encore pour ton aide ;-)



AmigaOs4 Rulez
- X1000 Nemo - 1800 Mhz 4 Go de Ram - Radeon HD R9 280X Version Toxic 3GO
Soundblaster live 5.1, Siil 3114 PCIe 1X, Port Serial debug
X5000/40 RX560 4Go
thellier thelliericon_post
Hello





Bravo Hugues : une fois de plus t'es le meilleur :-)

Je pense que tu voulais dire "Je suis en train de travailler sur un wrapper EGL utilisant l'OpenGL ES de Daytona"



Et même si je sais pas ce que c'est que EGL  je suppose que c'est un
peu comme GLUT ça facilite la programmation du "démarrage" d'un prog OpenGL, non ?



Alain
Sam440 - Sam460 - X5000 - PowerBookG4 - WinUAE - MiniMig
hunoppc hunoppcicon_post
Salut Alain ;-)
Merci pour tout (corrections et félicitations)
Moi aussi je te félicite pour ton travail ;-)
Donc oui cela facilite la tâche à tous voici le code exemple de la démo vidéo YOUTUBE

-----------------------------------------------------------------------------------
/*
 * Book:      OpenGL(R) ES 2.0 Programming Guide
 * Authors:   Aaftab Munshi, Dan Ginsburg, Dave Shreiner
 * ISBN-10:   0321502795
 * ISBN-13:   9780321502797
 * Publisher: Addison-Wesley Professional
 * URLs:      http: *safari.informit.com/9780321563835
 *            http: *www.opengles-book.com
 */

/*
 * triangles.c draw Working on AmigaOS4 now !!!
 *
 * This is a simple example that draws a single triangle with a
 * minimal vertex/fragment shader.  The purpose of this example is to
 * demonstrate the basic concepts of OpenGL ES 2.0 rendering.
 */
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "egl_wrap.h"

typedef struct
{
    /* Handle to a program object. */
    GLuint programObject;

    /* Angle of rotation. */
    float rotationAngle;

} UserData;

/* Initialize the shader and program object. */
int init(ESContext *esContext)
{
    esContext->userData = malloc(sizeof(UserData));

    UserData *userData = (UserData*)esContext->userData;
    const char *vShaderStr = 
        "uniform mat4 u_mvpMatrix;    \n"
        "attribute vec4 a_position;   \n"
        "attribute vec4 a_color;      \n"
        "varying vec4 v_color;        \n"
        "void main()                  \n"
        "{                            \n"
        "   gl_Position = u_mvpMatrix * a_position; \n"
        "   v_color = a_color;        \n"
        "}                            \n";
  
    const char *fShaderStr = 
        "precision mediump float;                     \n"
        "varying vec4 v_color;                        \n"
        "void main()                                  \n"
        "{                                            \n"
        "  gl_FragColor = v_color;                    \n"
        "}                                            \n";

    GLuint vertexShader;
    GLuint fragmentShader;
    GLuint programObject;
    GLint linked;

    /* Load the vertex/fragment shaders. */
    vertexShader = esLoadShader(GL_VERTEX_SHADER, vShaderStr);
    fragmentShader = esLoadShader(GL_FRAGMENT_SHADER, fShaderStr);

    /* Create the program object. */
    programObject = glCreateProgram();
  
    if (programObject == 0) {
        return 0;
    }

    glAttachShader(programObject, vertexShader);
    glAttachShader(programObject, fragmentShader);

    /* Bind artributes. */
    glBindAttribLocation(programObject, 0, "a_position");
    glBindAttribLocation(programObject, 1, "a_color");

    /* Link the program and check linking result. */
    glLinkProgram(programObject);
    glGetProgramiv(programObject, GL_LINK_STATUS, &linked);
    if (!linked) {
        GLint infoLen = 0;

        glGetProgramiv(programObject, GL_INFO_LOG_LENGTH, &infoLen);
     
        if (infoLen > 1) {
            char* infoLog = (char*)malloc(sizeof(char) * infoLen);

            glGetProgramInfoLog(programObject, infoLen, NULL, infoLog);
            esLogMessage("Error linking program:\n%s\n", infoLog);           
            free(infoLog);
        }

        glDeleteProgram(programObject);
        return GL_FALSE;
    }

    /* Store the program object. */
    userData->programObject = programObject;

    glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
    return GL_TRUE;
}

/* Update the state. */
void update(ESContext *esContext, float deltaTime)
{
    UserData *userData = (UserData*)esContext->userData;
    userData->rotationAngle += (32.0 * M_PI * deltaTime);
}

///
// Cleanup
//
void ShutDown ( ESContext *esContext )
{
   UserData *userData = (UserData*)esContext->userData;

   // Delete program object
   glDeleteProgram ( userData->programObject );

   //shutdown context opengl-es AOS4
   esShutdown(esContext);
}

//
// Handle keyboard input
//
void Key ( ESContext *esContext, unsigned char key, int x, int y)
{
    //here add your action keyboard on your program
   switch ( key )
   {
   case '1':
      //printf( "FPS Activated now !!\n" );
      // Activate FPS counter
    esActivateFPS(1);
      break;

   case '2':
      //printf( "FPS disabled now !!\n" );
      // Disable FPS counter
    esActivateFPS(0);
      break;

   case 033: // ASCII Escape Key
    //printf( "Saw an 'Escape' \n" );
    //New function for Unload context and shutdown a lib EGL for Opengl-ES AOS4
    esShutdown(esContext);
       break;
   }
}


/* Draw a triangle using the shader pair created in Init() */
void draw(ESContext *esContext)
{
    static GLfloat vertices[] = {0.0f,  0.5f, 0.0f,1.0f,
                                 -0.5f, -0.5f, 0.0f, 1.0f,
                                 0.5f, -0.5f, 0.0f, 1.0f};

    static GLfloat colors[] = {1.0f, 0.0f, 0.0f, 1.0f,
                               0.0f, 1.0f, 0.0f, 1.0f,
                               0.0f, 0.0f, 1.0f, 1.0f};

    UserData *userData = (UserData*)esContext->userData;
     
    /* Set the viewport. */
    glViewport(0, 0, esContext->width, esContext->height);
  
    /* Clear the color buffer. */
    glClear(GL_COLOR_BUFFER_BIT);

    /* Use the program object. */
    glUseProgram(userData->programObject);

    /* Load the vertex and color data. */
    glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, vertices);
    glEnableVertexAttribArray(0);
    glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 0, colors);
    glEnableVertexAttribArray(1);

    /* Create and load a rotation matrix uniform. */
    ESMatrix rotationMatrix;
    esMatrixLoadIdentity(&rotationMatrix);
    esRotate(&rotationMatrix, userData->rotationAngle, 0.0f, 1.0f, 0.0f);
    glUniformMatrix4fv(0, 1, GL_FALSE, (GLfloat*) &rotationMatrix.m[0]);

    glDrawArrays(GL_TRIANGLES, 0, 3);
}

int main(int argc, char *argv[])
{
    ESContext esContext;
    UserData userData;

     //activate FPS
    esActivateFPS(1);

     //activate Fullscreen mode
    eglFullScreenActivated(1);

    esInitContext(&esContext);
    esContext.userData = &userData;

    esCreateWindow(&esContext, "Hello Triangle", 800, 600, ES_WINDOW_ALPHA);

    if (!init(&esContext)) {
        return EXIT_FAILURE;
    }

    esRegisterUpdateFunc(&esContext, update);
    esRegisterDrawFunc(&esContext, draw);
    esRegisterKeyFunc( &esContext, Key );
    esMainLoop(&esContext);

    return EXIT_SUCCESS;
}

------------------------------------------------------------------------------------------------

Je pourrais te faire pousser une version de la lib ce soir mais pas encore fini tout pour la gui
cela peut te faire faire des tests sur ta vache
HunoPPC

AmigaOs4 Rulez
- X1000 Nemo - 1800 Mhz 4 Go de Ram - Radeon HD R9 280X Version Toxic 3GO
Soundblaster live 5.1, Siil 3114 PCIe 1X, Port Serial debug
X5000/40 RX560 4Go
sinisrus sinisrusicon_post
ça en fait des lignes juste pour un triangle!!!! J'imagine même pas pour un jeux le taff de ouf!!!!
--
Coin coin... amitheme.amiga-ng.org
Sam460 1,15Ghz - OS4.1FE - Radeon Saphir HD7750 R7 250E - 2Go de ram
hunoppc hunoppcicon_post
@sinisrus
Il y a rien là ;-) pour opengles
C'est rien essuie tes sueurs froides c'est nous qui tapons le code :-)
HunoPPC
AmigaOs4 Rulez
- X1000 Nemo - 1800 Mhz 4 Go de Ram - Radeon HD R9 280X Version Toxic 3GO
Soundblaster live 5.1, Siil 3114 PCIe 1X, Port Serial debug
X5000/40 RX560 4Go
sinisrus sinisrusicon_post
Et moi qui réapprend sinus cosinus et tangente... Pour essayer d'aller un peu plus loin :-)
--
Coin coin... amitheme.amiga-ng.org
Sam460 1,15Ghz - OS4.1FE - Radeon Saphir HD7750 R7 250E - 2Go de ram
Petites Annonces

0 annonce(s) publiée(s)

Consulter

AmigaOS 4.1

Laissez-vous tenter par
AmigaOS 4.1
AmiTheme

AmiTheme