glshim


blender 2.65a needs glRasterPos2f

same for blender 2.49b

blenderplayer needs glColorMaterial

So, no luck :(
Bah. 3D modelling on-the-go would be wonderful...

As would the resulting torrent of 3D games for pandoras
 
Last edited by a moderator:
This library is not specific to the Pandora, except for the toolchain I use to compile it. I even have a version that compiles on my mac against kronos' GLES to GL libraries :)
 
I am not sure if I understand correctly, but for my games I do not use SDL, I use x11/OpenGL ES, if this is what you are looking to do, this is the code I use:

 


int PandoraGraphics::InitialiseX11( int w, int h, bool fullscreen, bool vsync, bool fsaa, bool hideCursor )
{
Window sRootWindow;
XSetWindowAttributes sWA;
unsigned int ui32Mask;
int i32Depth;
int x11Screen;
XVisualInfo * x11Visual;
Colormap x11Colormap;
EGLConfig eglConfig;

m_Display = XOpenDisplay( ":0" );
if (!m_Display)
{
Pi.Error( EVeryHigh, "Unable to open X display" );
return false;
}
x11Screen = XDefaultScreen( m_Display );

sRootWindow = RootWindow(m_Display, x11Screen);
i32Depth = DefaultDepth(m_Display, x11Screen);
x11Visual = (XVisualInfo *)Pi.Memory.Allocate(
PI_DEBUG,
sizeof(XVisualInfo)
);
XMatchVisualInfo( m_Display, x11Screen, i32Depth, TrueColor, x11Visual);
if (!x11Visual)
{
Pi.Error( EVeryHigh, "Unable to acquire visual" );
return false;
}

// Colormap of the specified visual type for the display.
x11Colormap = XCreateColormap( m_Display, sRootWindow, x11Visual->visual, AllocNone );
sWA.colormap = x11Colormap;

// List of events to be handled by the application. Add to these for handling other events.
sWA.event_mask = StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | Button1MotionMask | KeyPressMask | KeyReleaseMask;

// Display capabilities list.
ui32Mask = CWBackPixel | CWBorderPixel | CWEventMask | CWColormap;

// Creates the X11 window
m_Window = XCreateWindow( m_Display, RootWindow(m_Display, x11Screen), 0, 0, w, h,
0, CopyFromParent, InputOutput, CopyFromParent, ui32Mask, &sWA);

// Make the window viewable and flush the output buffer.
XMapWindow(m_Display, m_Window);
XFlush(m_Display);

// Hide cursor if required.
if ( hideCursor )
{
// Hide pointer by creating an empty cursor
XColor black = XColor( );
char buff[ 64 ] = { 0 };
Pixmap bmp = XCreateBitmapFromData( m_Display, m_Window, buff, 8, 8 );
Cursor cursor = XCreatePixmapCursor( m_Display, bmp, bmp, &black, &black, 0, 0 );
XDefineCursor( m_Display, m_Window, cursor );
XFreeCursor( m_Display, cursor );
XFreePixmap( m_Display, bmp );

// XUndefineCursor( m_Display, m_Window );
// XMapRaised( m_Display, m_Window );
// XFlush( m_Display );
}

// Generate full screen event if required.
if ( fullscreen )
{
XEvent x11_event;
Atom x11_state_atom;
Atom x11_fs_atom;

x11_state_atom = XInternAtom( m_Display, "_NET_WM_STATE", False );
x11_fs_atom = XInternAtom( m_Display, "_NET_WM_STATE_FULLSCREEN", False );

x11_event.xclient.type = ClientMessage;
x11_event.xclient.serial = 0;
x11_event.xclient.send_event = True;
x11_event.xclient.window = m_Window;
x11_event.xclient.message_type = x11_state_atom;
x11_event.xclient.format = 32;
x11_event.xclient.data.l[ 0 ] = 1;
x11_event.xclient.data.l[ 1 ] = x11_fs_atom;
x11_event.xclient.data.l[ 2 ] = 0;

XSendEvent( m_Display, sRootWindow, False, SubstructureRedirectMask | SubstructureNotifyMask, &x11_event );
}

m_EglDisplay = eglGetDisplay( ( NativeDisplayType ) m_Display );

EGLint iMajorVersion, iMinorVersion;
if ( ! eglInitialize( m_EglDisplay, &iMajorVersion, &iMinorVersion ) )
{
Pi.Error( EVeryHigh, "eglInitialize() failed" );
return false;
}

EGLint pi32ConfigAttribs[5];
int attrib = 0;
pi32ConfigAttribs[attrib++] = EGL_SURFACE_TYPE;
pi32ConfigAttribs[attrib++] = EGL_WINDOW_BIT;
pi32ConfigAttribs[attrib++] = EGL_NONE;
if ( fsaa )
{
pi32ConfigAttribs[attrib++] = EGL_SAMPLE_BUFFERS, 1;
pi32ConfigAttribs[attrib++] = EGL_SAMPLES, 4;
}
pi32ConfigAttribs[attrib++] = EGL_NONE;


int iConfigs;
if (!eglChooseConfig(m_EglDisplay, pi32ConfigAttribs, &eglConfig, 1, &iConfigs) || (iConfigs != 1))
{
Pi.Error( EVeryHigh, "eglChooseConfig() failed" );
return false;
}

m_EglSurface = eglCreateWindowSurface(m_EglDisplay, eglConfig, (NativeWindowType)m_Window, NULL);
if ( ! CheckIfEglSurfaceValid( true ) )
{
Pi.Error( EVeryHigh, "eglCreateWindowSurface() failed" );
return false;
}

m_EglContext = eglCreateContext(m_EglDisplay, eglConfig, NULL, NULL);
if ( ! CheckIfEglContextValid( true ) )
{
Pi.Error( EVeryHigh, "eglCreateContext( ) failed" );
return false;
}

eglMakeCurrent(m_EglDisplay, m_EglSurface, m_EglSurface, m_EglContext);
// TODO: error check.

if ( vsync )
{
// eglSwapInterval( m_EglDisplay, 1 );
}

// Find out what size window we actually got.
XWindowAttributes xWindowAttributes;
XGetWindowAttributes( m_Display, m_Window, &xWindowAttributes );
m_Width = xWindowAttributes.width;
m_Height = xWindowAttributes.height;


return true;
}

Sorry if I am not understanding correctly.

Steve
 
That project looks a lot like mesa. Looks like I've implemented pretty much everything they have already, except without the mesa dependency.


I did some research and someone said this about it:

Compilation has been very challenging and unfortunately I haven't been able to make a working version. Somehow the libraries that are produced are broken as many calls are not available.
My build system is incredibly simple. A clean build takes about two seconds, and I haven't found a toolchain that can't compile it yet.
 
Last edited by a moderator:
Had got Glesport to Compile and installed it,its was not so difficult as he wrote.

But i didnt rekognize any change on my System.

Buildet it with Slackware to hope on a Performance improve for Foobillard.

With this worked Foobillard exact @ the same speed from Mesa Emulation.

Maybe i had to compile foobillard new then,but i did not tried that,because i had not much Time.

Some Files are Writeprotectet in the Source from GLESPORT.

Change all downloaded Files from Glesport to Read/Write Access then should it Compile fine.

When the Make fails,can you use the Command " Make realclean " to beginning it with other Parameters.

I am building now a new Pandora OS DEV Card for all.

When it finished,release i the DEV SD CARD as USBIT Image ;)
 
Last edited by a moderator:
Maybe this glesport is just a lib that replaces missing functions in gles with the mesastuff where necessary?
 
This is really good news.  Thanks so much for sharing your work.

I'd love to help with coding for this, if / when you make it open source.  Don't care if it's non-free for now, just want to see the source!

I did some very basic GL / GLES portability coding for my own game, nothing like on this scale though.

sgi.logo.jpg
 
Last edited by a moderator:
I just uploaded a new version:

  • Implemented partial versions of glPush/Pop(Client)Attrib.
  • Enabled glLineStipple.
  • Wrapped list renders in push/popAttrib, so they should be less messy now.
 
Hum, nope, still upside down and hang at the exit. I tried with the preload.so this time.

*EDIT*, I can see with a ssh connexion that it's Jumpman itself that hang at the exit... Must be waiting for something :(
 
Last edited by a moderator:
The quads or texture coordinates are possibly reversed. This is a case where a game is "most of the way" without any work, and it's almost zero effort to finish off.
 
Last edited by a moderator:
Hum, ok, I'll first find out why it hangs at the end, then I'll look at why it's reversed and how to make it the right side...
 
Last edited by a moderator:
My Dev SD Installation is broken(not your fault) :(

Now must i beginning again.

Had installed the wrong Software.

Have anyone of you a Dev SD Image for me?

I want to try this Project too ^_^
 
Back
Top