|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Rendering queue interface |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __M3G_RENDERQUEUE_H__ |
|
19 #define __M3G_RENDERQUEUE_H__ |
|
20 |
|
21 /*! |
|
22 * \internal |
|
23 * \file |
|
24 * \brief Rendering queue interface |
|
25 */ |
|
26 |
|
27 #include "m3g_appearance.h" |
|
28 #include "m3g_lightmanager.h" |
|
29 #include "m3g_node.h" |
|
30 |
|
31 typedef struct RenderBucketImpl RenderBucket; |
|
32 typedef struct RenderItemImpl RenderItem; |
|
33 |
|
34 /*! |
|
35 * \internal |
|
36 * \brief RenderQueue object |
|
37 */ |
|
38 struct RenderQueueImpl { |
|
39 const Node *root; |
|
40 |
|
41 M3Gint scope; |
|
42 |
|
43 const Camera *camera; |
|
44 LightManager *lightManager; |
|
45 |
|
46 RenderBucket *buckets[1 << M3G_RENDERQUEUE_BUCKET_BITS]; |
|
47 RenderItem *freeItems; |
|
48 |
|
49 M3Gint minBucket, maxBucket; |
|
50 }; |
|
51 |
|
52 /*---------------------------------------------------------------------- |
|
53 * Internal functions |
|
54 *--------------------------------------------------------------------*/ |
|
55 |
|
56 static RenderQueue *m3gCreateRenderQueue(Interface *m3g); |
|
57 static void m3gDestroyRenderQueue(Interface *m3g, RenderQueue *rq); |
|
58 static M3Gbool m3gInsertDrawable(Interface *m3g, |
|
59 RenderQueue *rq, |
|
60 Node *node, |
|
61 const Matrix *toCamera, |
|
62 M3Gint subMeshIndex, |
|
63 M3Guint sortKey); |
|
64 static void m3gClearRenderQueue(RenderQueue *rq); |
|
65 static void m3gCommit(RenderQueue *rq, RenderContext *ctx); |
|
66 |
|
67 #endif /*__M3G_RENDERQUEUE_H__*/ |