Jump to content

Patrik

Members
  • Posts

    34
  • Joined

  • Last visited

Posts posted by Patrik

  1. I think you forgot to include the shaders.pak file as it wouldn't work without that.

     

    Very nice demo though :)

     

    Thanks, ok I must remember to include that one in the next demo then. :D

     

     

    Will you release this library ? :)

     

    If I get it to such a state that I would feel comfortable releasing it and if there are people that want to use it. I would most likely make a library of it and and release it.

  2. PFWGui is an OpenGL gui library. The library has been mainly developed and tested in the LeadWerks engine under Windows operating system. The goal is to support any OpenGL engine but LeadWerks is the only one I've tested it with so far. A DirectX version is also planned. The library is still in a very early stage and no thorough testing has been done yet so use at your own risk.

     

    PFWGui makes use of FTGL for font rendering, Simple OpenGL Image Library (SOIL) for image loading and ksignal for the signal/slot mechanism in the gui.

     

    PFWGui + Source code is available at my google code page: http://code.google.com/p/pfwgui//

     

    screen2.png

     

     

    Features:

    - Several gui components

    - Event driven

    - No dependencies to leadwerks

    - (should run in any opengl applications)

    - All "painting" is done by one class + one for font rendering.

    - Could be switched to allow it to run in DirectX applications also, not tested yet

    - Signals & slots

    - True Type Fonts

    - Customizable colors & Shapes (rounded corners)

    - Window Management

    - Window Layouts

     

     

    Current supported gui components:

    Labels

    Buttons

    Checkboxes

    ComboBoxes

    EditBoxes

    ListBoxes

    ProgressBars

    ScrollBars

    Sliders

    TextBoxes

    RadioButtons

    PieCharts

    BarCharts

    LineCharts

    Images

    GridView

    • Upvote 5
  3. Use DrawText() with SetBlend().

     

    Aah of course :) , thanks!

     

     

    Call this:

    glSetMatrixMode(GL_MODELVIEW_MATRIX)

     

    Before your code and see if that helps.

     

    I tested that but no difference. My problem is that the scaling actually sort of works I can scale it from 1.0 -> 0.0 and it works as expected but I can't scale it to the negative side if I do the text disappears.

     

    I need to read up on opengl's transformations :D

  4. Hello

     

    I'm having some trouble rendering text on my screen. Using the default font rendering DrawText() command I can get the text to show but when rendering the text on top of the content of the screen i get an blackbox around the the text (see picture) is it possible to render the text with an transparent background somehow? I've tried rendering it in my buffer and in the backbuffer.

     

    my buffer is currently configured as this CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);

     

     

    i've also implemented the FTGL font library in my attempts to get text rendering to work as I want. It supports several rendering styles Pixmap, polygon and texture rendering.

    When rendering as pixmaps it works as expected but it's way to slow. When rendering as Textures there is no performance issues. But for some reason the text gets rendered upside-down, very annoying (see picture). I've gathered as much as you can scale textures with a negative value to flip them using glScalef(1.0, -1.0, 1.0) but I can't get that to work either, maybe I need to switch the opengl matrix?

     

    My attempt to flip the text

    glPushMatrix();
    glLoadIdentity();
    glScalef(1.0, -1.0, 1.0);
    m_font->Render(text, -1, p);  // renders the texture
    glPopMatrix();

     

    I'd appreciate if some could point me in the right direction to help me solve these problems.

     

    fonts.jpg

×
×
  • Create New...