• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            socketref,再見!高德

            https://github.com/adoggie

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              246 Posts :: 4 Stories :: 312 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(54)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            #


            2008-05-13
            開始看opengl,利用 opengl es 在 wince5.0環境做些應用測試
            opengl沒有啥經驗,之前只對 2D的一些圖形算法有些研究,所以慢慢來吧
            nehe的opengl 基礎教程還可以,說學就開始學




            posted @ 2008-05-13 01:01 放屁阿狗 閱讀(2478) | 評論 (1)編輯 收藏


            2008-05-13 已經完成移植的模塊:

            CEGUIBase
            CEGUIExpatParser
            CEGUIFalagardWRBase
            CEGUILua
            tolua++

            移植OpenGLGUIRenderer
            render 選擇opengl es,可是在編譯時發現opengl es這個版本未能實現opengl規范的所有函數,導致以下編譯錯誤提示:
            error C2065: 'GL_T2F_C4UB_V3F' : undeclared identifier
            error C3861: 'glInterleavedArrays': identifier not found
            error C2065: 'GL_CLIENT_ALL_ATTRIB_BITS' : undeclared identifier
            error C3861: 'glPushClientAttrib': identifier not found
            error C2065: 'GL_ALL_ATTRIB_BITS' : undeclared identifier
            error C3861: 'glPushAttrib': identifier not found
            error C2065: 'GL_FILL' : undeclared identifier
            error C3861: 'glPolygonMode': identifier not found
            error C3861: 'gluOrtho2D': identifier not found
            error C2065: 'GL_TEXTURE_GEN_S' : undeclared identifier
            error C2065: 'GL_TEXTURE_GEN_T' : undeclared identifier
            error C2065: 'GL_TEXTURE_GEN_R' : undeclared identifier
            error C3861: 'glTexEnvi': identifier not found
            error C3861: 'glPopAttrib': identifier not found
            error C3861: 'glPopClientAttrib': identifier not found
            error C3861: 'glInterleavedArrays': identifier not found
            對于opengl得api沒能好好研究1,2,所以所列函數無法通過修改代碼使編譯通過
            請 cegui、opengl 的高手指點一二

            DevIL(1.6.17)移植:
            ILUT模塊的編譯問題
            1>ilut_states.obj : error LNK2019: unresolved external symbol iGLSetMaxH referenced in function ilutSetInteger
            1>ilut_states.obj : error LNK2019: unresolved external symbol iGLSetMaxW referenced in function ilutSetInteger
            1>ilut_win32.obj : error LNK2019: unresolved external symbol SetDIBits referenced in function ilutConvertSliceToHBitmap

            前兩個在ilut_opengl.c,ilut_directx9.c中有所定義
            devil沒好好琢磨,所以是否必須編譯時要加入 opengl或者directx的支持呢?

            posted @ 2008-05-13 00:55 放屁阿狗 閱讀(2459) | 評論 (6)編輯 收藏

            一種編寫lua擴展的c++工具
            posted @ 2008-05-11 02:24 放屁阿狗 閱讀(998) | 評論 (1)編輯 收藏

            去sf.net下個了最新版本CEGUI-0.6.0.tar.gz
            解開了開始了解cegui
            freetype,pcre是兩個必須具備的庫
            考慮到我個人應用的需求,就是需要一種script的擴展能力,以便可以靈活的改寫我的ui,我選擇了Lua,所以先搞定 ScriptingModules\CEGUILua
            編譯CEUIGLua需要tolua++,而后者又需要scons

            scons: 號稱下一代的自動化項目build 工具(http://www.scons.org/),類同 cmake,bake,ant,make/autoconf之類的東東 ,引用其介紹:

               "Doom3's Linux build system uses SCons.
            CC="ccache distcc g++-3.3" JOBS=8 rocks!"
            看來這個東西確實有點牛,等有時間用用看.


            posted @ 2008-05-11 02:20 放屁阿狗 閱讀(669) | 評論 (0)編輯 收藏

            了解了一些CEGUI 基礎的東西,覺得確實是個好東西,咋以前沒早用她呢
            cegui的widget一般都是texture繪制吧,也就是將 raster-image render到widget面。
            之前正好把librsvg移植到wince上,看看是否能將svg擴展為cegui::drawable 對象, backend就采用 opengl

            準備cegui到wince的移植工作

            posted @ 2008-05-10 03:55 放屁阿狗 閱讀(2536) | 評論 (0)編輯 收藏

            note: This page only applies to CEGUI >= 0.4.0

            The unified metrics system in CEGUI 0.4.0 and up, allows you to have both a relative and absolute component of a coordinate / dimension. This gives you alot more flexibility in how you layout your windows. For example you can use relative metrics for the height and absolute metrics for the width. Or simply mix and match.

            There are three different forms in unified metrics:

            • UDim - a single dimension.
            • UVector2 - a two dimensional UDim vector
            • URect - four UDims describing a rectangle by its left, top, right and bottom edges.

            The property system in CEGUI uses a special syntax for unified dimensions.

            Contents

            [hide]

            UDim

            The UDim is the simplest.

            {''scale'',''offset''}   fx:   {1,0}

            The scale component relative to the parent window, after it has been translated to pixels the offset is added. So if we used the example above as value for the UnifiedWidth property we would get a window exactly the width of its parent.

            Another example could be
            {0.5,25}
            which would make it half the width of its parent plus 25 pixels.

            The properties that take a single UDim like the ones used above are:

            • UnifiedXPosition
            • UnifiedYPosition
            • UnifiedWidth
            • UnifiedHeight

            UVector2

            The UVector2 is used for position and size if you want avoid specifying each single dimension seperately (x,y,w,h).

            {{''x-scale'',''x-offset''},{''y-scale'',''y-offset''}}   fx:   {{1,0},{1,0}}

            Besides the extra {..} around its two UDims it's very similar. Let's say we use the example above as value for the UnifiedSize property of a window, we would get a window that had exactly the same size as its parent.

            {{1,0},{0,100}}
            would yield a window width the same width as its parent but an absolute height of 100 pixels.

            The properties that take UVector2 values are:

            • UnifiedPosition
            • UnifiedSize
            • UnifiedMinSize
            • UnifiedMaxSize

            URect

            The last type is URect. It's a little special in that it specifies the left, top, right and bottom edges instead of position and size. As there is alot of parameters I'll write ls instead of left-scale, to instead of top-offset etc.

            {{ls,lo},{ts,to},{rs,ro},{bs,bo}}   fx:   {{0,0},{0,0},{1,0},{1,0}}

            The example above is the default rectangle for a DefaultWindow type window. It will cover the entire area of it's parent window. There is only one property that takes a URect. UnifiedAreaRect.

            The fact that we are specifying edges instead of size, can be useful. For example if we want a window to cover its entire parent, but leave a 10 pixel border a value like this could be used:
            {{0,10},{0,10},{1,-10},{1,-10}}

            The x and y position are simple absolute-only dims with a value of 10 pixels. The right and bottom edges are 100% relative components with a offset of -10 which will make it "move back" 10 pixels relative to the parent's right and bottom edges.

            XML examples

            <Property Name="UnifiedPosition" Value="{{0.1,10},{1.0,-30}}" />

            X-position: 10% of the width of the parent window + 10 pixel 父窗體1/10+ 10個像素

            Y-position: 30 pixel above the bottom of the parent window 父窗體高度差30個像數


            <Property Name="UnifiedSize" Value="{{0.6,5},{0.3,20}}" />

            Width: 60% of the width of the parent window + 5 pixel

            Height: 30% of the height of the parent window + 20 pixel


            <Property Name="UnifiedXPosition" Value="{0.25,-5}" />

            X-position: 25% of the width of the parent window minus 5 pixel


            <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.1,0},{0.9,0},{0.9,0}}" />

            X-position: 10% of the width of the parent window.

            Y-position: 10% of the height of the parent window.

            Width: 80% of the width of the parent window.

            Height: 80% of the height of the parent window.

            posted @ 2008-05-10 03:04 放屁阿狗 閱讀(318) | 評論 (0)編輯 收藏

            The purpose of this tutorial is to show you how to create a simple window and get it on screen. Before continuing here, it is very important that you have already read and fully understood the articles The Beginner Guide to Getting CEGUI Rendering and The Beginner Guide to Loading Data Files and Initialisation; this is important because this tutorial builds upon the basic ideas introduced in those tutorials.


            Contents

            [hide]

            Introduction to window and widget concepts

            Before we get the the meat of this tutorial there are some essential ideas that you must first consider.

            Every widget is a window

            This is the most central concept that must be grasped when working with CEGUI. Every widget within the system is derived from the same Window base class; so for the purposes of this tutorial, whenever I mention a window, the same ideas could just as easily be applied to a push button or scrollbar widget.

            Many settings are inherited

            Many of the settings and properties available for windows in CEGUI are passed down the window hierarchy. For example, if you set the alpha transparency on a particular window to 0.5, then by default, all window and widgets attached to that window will also be affected by the change applied at the higher level; although note also that the actual setting on the child window remains unchanged - the final values and/or settings used are usually some combination of the setting values from all windows in the hierarchy down to the current window. This also applies to things such as window destruction; by default, a window will destroy attached child windows and widgets when it is destroyed. The main advantages of this arrangement are that you can easily affect a the whole GUI by making changes to the root window settings for things like alpha, visibility, enabled / disabled state, and can easily 'clean up' an entire GUI layout by simply destroying the root window. The default 'inherited' behaviours can be overridden on a per window basis where more fine grained control is needed, or where certain advanced management techniques are to be used.


            Creating the windows

            Enough of the waffle! Lets create a window.

            There are two ways of doing this, via C++ code and XML layout files. Each approach is discussed below.

            GUI Creation via C++ code

            All windows in CEGUI are created by the WindowManager singleton object. You can get access to this object via the usual getSingleton method as follows:

            using namespace CEGUI;
            WindowManager& wmgr = WindowManager::getSingleton();

            In general, you will be using what is known as a DefaultWindow (or to use it's old name, DefaultGUISheet) as the 'root' window in your GUI. This is not required, but is the accepted pattern of usage for CEGUI and, once you start adding more top-level windows, helps simplify laying things out.

            So, to get the ball rolling, we'll create a DefaultWindow as set it as the root 'GUI Sheet' for the GUI:

            Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
            System::getSingleton().setGUISheet( myRoot );

            The createWindow method of the WindowManager takes two strings as its parameters. The first one, "DefaultWindow" in this example, tells the system the type or class of the window you wish to create. Generally, the windows you have available are those which were registered when you loaded your scheme file, although some, like DefaultWindow, are global types and are always available. The second parameter, "root" in this example, is a unique name which will be assigned to the window; this name can be used to retrieve a pointer to the window from the WindowManager at a later time. Note that naming your root window "root" is not required, but is a common convention.

            The setGUISheet method in the System singleton object is used to specify a given window as the root of the GUI. This will replace any current sheet / root window, although do note that the previous window hierarchy is not actually destroyed; it is just unlinked from the display - you can easily switch between GUI 'pages' by simply flipping between them using the setGUISheet method.

            Now you have created your first window and attached it to the GUI system, and the system will use this window as the root of the GUI when it draws the GUI. But, if you were to compile a simple program using this code, you still can't see anything; what gives? There's nothing wrong with your application, the DefaultWindow which we created above is just totally invisible! This is what makes the DeafultWindow ideally suited as a root window; it serves as a blank canvas onto which other window and widgets can be attached. So, lets do that now...

            Here we will create a frame window; this is a window that functions in a similar manner to the windows on your desktop UI, it has a title bar and can be moved and re-sized.

            FrameWindow* fWnd = (FrameWindow*)wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow" );

            here we are creating a "TaharezLook/FrameWindow" window. This name uses a convention seen throughout the system, whereby a window type is prefixed by the name of the widget set (if you were to load the WindowsLook scheme, you could create a "WindowsLook/FrameWindow" object instead). We have given our new window the simple test name of "testWindow". One final thing to note is the use of the cast, this is required since the createWindow method always returns a base Window type; in this, and many other cases a basic Window pointer will suffice, but there are times when you'll want to access methods introduced in the window and widget sub-classes, so the use of the cast as shown is common when using CEGUI.

            In order for the system to be able to do something useful with our new window, we must perform a few additional steps.

            First, we must attach the window to the root window we established above:

            myRoot->addChildWindow( fWnd );

            Now, we can set an initial position and size for our window. CEGUI uses a 'unified' co-ordinate system enabling the use of relative (scale) and absolute (offset) components at the same time - this is why each co-ordinate you will see has two parts. For a slightly extended introduction of this concept see Introduction and overview of core "Falagard" support systems. Back to the example:

            // position a quarter of the way in from the top-left of parent.
            fWnd->setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );

            // set size to be half the size of the parent
            fWnd->setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );

            Finally, we set a caption for the frame window's title bar:

            fWnd->setText( "Hello World!" );

            And that's it! When compiled into an application, you will now see a simple frame window in the middle of the display.


            XML layouts

            All of the above is very nice, but there is one major drawback; any time you wish to adjust the GUI layout, you need to edit your code and recompile. This will get old pretty quick, so what you really want is to be able to specify your GUI layout externally, and have your code load the layout via a file. This is the purpose of the CEGUI layout XML files.

            The system supports XML layout files, which can be loaded via the WindowManager using the loadWindowLayout method. This method creates all the windows for you and returns a pointer to the root window of the loaded hierarchy; which is ideal for assigning as the root of the GUI!

            So, first of all we need a layout file. The following XML saved as a text file, is a layout file equivalent to the code we discussed above:

            <?xml version="1.0" ?>
            <GUILayout>
            <Window Type="DefaultWindow" Name="root">
            <Window Type="TaharezLook/FrameWindow" Name="testWindow">
            <Property Name="UnifiedPosition" Value="{{0.25,0},{0.25,0}}" />
            <Property Name="UnifiedSize" Value="{{0.5,0},{0.5,0}}" />
            <Property Name="Text" Value="Hello World!" />
            </Window>
            </Window>
            </GUILayout>

            The Window elements show an obvious mapping to the createWindow method from the WindowManager object; they take a type and a name which directly correspond to the parameters discussed previously.

            Nesting of the Window elements is used to attach certain windows to others. Note that you may only have one 'root' level window in a layout file, which is another reason you'll usually see the DefaultWindow used as a canvas on which other windows and widgets are placed.

            The Property elements are used to set properties on the Window being defined. There are many properties available for each window/widget class, and each class also inherits all properties from it's parent class. See the <element>Properties namespaces in the API reference for documentation on the available hard-coded properties and their 'value string' formats. Since 'Falagard' skins can create their own properties, it is likely that the windows you are using contain many more properties than listed in the previous link - for these 'soft' properties, you need to consult whichever documentation is provided with the skin you are using (for the sample skins see TaharezLook and WindowsLook).

            If saved as a file called "test.layout", you could load this layout and set it as the GUI root as follows:

            using namespace CEGUI;
            Window* myRoot = WindowManager::getSingleton().loadWindowLayout( "test.layout" );
            System::getSingleton().setGUISheet( myRoot );

            The end result is exactly the same as what was done in C++ code earlier, except that now you can modify and enhance the GUI layout without the need for constant editing and recompilation of the application code.




            理解以上教程很是簡單,提供了兩種創建widget的方法


            posted @ 2008-05-10 02:58 放屁阿狗 閱讀(741) | 評論 (0)編輯 收藏

                 摘要: Bookmarks 863 上海瀚訊無線技術有限公司 ARM Download GNU Toolchain BlueTooth Bluetooth.org - Welcome to Bluetooth.org Welcome to CSR - Changing the way the world co...  閱讀全文
            posted @ 2008-05-08 20:29 放屁阿狗 閱讀(1754) | 評論 (2)編輯 收藏


            Image Decoder:
                libpng,libjpeg,libtiff,

            Image庫:
                cimg, devil,python-pil,agg,cximage,gdk-pixbuf,wxImage(wxWidget),magic-image

            cimg: 采用template技術,整個庫就一個cimg.h,使用起來確實方便其內在功能確實強大,只是簡單應用了一下
            pil: 用python寫過4國軍旗的游戲,采用的就是這個image庫
            agg: 采用template技術,幾乎涵蓋了2d image操作的所有功能,也是弱耦合,使用起來非常靈活
            cximage: 做導航設備的圖片瀏覽軟件時采用image 庫,基本還是比較好用
            gdk-pixbuf: gdk/gtk標準的image 庫,gnome的大量軟件均采用其庫。移植 librsvg時使用過
            wxImage: 依賴 wxWidget庫,類似 Qt的 QtImage類
            posted @ 2008-05-08 20:07 放屁阿狗 閱讀(2126) | 評論 (0)編輯 收藏


            windows下發時經常會碰到諸如c運行庫函數與win32 Api對文件資源的公用的問題

            很簡單的方法:
                FILE *f = fopen (...);
                HANDLE h = (HANDLE)_get_osfhandle (_fileno (f));
                WriteFile( h,....);
                f = fdopen ( (int)h,"w");
                fwrite(f,...)

            posted @ 2008-05-07 01:40 放屁阿狗 閱讀(1213) | 評論 (0)編輯 收藏

            僅列出標題
            共25頁: First 17 18 19 20 21 22 23 24 25 
            久久久久久亚洲AV无码专区| 精品伊人久久久| 日本一区精品久久久久影院| 青春久久| 午夜不卡888久久| 国产A三级久久精品| 亚洲人成无码www久久久| 国产精品永久久久久久久久久| 亚洲国产精品成人久久| 国产精品成人久久久久久久| 少妇熟女久久综合网色欲| 亚洲成色WWW久久网站| 久久久久久毛片免费看| 久久成人国产精品一区二区| 国产精品免费久久| 亚洲中文字幕无码久久综合网| 久久精品免费观看| 91精品观看91久久久久久| 国色天香久久久久久久小说| 久久电影网| 久久亚洲精品视频| 久久精品国产亚洲AV麻豆网站| 日韩精品久久久久久久电影| 色欲综合久久躁天天躁| 久久久综合九色合综国产| 久久精品国产亚洲av水果派| 久久精品一本到99热免费| 久久精品欧美日韩精品| 久久妇女高潮几次MBA| 国产亚洲精久久久久久无码77777 国产亚洲精品久久久久秋霞 | 伊人久久大香线焦综合四虎| 久久亚洲AV成人出白浆无码国产| 日韩人妻无码精品久久久不卡 | 久久久久国产日韩精品网站| 狠狠干狠狠久久| 91精品久久久久久无码| 91精品国产91久久久久久| 欧美亚洲另类久久综合| 国产精品一区二区久久精品无码 | 久久精品这里热有精品| 久久久中文字幕|