Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Drawing SFML 2D and vertices in 3D  (Read 5220 times)

0 Members and 1 Guest are viewing this topic.

Sarcarx

  • Guest
Drawing SFML 2D and vertices in 3D
« on: June 19, 2014, 03:51:34 pm »
Hi everyone,

I am using SFML for my 3D project (great library by the way), i have to display 3D objects and i want to add some kind of HUD (2D rectangle) on my camera.

What i do is that i draw all my vertices objects through OpenGL and then draw my sfml::rectangle, but this rectangle doesn't show up if I draw 3D stuff before, please note that it actually displays if I don't draw 3D vertices objects.

If anyone has already had the issue, any help will be greatly appreciated !


zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Drawing SFML 2D and vertices in 3D
« Reply #1 on: June 19, 2014, 03:53:20 pm »
We really can't help unless you follow the forum rules.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Drawing SFML 2D and vertices in 3D
« Reply #2 on: June 19, 2014, 03:55:16 pm »
Have you read (and did things accordingly) the last chapter of the SFML + OpenGL tutorial?

Sarcarx

  • Guest
Re: Drawing SFML 2D and vertices in 3D
« Reply #3 on: June 19, 2014, 04:34:08 pm »
We really can't help unless you follow the forum rules.

Of course you can, i am not going to read all of this just for a question, please understand and tell me what you actually need.

Have you read (and did things accordingly) the last chapter of the SFML + OpenGL tutorial?

I have read all the relevent tutorial, what is the one you are actually refering to ? The closest to what you say i have found is just opening a window with OpenGL.

Sarcarx

  • Guest
Re: Drawing SFML 2D and vertices in 3D
« Reply #4 on: June 19, 2014, 04:44:14 pm »
Actually my problem is a bit different, when i use OpenGL vertices, the HUD appears to be displayed in a very strange manners, like if it was modified by the shaders.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Drawing SFML 2D and vertices in 3D
« Reply #5 on: June 19, 2014, 04:50:19 pm »
Of course you can, i am not going to read all of this just for a question, please understand and tell me what you actually need.

Actually my problem is a bit different, when i use OpenGL vertices, the HUD appears to be displayed in a very strange manners, like if it was modified by the shaders.

Great  ::)   so we can keep on guessing what you probably have done wrong in your code. To think that it is too much for you to read a link of what exactly we need. :P Let me go get my crystal_ball.exe
« Last Edit: June 19, 2014, 04:52:07 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Sarcarx

  • Guest
Re: Drawing SFML 2D and vertices in 3D
« Reply #6 on: June 19, 2014, 04:53:15 pm »
Ok after some research I now know for sure that my problem comes form enabling/disbling my shader program. I use my shader programm at the beginning of my drawing of the vertices but the HUD (sfml rectangle) doesn't display anymore, if i don't use the shader program, it displays, does someone know how to stop using the shader programm at the end of my vertices drawing method ?

I understand that i am not showing any code but the truth is there is so much i don't really know what to show you right now. Sorry if i sounded a bit like a dickhead but i was hoping for someone who encoutered the same issue and just drop me the solution from the sky   ;D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Drawing SFML 2D and vertices in 3D
« Reply #7 on: June 19, 2014, 06:16:03 pm »
We've seen quite a few similar issues which is exactly why we asked you to create a minimal but complete example, but since you apparently know everything better...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything