2009/8/11 Nikos Chantziaras <rea...@arcor.de>:
> On 08/11/2009 07:08 PM, Alex Bennee wrote:
>>
>> Hi,
>>
>> I'm having trouble running 32bit Wine when it involves OpenGL stuff.
>> It seems to run but I suspect the OpenGL calls that are made never get
>> anywhere and cause the emulated program to die. There doesn't seem to
>> be an emul package for building a 32bit Mesa. Is it possible to use
>> the system ebuild and just build it in 32bit mode or is it more
>> complicated than that?
>
> 32bit Mesa is provided by app-emulation/emul-linux-x86-xlibs.  Wine depends
> on various emul-linux packages, so I'm sure you have them installed.  Wine
> works here fine (I'm on AMD64 too.)

You're right. However there does seem to be a difference. In an
attempt to track down the failure in Wine I'm trying a simple test
case (attached). As a 64 bit application in throws up some compile
time complaints but runs, as a 32 bit application is won't link as it
fails to find glCheckFramebufferStatus. This is the API call that
seems to be causing the problem in the thing I'm trying to run under
Wine [1].

[1] http://bugs.winehq.org/show_bug.cgi?id=16516

-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk
/*
 * triangle.c -- A simple example of OpenGL and GLUT.
 */

#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glut.h>

#include <stdio.h>

void displayCB(void)		/* function called whenever redisplay needed */
{
  fprintf(stderr,"in displayCB\n");
  glClear(GL_COLOR_BUFFER_BIT);		/* clear the display */
  glColor3f(1.0, 1.0, 1.0);		/* set current color to white */
  glBegin(GL_POLYGON);			/* draw filled triangle */
  glVertex2i(200,125);			/* specify each vertex of triangle */
  glVertex2i(100,375);
  glVertex2i(300,375);
  glEnd();				/* OpenGL draws the filled triangle */
  glFlush();				/* Complete any pending operations */
}

void keyCB(unsigned char key, int x, int y)	/* called on key press */
{
  if( key == 'q' ) exit(0);
}


int main(int argc, char *argv[])
{
  int win;
  GLenum            status;

  glutInit(&argc, argv);		/* initialize GLUT system */

  glutInitDisplayMode(GLUT_RGB);
  glutInitWindowSize(400,500);		/* width=400pixels height=500pixels */
  win = glutCreateWindow("Triangle");	/* create window */

  fprintf(stderr,"win=%d\n", win);
  /* from this point on the current window is win */

  glClearColor(0.0,0.0,0.0,0.0);	/* set background to black */
  gluOrtho2D(0,400,0,500);		/* how object is mapped to window */
  glutDisplayFunc(displayCB);		/* set window's display callback */
  glutKeyboardFunc(keyCB);		/* set window's key callback */

  status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
  fprintf(stderr,"status = %d/0x%x\n", status, status);
 
  
  glutMainLoop();			/* start processing events... */

  /* execution never reaches this point */

  return 0;
}

Attachment: Makefile
Description: Binary data

Reply via email to