Results 1 to 6 of 6

Thread: blending...

  1. #1
    Member Contributor
    Join Date
    Jul 2001
    Location
    France
    Posts
    80

    blending...

    hello,
    here is my problem:
    i blend a string (made with 2d textured fonts) with my scene, the problem is that i just want the text to be tranparent, not the rest !
    haw can i do that ?

    i have tried to

    draw my scene()
    enable blending
    draw the text()

    it doesn't works well, i see a white box instead of the text.

    can you help ?

    marsu

  2. #2
    Guest

    Re: blending...

    The high level algorithm shoould work so probably are something wrong with how you setup the blending. Maybe can someone find the error if you post some code.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    227

    Re: blending...

    as far as I understand your ptoblem you probably should sue an alphatest instead of blending

    Chris
    yes

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: blending...

    If you get a white box, it's 99% probable that it's a problem with your texture code, not the blending. The problem could lie in the texture data, texture binding, etc. Can you post more code regarding how you set up the textured fonts?

  5. #5
    Member Contributor
    Join Date
    Jul 2001
    Location
    France
    Posts
    80

    Re: blending...

    Hello,
    these past days, i have worked in making several classes to encapsulate direct input,
    texturing,fonts.
    I think that you will need the whole stuff,so i will make a little internet site where all will be avaiable for download.
    when the site will be up, i will post a new message.

    most of my work is porting some nehe code into class with some minor own changes.

    Marsu (tanks for all the replies)

  6. #6
    Member Contributor
    Join Date
    Jul 2001
    Location
    France
    Posts
    80

    Re: blending...

    hello,
    please visit
    http://domimarsu.multimania.com/

    to download all my source code
    if you can explain what are my errors it would be cool.

    i think that the destructors are bad or arn't called,
    but the main problem is blending and the white square

    the Draw() function is in example.cpp

    Regards,
    Marsu

Similar Threads

  1. Avoid Blending with Background when Blending Quads
    By Aboleoneo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-05-2017, 05:54 PM
  2. Replies: 1
    Last Post: 05-01-2013, 09:37 PM
  3. Bad Blending
    By glBomb in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-23-2006, 05:01 AM
  4. Blending
    By Swiftless in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-07-2005, 01:53 AM
  5. Blending
    By ltrain_riders in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-03-2002, 02:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean