Jump to content

Patrik

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Patrik

  1. Ok, thanks for the tip. I also found another way to do it also using the glScissor(x, y, width, height) command. glScissor command Then you can specify an area on the screen and stuff rendered outside that area will not be shown.
  2. Hello I was wondering if it's possible using the built in text function to somehow only render part of the text on the y-axis. (see picture) How would you achieve this result? Scale it? Render all text and erase the parts no wanted?
  3. I've uploaded a new demo in the first post. Now it contains the shader.pak & the used materials. No new functions or other content though. Yet...
  4. Thanks, ok I must remember to include that one in the next demo then. 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.
  5. 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// 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
  6. Ok, I got it to work. After scaling the text I just needed to change the y position to it's negative. Instead of position it at y = 400 I need to position it at y = -400.
  7. Aah of course , thanks! 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
  8. 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.
×
×
  • Create New...