VirtualBox

Changeset 18088 in vbox for trunk/src


Ignore:
Timestamp:
Mar 19, 2009 11:47:52 AM (16 years ago)
Author:
vboxsync
Message:

crOpenGL: some code cleanup and small fixes

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk

    r18034 r18088  
    7272        $(VBOX_PATH_MESA_SOURCE)/src/mesa/drivers/dri/common \
    7373        $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.5
     74VBoxOGL_DEFS.linux     += VBOX_NO_NATIVEGL
    7475ifdef VBoxOGL_DRI
    7576 VBoxOGL_DEFS          += VBOXOGL_DRI IN_DRI_DRIVER
     
    173174        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    174175else ifeq ($(KBUILD_TARGET),linux)
     176$(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     177        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    175178if !defined(VBoxOGL_DRI) && !defined(VBoxOGL_FAKEDRI)
    176 $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    177         $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    178179$(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm: \
    179180                $(PATH_SUB_CURRENT)/Linux_i386_exports.py \
     
    182183        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    183184else ifdef VBoxOGL_DRI
    184 $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress_dri.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    185         $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    186185$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    187186        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     
    196195        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    197196else ifdef VBoxOGL_FAKEDRI
    198 $(VBOX_PATH_CROGL_GENFILES)/getprocaddress.c: $(PATH_SUB_CURRENT)/getprocaddress_dri.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    199         $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    200197$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    201198        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
  • trunk/src/VBox/Additions/common/crOpenGL/getprocaddress.py

    r17719 r18088  
    1818#include "cr_version.h"
    1919#include "stub.h"
    20 
     20#include "dri_glx.h"
     21#if defined(VBOXOGL_DRI) || defined(VBOXOGL_FAKEDRI)
     22#include "cr_gl.h"
     23#endif
    2124
    2225struct name_address {
     
    4043        wrap = apiutil.GetCategoryWrapper(func_name)
    4144        name = "gl" + func_name
    42         address = "gl" + func_name
     45        address = "VBOXGLTAG(gl" + func_name + ")"
    4346        if wrap:
    4447                print '#ifdef CR_%s' % wrap
     
    6265};
    6366
    64 DECLEXPORT(void) glXBindTexImageEXT(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list);
    65 DECLEXPORT(void) glXReleaseTexImageEXT(Display *dpy, GLXDrawable draw, int buffer);
    66 DECLEXPORT(void) glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
    67 DECLEXPORT(GLXFBConfig *) glXGetFBConfigs(Display *dpy, int screen, int *nelements);
    68 DECLEXPORT(int) glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value);
    69 DECLEXPORT(GLXPixmap) glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
    70 
    71 
    7267CR_PROC CR_APIENTRY crGetProcAddress( const char *name )
    7368{
     
    8176        }
    8277
    83     if (!crStrcmp( name, "glXBindTexImageEXT" )) return (CR_PROC) glXBindTexImageEXT;
    84     if (!crStrcmp( name, "glXReleaseTexImageEXT" )) return (CR_PROC) glXReleaseTexImageEXT;
    85     if (!crStrcmp( name, "glXQueryDrawable" )) return (CR_PROC) glXQueryDrawable;
    86     if (!crStrcmp( name, "glXGetFBConfigs" )) return (CR_PROC) glXGetFBConfigs;
    87     if (!crStrcmp( name, "glXGetFBConfigAttrib" )) return (CR_PROC) glXGetFBConfigAttrib;
    88     if (!crStrcmp( name, "glXCreatePixmap" )) return (CR_PROC) glXCreatePixmap;
     78    /*@todo, reuse fakedri_glxfuncsList.h and dri_glx.h here*/
     79    /*also, in case of fake dri, those should point to vbox_glX* not to vbox_stub* ones, VBOXGLXENTRYTAG */
     80    if (!crStrcmp( name, "glXBindTexImageEXT" )) return (CR_PROC) VBOXGLXTAG(glXBindTexImageEXT);
     81    if (!crStrcmp( name, "glXReleaseTexImageEXT" )) return (CR_PROC) VBOXGLXTAG(glXReleaseTexImageEXT);
     82    if (!crStrcmp( name, "glXQueryDrawable" )) return (CR_PROC) VBOXGLXTAG(glXQueryDrawable);
     83    if (!crStrcmp( name, "glXGetFBConfigs" )) return (CR_PROC) VBOXGLXTAG(glXGetFBConfigs);
     84    if (!crStrcmp( name, "glXGetFBConfigAttrib" )) return (CR_PROC) VBOXGLXTAG(glXGetFBConfigAttrib);
     85    if (!crStrcmp( name, "glXCreatePixmap" )) return (CR_PROC) VBOXGLXTAG(glXCreatePixmap);
     86    if (!crStrcmp( name, "glXCreateWindow" )) return (CR_PROC) VBOXGLXTAG(glXCreateWindow);
     87    if (!crStrcmp( name, "glXGetVisualFromFBConfig" )) return (CR_PROC) VBOXGLXTAG(glXGetVisualFromFBConfig);
     88    if (!crStrcmp( name, "glXDestroyWindow" )) return (CR_PROC) VBOXGLXTAG(glXDestroyWindow);
     89    if (!crStrcmp( name, "glXDestroyPixmap" )) return (CR_PROC) VBOXGLXTAG(glXDestroyPixmap);
    8990
    9091    if (name) crDebug("Returning NULL for %s", name);
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r17922 r18088  
    581581    glim.GetChromiumParametervCR = stub_GetChromiumParametervCR;
    582582
    583 #ifndef Linux
     583#if !defined(VBOX_NO_NATIVEGL)
    584584    /* Load pointers to native OpenGL functions into stub.nativeDispatch */
    585585    stubInitNativeDispatch();
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py

    r15532 r18088  
    438438        "glXQueryContext",
    439439        "glXQueryDrawable",
    440         "glXMakeContextCurrent"
     440        "glXMakeContextCurrent",
     441    "glXCreateWindow",
     442    "glXGetVisualFromFBConfig",
    441443]
    442444
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette