86 RI_DELETE(m_threads[i]); |
86 RI_DELETE(m_threads[i]); |
87 } |
87 } |
88 //currentThreads contain just pointers to threads we just deleted |
88 //currentThreads contain just pointers to threads we just deleted |
89 } |
89 } |
90 |
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // 2nd phase constructor |
|
93 // ported from guestEGL |
|
94 //----------------------------------------------------------------------------- |
|
95 // |
|
96 void EGL::Create() |
|
97 { |
|
98 EGL_TRACE(" EGL::Create "); |
|
99 //OpenSgResources(); |
|
100 TInt err; |
|
101 err = iDisplayMapLock.CreateLocal(); |
|
102 EGLPANIC_ASSERT(err == KErrNone, EEglPanicDisplayMapLockCreateLocalFailed); |
|
103 |
|
104 //err = iEglImageLock.CreateLocal(); |
|
105 //EGLPANIC_ASSERT(err == KErrNone, EEglPanicEglImageLockCreateLocalFailed); |
|
106 |
|
107 InitialiseExtensions(); |
|
108 |
|
109 //const char* initExtensionList = EglInternalFunction_QueryExtensionList(); |
|
110 //EGL_TRACE(" CGuestEGL::Create initExtensionList=0x%x (\"%s\") <--", |
|
111 // initExtensionList, initExtensionList ? initExtensionList : ""); |
|
112 } |
|
113 |
91 /*-------------------------------------------------------------------*//*! |
114 /*-------------------------------------------------------------------*//*! |
92 * \brief |
115 * \brief |
93 * \param |
116 * \param |
94 * \return |
117 * \return |
95 * \note |
118 * \note |
2603 * \brief |
2647 * \brief |
2604 * \param |
2648 * \param |
2605 * \return |
2649 * \return |
2606 * \note |
2650 * \note |
2607 *//*-------------------------------------------------------------------*/ |
2651 *//*-------------------------------------------------------------------*/ |
2608 |
2652 /** |
|
2653 Obtain extension function pointer. |
|
2654 |
|
2655 Provide support for the Symbian Graphics SHAI for EGL Extensions |
|
2656 @param aName Name of extension |
|
2657 @return Function pointer, or NULL if not available. |
|
2658 |
|
2659 @note Known extensions and their directly associated functions: |
|
2660 1. EGL_KHR_image |
|
2661 None |
|
2662 2. EGL_KHR_image_base |
|
2663 eglCreateImageKHR, |
|
2664 eglDestroyImageKHR |
|
2665 3. EGL_KHR_image_pixmap |
|
2666 None |
|
2667 4. EGL_KHR_vg_parent_image |
|
2668 None |
|
2669 5. EGL_KHR_gl_texture_2D_image |
|
2670 None |
|
2671 6. EGL_KHR_gl_texture_cubemap_image |
|
2672 EGLImageTargetTexture2DOES, |
|
2673 EGLImageTargetRenderbufferStorageOES |
|
2674 7. EGL_KHR_lock_surface2 |
|
2675 eglLockSurfaceKHR, |
|
2676 eglUnlockSurfaceKHR |
|
2677 8. EGL_NOK_resource_profiling2 |
|
2678 eglQueryProfilingDataNOK |
|
2679 9. EGL_SYMBIAN_composition |
|
2680 None |
|
2681 10. EGL_NOK_image_endpoint |
|
2682 eglCreateEndpointNOK, |
|
2683 eglDestroyEndpointNOK, |
|
2684 eglGetEndpointAttribNOK, |
|
2685 eglSetEndpointAttribNOK, |
|
2686 eglEndpointBeginStreamingNOK, |
|
2687 eglEndpointEndStreamingNOK, |
|
2688 eglAcquireImageNOK, |
|
2689 eglReleaseImageNOK, |
|
2690 eglGetEndpointDirtyAreaNOK, |
|
2691 eglEndpointRequestNotificationNOK, |
|
2692 eglEndpointCancelNotificationNOK, |
|
2693 eglCreateEndpointNOK |
|
2694 11. NOK_pixmap_type_rsgimage |
|
2695 None |
|
2696 12. EGL_NOK_swap_region |
|
2697 eglSwapBuffersRegionNOK |
|
2698 |
|
2699 @see Khronos EGL 1.4 Specification, eglGetProcAddress() |
|
2700 @author Faisal Memon Community EGL project |
|
2701 ported to Merge EGL |
|
2702 */ |
2609 typedef void RI_Proc(); |
2703 typedef void RI_Proc(); |
2610 |
2704 |
2611 //EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void); |
2705 //EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void); |
2612 |
2706 |
2613 #ifdef BUILD_WITH_PRIVATE_EGL |
2707 #ifdef BUILD_WITH_PRIVATE_EGL |
2614 RI_APIENTRY void (*do_eglGetProcAddress(const char *procname))(...) |
2708 RI_APIENTRY void (*do_eglGetProcAddress(const char *aName))(...) |
2615 #else |
2709 #else |
2616 void (*eglGetProcAddress(const char *procname))(...) |
2710 void (*eglGetProcAddress(const char *aName))(...) |
2617 #endif |
2711 #endif |
2618 { |
2712 { |
|
2713 /* |
2619 if(!procname) |
2714 if(!procname) |
2620 return NULL; |
2715 return NULL; |
2621 return NULL; |
2716 return NULL; |
|
2717 */ |
|
2718 |
|
2719 /*ProcPointer CGuestEGL::eglGetProcAddress(const char* aName)*/ |
|
2720 if (strncmp("eglCreateImageKHR", aName, strlen("eglCreateImageKHR")) == 0) |
|
2721 { |
|
2722 return NULL; |
|
2723 } |
|
2724 else if (strncmp("eglDestroyImageKHR", aName, strlen("eglDestroyImageKHR")) == 0) |
|
2725 { |
|
2726 return NULL; |
|
2727 } |
|
2728 else if (strncmp("EGLImageTargetTexture2DOES", aName, strlen("EGLImageTargetTexture2DOES")) == 0) |
|
2729 { |
|
2730 return NULL; |
|
2731 } |
|
2732 else if (strncmp("EGLImageTargetRenderbufferStorageOES", aName, strlen("EGLImageTargetRenderbufferStorageOES")) == 0) |
|
2733 { |
|
2734 return NULL; |
|
2735 } |
|
2736 else if (strncmp("eglLockSurfaceKHR", aName, strlen("eglLockSurfaceKHR")) == 0) |
|
2737 { |
|
2738 return NULL; |
|
2739 } |
|
2740 else if (strncmp("eglUnlockSurfaceKHR", aName, strlen("eglUnlockSurfaceKHR")) == 0) |
|
2741 { |
|
2742 return NULL; |
|
2743 } |
|
2744 else if (strncmp("EGL_KHR_lock_surface", aName, strlen("EGL_KHR_lock_surface")) == 0) |
|
2745 { |
|
2746 return NULL; |
|
2747 } |
|
2748 else if (strncmp("eglQueryProfilingDataNOK", aName, strlen("eglQueryProfilingDataNOK")) == 0) |
|
2749 { |
|
2750 return NULL; |
|
2751 } |
|
2752 else if (strncmp("eglCreateEndpointNOK", aName, strlen("eglCreateEndpointNOK")) == 0) |
|
2753 { |
|
2754 return NULL; |
|
2755 } |
|
2756 else if (strncmp("eglDestroyEndpointNOK", aName, strlen("eglDestroyEndpointNOK")) == 0) |
|
2757 { |
|
2758 return NULL; |
|
2759 } |
|
2760 else if (strncmp("eglGetEndpointAttribNOK", aName, strlen("eglGetEndpointAttribNOK")) == 0) |
|
2761 { |
|
2762 return NULL; |
|
2763 } |
|
2764 else if (strncmp("eglEndpointBeginStreamingNOK", aName, strlen("eglEndpointBeginStreamingNOK")) == 0) |
|
2765 { |
|
2766 return NULL; |
|
2767 } |
|
2768 else if (strncmp("eglEndpointEndStreamingNOK", aName, strlen("eglEndpointEndStreamingNOK")) == 0) |
|
2769 { |
|
2770 return NULL; |
|
2771 } |
|
2772 else if (strncmp("eglAcquireImageNOK", aName, strlen("eglAcquireImageNOK")) == 0) |
|
2773 { |
|
2774 return NULL; |
|
2775 } |
|
2776 else if (strncmp("eglReleaseImageNOK", aName, strlen("eglReleaseImageNOK")) == 0) |
|
2777 { |
|
2778 return NULL; |
|
2779 } |
|
2780 else if (strncmp("eglGetEndpointDirtyAreaNOK", aName, strlen("eglGetEndpointDirtyAreaNOK")) == 0) |
|
2781 { |
|
2782 return NULL; |
|
2783 } |
|
2784 else if (strncmp("eglEndpointRequestNotificationNOK", aName, strlen("eglEndpointRequestNotificationNOK")) == 0) |
|
2785 { |
|
2786 return NULL; |
|
2787 } |
|
2788 else if (strncmp("eglEndpointCancelNotificationNOK", aName, strlen("eglEndpointCancelNotificationNOK")) == 0) |
|
2789 { |
|
2790 return NULL; |
|
2791 } |
|
2792 else if (strncmp("eglCreateEndpointNOK", aName, strlen("eglCreateEndpointNOK")) == 0) |
|
2793 { |
|
2794 return NULL; |
|
2795 } |
|
2796 else if (strncmp("eglSwapBuffersRegionNOK", aName, strlen("eglSwapBuffersRegionNOK")) == 0) |
|
2797 { |
|
2798 return NULL; |
|
2799 } |
|
2800 else if (strncmp("egl_Private_SignalSyncNOK", aName, strlen("egl_Private_SignalSyncNOK")) == 0) |
|
2801 { |
|
2802 return (ProcPointer)CEglSyncExtension::egl_Private_SignalSyncNOK; |
|
2803 } |
|
2804 else if (strncmp("eglCreateSyncKHR", aName, strlen("eglCreateSyncKHR")) == 0) |
|
2805 { |
|
2806 return (ProcPointer)CEglSyncExtension::eglCreateSyncKHR; |
|
2807 } |
|
2808 else if (strncmp("eglDestroySyncKHR", aName, strlen("eglDestroySyncKHR")) == 0) |
|
2809 { |
|
2810 return (ProcPointer)CEglSyncExtension::eglDestroySyncKHR; |
|
2811 } |
|
2812 else if (strncmp("eglClientWaitSyncKHR", aName, strlen("eglClientWaitSyncKHR")) == 0) |
|
2813 { |
|
2814 return (ProcPointer)CEglSyncExtension::eglClientWaitSyncKHR; |
|
2815 } |
|
2816 else if (strncmp("eglSignalSyncKHR", aName, strlen("eglSignalSyncKHR")) == 0) |
|
2817 { |
|
2818 return (ProcPointer)CEglSyncExtension::eglSignalSyncKHR; |
|
2819 } |
|
2820 else if (strncmp("eglGetSyncAttribKHR", aName, strlen("eglGetSyncAttribKHR")) == 0) |
|
2821 { |
|
2822 return (ProcPointer)CEglSyncExtension::eglGetSyncAttribKHR; |
|
2823 } |
|
2824 else |
|
2825 { |
|
2826 return NULL; |
|
2827 } |
|
2828 |
2622 } |
2829 } |
2623 |
2830 |
2624 |
2831 |
2625 |
2832 |
2626 /*-------------------------------------------------------------------*//*! |
2833 /*-------------------------------------------------------------------*//*! |