OpenGL soporte para FWH 12.01

Re: OpenGL soporte para FWH 12.01

Postby Antonio Linares » Thu Jan 19, 2012 2:12 pm

Lucas,

Es que en un producto asi no vale que solo haga "algunas" cosas. O se "come" la aplicación entera, tal cual, y sale andando en web (o con unos mínimos cambios), ó queda como un bonito ejemplo pero que no vale para mucho más.

A fecha de hoy nosotros no podemos asegurar que se pueda realizar un producto asi. E insisto, para aprender cosas nuevas, es ganas de reinvertar la rueda, cuando ya está php, html5, javascript, etc.

Nosotros lo que hemos publicado son conceptos, pruebas, etc. No hemos mentido a nadie ni ofrecido algo incompleto. En la actualidad creemos que la solución más viable ha de usar JQuery y JQuery Mobile.

Y mientras tanto la mejor solución es Terminal Server ó aplicaciones RDPs que permiten ejecutar Windows en el iPad, iPhone, etc.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: OpenGL soporte para FWH 12.01

Postby hmpaquito » Thu Jan 19, 2012 3:40 pm

Antonio y compañia,

A mi modo de ver, y como dicen "no soy tecnico", es muy dificil hacer un fweb que se "coma" las aplicaciones ya escritas; son muchos pequeños detalles, muchos truquillos, esto, lo otro, etc, que hacen que sea una labor dificial.

Yo con fweb me conformaria que fuera lo que fue Fivewin a Clipper: un camino (incompatible) comodo a Windows; es decir: yo me quedo con que fweb fuera un camino sencillo hacia internet. ¿ qué hizo entre otras muchas cosas fivewin ? Pues ni más ni menos que "domar" a Windows: enrutar aquellos eventos que necesitabamos, ponernos un get like a clipper, habilitarnos un browse con edicion, etc... para que la programacion orientada a gestion empresarial fuera sencilla; pues lo mismo, lo mismo es lo que yo pretenderia con fweb.

Mis 2 céntimos.
Saludos
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: OpenGL soporte para FWH 12.01

Postby lucasdebeltran » Thu Jan 19, 2012 6:20 pm

Antonio,

Entonces, ¿parece que no váis a desarrollar Fiveweb?.

Efectivamente, tiene que ser cómo dices, que se coma todo el código fuente. Para empezar desde 0 o desde un 20% ya hay otras plataformas.

Fácil no es desde luego, pero posible sí. Y eso supone priorizar las ventanas y prototipos de Fivetech claro.

¿Habéis pensado en lanzar una encuesta sobre lo que necesita la gente?.

Muchas gracias.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: OpenGL soporte para FWH 12.01

Postby Antonio Linares » Fri Jan 20, 2012 12:39 am

Lucas,

De momento seguimos estudiando y aprendiendo todo lo que ofrece HTML5, JQuery, etc y viendo hasta donde se podrá ó no llegar.

Tenemos partes resueltas, como los web sockets, pero muchas veces conforme aprendemos determinadas técnicas, entendemos que hay que rehacer lo hecho.

Por ejemplo, hasta hace unos dias, desconociamos que HTML5 permite manejar bases de datos locales, lo que supone una avance enorme, para mantener datos locales temporales, sin necesidad de usar un motor local externo. Esta información, como es obvio, nos hace replantearnos partes vitales.

Hoy por hoy, no podemos dar fechas de cuando tendremos un producto para web disponible. Si alguien tiene prisas, una necesidad urgente, ahi esta php, javascript. html, etc. :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: OpenGL soporte para FWH 12.01

Postby lucasdebeltran » Fri Jan 20, 2012 8:34 am

Antonio,

Muchas gracias.

Sí, nosotros hace años que ya no empezamos ninguna aplicación con Fivewin.

El tema está en las que ya tenemos desarrolladas con FWH, necesitamos saber si Fivetech tendrá una solución factible o tendremos que empezar desde cero.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: OpenGL soporte para FWH 12.01

Postby Antonio Linares » Fri Jan 20, 2012 8:54 am

Creo que he explicado con claridad que hoy por hoy no disponemos de ese producto milagroso que porte las aplicaciones a la web, y lo que las empresas usan es Terminal Server.

Para cuando tendremos algo listo ? No lo sabemos y aun no sabemos si sera 100% posible.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: OpenGL soporte para FWH 12.01

Postby Antonio Linares » Fri Jan 20, 2012 10:21 pm

Class GLWindow

glwindow.prg (c) FiveTech Software 2012
Code: Select all  Expand view
#include "hbclass.ch"
#include "common.ch"

#define GL_COLOR_BUFFER_BIT   0x00004000
#define GL_DEPTH_BUFFER_BIT   0x00000100

REQUEST HB_GT_GUI_DEFAULT

function main()
 
  local oWnd := GLWindow():New( 10, 10, 500, 500, "Test GLWindow" )

  oWnd:Activate()

return nil

PROCEDURE HB_GTSYS()
return

CLASS GLWindow

   DATA bInit
   DATA bPaint
   DATA bResize
   DATA bIdle
   DATA bKeyDown

   METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CONSTRUCTOR
   METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown )
   METHOD Initiate()
   METHOD Display()
   METHOD ReShape( nWidth, nHeigth )
   METHOD Idle()
   METHOD KeyDown( nKey, nX, nY )
   
   METHOD End()
   
   DESTRUCTOR End()

ENDCLASS

METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CLASS GLWindow

  DEFAULT nMode TO 20

  glutInit()
  glutInitDisplayMode( nMode )
  glutInitWindowSize( nWidth, nHeight )
  glutInitWindowPosition( nTop, nLeft )
  glutCreateWindow( cTitle )
 
  GLSetSelf( Self )

return Self

METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown ) CLASS GLWindow

  ::bInit     := bInit
  ::bPaint    := bPaint
  ::bResize   := bResize
  ::bIdle     := bIdle
  ::bKeyDown  := bKeyDown

  ::Initiate()

  glutMainLoop()

return nil

METHOD Initiate() CLASS GLWindow

  if ::bInit != nil
     Eval( ::bInit, Self )
  endif

return nil

METHOD Display() CLASS GLWindow

   glClearColor( 0.0, 0.0, 1.0, 0.0 )
   glClear( HB_BITXOR( GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT ) )    

   glutSwapBuffers()
   glFlush()

return nil

METHOD ReShape( nWidth, nHeight ) CLASS GLWindow

return nil

METHOD Idle() CLASS GLWindow

return nil

METHOD KeyDown( nKey, nX, nY ) CLASS GLWindow

return nil

METHOD End() CLASS GLWindow

  GLReleaseSelf()
 
return nil  

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <GL/glut.h>

static PHB_ITEM pSelf;

HB_FUNC( GLSETSELF )
{
   pSelf = hb_gcGripGet( hb_param( 1, HB_IT_OBJECT ) );
}  

HB_FUNC( GLRELEASESELF )
{
   hb_gcGripDrop( pSelf );
}  

HB_FUNC( GLUTINIT )
{
   int argc = hb_cmdargARGC();
   
   glutInit( &argc, hb_cmdargARGV() );
   hb_ret();
}

HB_FUNC( GLUTINITDISPLAYMODE )
{
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWSIZE )
{
   glutInitWindowSize( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWPOSITION )
{
   glutInitWindowPosition( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

static void display( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "DISPLAY" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLUTCREATEWINDOW )
{
    glutCreateWindow( hb_parc( 1 ) );
    glutDisplayFunc( display );
    hb_ret();
}

HB_FUNC( GLUTMAINLOOP )
{
   glutMainLoop();
   hb_ret();
}

static void reshape( int width, int height )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "RESHAPE" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( width );
   hb_vmPushLong( height );
   hb_vmFunction( 2 );
}

static void keyboard( unsigned char key, int x, int y )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "KEYBOARD" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( key );
   hb_vmPushLong( x );
   hb_vmPushLong( y );
   hb_vmFunction( 3 );
}

static void idle( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "IDLE" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLCLEARCOLOR )
{
   glClearColor( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}

HB_FUNC( GLCLEAR )
{
   glClear( hb_parnl( 1 ) );    
}

HB_FUNC( GLUTSWAPBUFFERS )
{
   glutSwapBuffers();
}

HB_FUNC( GLFLUSH )
{
   glFlush();
}

#pragma ENDDUMP
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: OpenGL soporte para FWH 12.01

Postby Antonio Linares » Fri Jan 20, 2012 11:59 pm

Moviendo una forma con el teclado "s" y "d"

Code: Select all  Expand view
#include "hbclass.ch"
#include "common.ch"

#define GL_COLOR_BUFFER_BIT   0x00004000
#define GL_DEPTH_BUFFER_BIT   0x00000100

#define GL_POLYGON            0x0009

REQUEST HB_GT_GUI_DEFAULT

static nLeft := 0.1

function main()
 
  local oWnd := GLWindow():New( 10, 10, 800, 500, "Test GLWindow" )

  oWnd:Activate()

return nil

PROCEDURE HB_GTSYS()
return

CLASS GLWindow

   DATA bInit
   DATA bPaint
   DATA bResize
   DATA bIdle
   DATA bKeyDown

   METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CONSTRUCTOR
   METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown )
   METHOD Initiate()
   METHOD Display()
   METHOD ReShape( nWidth, nHeigth )
   METHOD Idle()
   METHOD Keyboard( nKey, nX, nY )
   
   METHOD End()
   
   DESTRUCTOR End()

ENDCLASS

METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CLASS GLWindow

  DEFAULT nMode TO 20

  glutInit()
  glutInitDisplayMode( nMode )
  glutInitWindowSize( nWidth, nHeight )
  glutInitWindowPosition( nTop, nLeft )
  glutCreateWindow( cTitle )
 
  GLSetSelf( Self )

return Self

METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown ) CLASS GLWindow

  ::bInit     = bInit
  ::bPaint    = bPaint
  ::bResize   = bResize
  ::bIdle     = bIdle
  ::bKeyDown  = bKeyDown

  ::Initiate()

  glutMainLoop()

return nil

METHOD Initiate() CLASS GLWindow

  if ::bInit != nil
     Eval( ::bInit, Self )
  endif

return nil

METHOD Display() CLASS GLWindow

   glClearColor( 0.0, 0.0, 1.0, 0.0 )
   glClear( HB_BITXOR( GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT ) )    

   glBegin( GL_POLYGON )
      glColor3f( 5.0, 0.0, 0.4 )
      glVertex3f( -1.0 + nLeft, -0.25, 0.0 )
      glVertex3f( -0.5 + nLeft, -0.25, 0.0 )
      glVertex3f( -0.75 + nLeft, 0.25, 0.0 )
   glEnd()
   
   glutSwapBuffers()
   glFlush()

return nil

METHOD ReShape( nWidth, nHeight ) CLASS GLWindow

return nil

METHOD Idle() CLASS GLWindow

return nil

METHOD Keyboard( nKey, nX, nY ) CLASS GLWindow

   if nKey == 100  // "d"
      nLeft += 0.02
      glutPostReDisplay()
   endif  
   
   if nKey == 115 // "s"
      nLeft -= 0.02
      glutPostReDisplay()
   endif  

   // Alert( Str( nKey ) )  

return nil

METHOD End() CLASS GLWindow

  GLReleaseSelf()
 
return nil  

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <GL/glut.h>

static PHB_ITEM pSelf;

HB_FUNC( GLSETSELF )
{
   pSelf = hb_gcGripGet( hb_param( 1, HB_IT_OBJECT ) );
}  

HB_FUNC( GLRELEASESELF )
{
   hb_gcGripDrop( pSelf );
}  

HB_FUNC( GLBEGIN )
{
   glBegin( hb_parnl( 1 ) );
}

HB_FUNC( GLEND )
{
   glEnd();
}      

HB_FUNC( GLVERTEX3F )
{
   glVertex3f( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ) );
}
   
HB_FUNC( GLCOLOR3F )
{
   glColor3f( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ) );
}  

HB_FUNC( GLRECTF )
{
   glRectf( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}  

HB_FUNC( GLUTSOLIDTEAPOT )
{
   glutSolidTeapot( hb_parnd( 1 ) );
}  

HB_FUNC( GLUTINIT )
{
   int argc = hb_cmdargARGC();
   
   glutInit( &argc, hb_cmdargARGV() );
   hb_ret();
}

HB_FUNC( GLUTINITDISPLAYMODE )
{
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWSIZE )
{
   glutInitWindowSize( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWPOSITION )
{
   glutInitWindowPosition( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

static void display( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "DISPLAY" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

static void keyboard( unsigned char key, int x, int y )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "KEYBOARD" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( key );
   hb_vmPushLong( x );
   hb_vmPushLong( y );
   hb_vmFunction( 3 );
}

HB_FUNC( GLUTCREATEWINDOW )
{
    glutCreateWindow( hb_parc( 1 ) );
    glutDisplayFunc( display );
    glutKeyboardFunc( keyboard );
    hb_ret();
}

HB_FUNC( GLUTMAINLOOP )
{
   glutMainLoop();
   hb_ret();
}

static void reshape( int width, int height )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "RESHAPE" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( width );
   hb_vmPushLong( height );
   hb_vmFunction( 2 );
}

static void idle( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "IDLE" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLCLEARCOLOR )
{
   glClearColor( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}

HB_FUNC( GLCLEAR )
{
   glClear( hb_parnl( 1 ) );    
}

HB_FUNC( GLUTSWAPBUFFERS )
{
   glutSwapBuffers();
}

HB_FUNC( GLFLUSH )
{
   glFlush();
}

HB_FUNC( GLUTPOSTREDISPLAY )
{
   glutPostRedisplay();
}
   
#pragma ENDDUMP
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 86 guests