1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_GlImplement.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 23933 $ 14 *---------------------------------------------------------------------------*/ 15 /*------------------------------------------------------------------------------*/ 16 /* */ 17 /* Copyright (c) 2009, Digital Media Professionals Inc. All rights reserved. */ 18 /* */ 19 /*------------------------------------------------------------------------------*/ 20 #ifndef NW_GFX_GL_IMPLEMENT_H_ 21 #define NW_GFX_GL_IMPLEMENT_H_ 22 23 #include <nw/types.h> 24 25 #include <gles2/gl2.h> 26 #include <gles2/gl2ext.h> 27 #include <nn/gx.h> 28 #include <string.h> 29 #include <nn/gx/CTR/gx_CommandAccess.h> 30 31 //=============================================================== 32 // 33 // WARNING: このヘッダーに含まれるAPIや構造体を直接参照しないでください。 34 // 35 //=============================================================== 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 #define MAX_PER_PIXEL_LIGHTS 8 42 43 typedef void* (*dmpgl_allocator_t)(GLenum, GLenum, GLuint, GLsizei); 44 typedef void (*dmpgl_deallocator_t)(GLenum, GLenum ,GLuint, void*); 45 46 extern dmpgl_allocator_t __dmpgl_allocator; 47 extern dmpgl_deallocator_t __dmpgl_deallocator; 48 49 extern unsigned* __cb_current_command_buffer; 50 extern unsigned* __cb_current_max_command_buffer; 51 52 #ifdef __cplusplus 53 } 54 #endif 55 56 namespace nw { 57 namespace gfx { 58 namespace internal { 59 60 void nwgfxAddVramDmaCommand(void* srcaddr, void* dstaddr, GLsizei size); 61 void nwgfxClear( 62 u32 colorAddr, u32 colorSize, u32 clearColor, u32 colorWidth, 63 u32 depthAddr, u32 depthSize, u32 clearDepth, u32 depthWidth 64 ); 65 66 void 67 GetFrameBufferState( 68 GLuint fboID, 69 u32* pColorAddr, 70 u32* pDepthAddr 71 ); 72 73 } // namespace internal 74 } // namespace gfx 75 } // namespace nw 76 77 78 79 80 #endif // NW_GFX_GL_IMPLEMENT_H_ 81