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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - M3rs

Pages: [1]
1
General / ImGUI not displaying
« on: July 09, 2016, 01:49:06 am »
EDIT 2: On close, I am getting the notice: "An internal OpenGL call failed in Texture.cpp (110) : GL_INVALID_FRAMEBUFFER_OPERATION, the object bound to FRAMEBUFFER_BINDING is not "framebuffer complete" -- I'm less concerned about this, but curious as to a cause/fix.

EDIT: It was a silly mistake, sorry and thank you. The fix was to change my CMakeLists.txt:
FIND_LIBRARY(OpenGL_Lib OpenGL) # instead of searching for GL, had to search for OpenGL. Feel free to delete or leave as reference.

Hello SFML forums,

I'm trying to set up SFML with ImGUI and having some trouble (on OS X). The below c++ code compiles fine and runs; however, no ImGUI objects show up (my "Look a button!" or the "Hello, world!" frame/window/not-sure-the-word).

It may be something terribly obvious, so I'm sorry if I'm missing any silly errors, but thank you to anyone who can help.

The SFML implementation is not my own (credit https://github.com/eliasdaler/imgui-sfml), but I'm sure his code is sound.

The OpenGL being found is "/opt/X11/lib/libGL.dylib".

Thank you,

Andy

c++ code
(click to show/hide)

CMakeLists.txt
(click to show/hide)

2
Graphics / Help with Shader and Texture
« on: October 30, 2015, 02:33:15 pm »
Hello SFML!
I'm having trouble getting my sf::Shader to work on a sf::RectangleShape that has a texture attached to it via setTexture( &texture).
Is there something I am missing in order to get that to work?

I'm using a simple fragment shader that I got from the forums somewhere here. Here is the shader:
(click to show/hide)
And what happens is this:
(click to show/hide)

The rectangle shape on the left, with no texture, is properly lighted. On the right, with my wall.png as a texture, it still shown bright as day.

I'm pretty new to GLSL and wanted to use SFML because: 1. I really like it and have used it before, 2. OpenGL is a lot more code / scary to me.

Here is how I load the shader, create the rectangles and apply the texture:
(click to show/hide)

Here is a snippet for the drawing:
(click to show/hide)

NB:
- The shadow method is what's creating those faux-hard shadows, again courtesy of the sfml forums (thanks, it's awesome, I have the link on my other computer).
- The "light" parameter for the shader is set earlier based on the mouse position.

Any help / advice would be much appreciated.

Thanks!


Pages: [1]