rougier / freetype-gl

OpenGL text using one vertex buffer, one texture and FreeType
Other
1.65k stars 266 forks source link

Text not rendering #185

Closed AdamBucior closed 6 years ago

rougier commented 6 years ago

Is there any error message in the console ?

rougier commented 6 years ago

Did you manage to run the demos bundled with freetype-gl?

rougier commented 6 years ago

What are the messages?

rougier commented 6 years ago

Most probably the harfbuzz library is missing on your system.

rougier commented 6 years ago

No, but then you have to disable the building of the harfbuzz demo.

ghost commented 6 years ago

W jaki sposób wgrałeś glfw do freetype, bo kurczę nie wiem jak to zrobić ;/

ghost commented 6 years ago

Tak, tylko, że jak pobieram ftgl to nie mam glfw wgranego w folder więc muszę go pobrać, zbudować i wtedy jakoś wrzucić to freetype.

rougier commented 6 years ago

you have to configure cmake before building and look at the different options. Also, fontconfig is missing (header files probably)

rougier commented 6 years ago

Have a look at cmake documentation, it is explained.

Jaszczolt commented 6 years ago

You have to disable Doxygen with this: cmake -Dfreetype-gl_BUILD_APIDOC=OFF ftgl-master - and add glfw to ftgl

ghost commented 6 years ago

I do not know.

ghost commented 6 years ago

Have the same problem. Maybe @rougier knows what to do with it or knows a person who'd help.

wmamrak commented 6 years ago

After installing GLFW (using CMake), in ${CMAKE_INSTALL_PREFIX)/lib/cmak/glfw3 there are config files needed (glfw3Config.cmake and others). When configuring freetype-gl in CMake add entry glfw3_DIR and set it to ${CMAKE_INSTALL_PREFIX)/lib/cmak/glfw3 (replace ${CMAKE_INSTALL_PREFIX} with real directory). If this won't help, specify GLFW3_INCLUDE_DIR, GLFW3_LIBRARY_DIR and GLFW3_LIBRARY.

czw., 14 cze 2018 o 21:31 DonTweaks notifications@github.com napisał(a):

Have the same problem. Maybe @rougier https://github.com/rougier knows what to do with it or knows a person who'd help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rougier/freetype-gl/issues/185#issuecomment-397412088, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0jIBTj-BJZ5qTBqEdfbyL5mjt-sXqZks5t8roHgaJpZM4UVQXP .

wmamrak commented 6 years ago

Specify GLFW3_INCLUDE_DIR, GLFW3_LIBRARY_DIR, GLFW3_LIBRARY and check, I don't know.

sob., 16 cze 2018 o 19:11 Adam notifications@github.com napisał(a):

Must I instal GLFW using cmake? Can't i just have lib file?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rougier/freetype-gl/issues/185#issuecomment-397826549, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0jIApMAQ4us5dCwhKPsEW1B0SVZ-ziks5t9TxMgaJpZM4UVQXP .

ghost commented 6 years ago
  1. Pobierasz glfw ze stronki
  2. Rozpakowywujesz i tworzysz gdzieś sobie folder o nazwie np. buildglfw
  3. Odpalasz cmd i wpisujesz cd buildglfwi wciskasz enter
  4. Wchodzisz w folder z cmake i aplikację cmake.exe i trzymając lewym przyciskiem myszy na nią przeciągasz na cmd
  5. Przeciągasz w analogiczny sposób folder z glfw (ten rozpakowany) i klikasz enter.
  6. Gdy już ci się załaduje wchodzisz w folder buildglfw, otwierasz projekt ALL_BUILD i buildujesz
  7. Wchodzisz w folder buildglfw/CMakeFiles/Export/lib/cmake/glfw3 i kopiujesz glfw3Targets.cmake
  8. Cofasz się do buildglfw i wchodzisz w src - tam wklejasz glfw3Targets.cmake
  9. Pobierasz ftgl
  10. Wchodzisz w cmake-gui
  11. Ustawiasz source code na ftgl-master (ten folder który pobrałeś z githuba)
  12. Tworzysz folder buildftgl i wybierasz go jako ten w którym mają być buildowane rzeczy
  13. Dodajesz entry: a)GLFW3_INCLUDE_DIR jako path: folderZglfw/include b)GLFW3_LIBRARY_DIR jako path:buildglfw/src/Debug c)GLFW3_LIBRARY jako filepath: buildglfw/src/Debug/glfw3.lib
  14. Klikasz Generate i generujesz projekt
  15. Pojawia ci się błąd, bo masz włączonego Doxygen
  16. Odklikujesz freetype-gl_BUILD_APIDOC
  17. Usuwasz wszystkie pliki, które znajdują się w folderze buildftgl
  18. Buildujesz od nowa i cieszysz się działającymi demosami

  1. Download glfw
  2. Unpack it and make directory called e.g. buildglfw
  3. Run cmd type cd buildglfw press enter
  4. Go into cmake folder and move cmake.exe to cmd
  5. Move glfw folder to cmd
  6. When all will be finished go into buildglfw, open ALL_BUILD and build it
  7. Go into buildglfw/CMakeFIles/Export/lib/cmake/glfw, copy glfw3Targets.cmake
  8. Go back to buildglfw and then go into src - paste there glfw3Targets.cmake
  9. Download ftgl
  10. Run cmake-gui
  11. Setup source as a ftgl downloaded directory
  12. Make buildftgl folder and choose it as the build the binaries
  13. Add entry: a)GLFW3_INCLUDE_DIR as a path: folderWithglfw/include b)GLFW3_LIBRARY_DIR as apath:buildglfw/src/Debug c)GLFW3_LIBRARY as a filepath: buildglfw/src/Debug/glfw3.lib
  14. Generate
  15. Error happenes, because of Doxygen
  16. unmark freetype-gl_BUILD_APIDOC
  17. Go to buildftgl and delete all files
  18. Generete, build and enjoy!

@rougier Could you correct my mistakes and highlight this comment to all people with trouble, please?

rougier commented 6 years ago

What do you mean correct my mistakes? And I'm not sure how to highlight the comment. Maybe you can open a new issue with just the installation procedure for windows.

wmamrak commented 6 years ago

Language mistakes, I believe

ghost commented 6 years ago

Language mistakes, I believe

Maybe you can open a new issue with just the installation procedure for windows.

Sure

MyForce2 commented 6 years ago

I'm having the same problem, can you please share your solution?

rougier commented 6 years ago

I think the solution is a few posts above.

LordVeggie commented 6 years ago

sorry for bothering i also have a similar problem with the same episode . i get text to draw the blocks the right shape but they are all just black no letters of any color at all . image

rougier commented 6 years ago

Did you tried the prosposed solution? If yes, please open a new issue describing the problem (with a link to this issue).

LordVeggie commented 6 years ago

can any one ask adam0310 what he did because the solution does nothing to the problem i still get the black blocks. pls and tanx

LordVeggie commented 6 years ago

should i post my code or a link to the code i alredy have posted (hear is the link) https://www.reddit.com/user/LordVeggie/comments/9eyd1l/freetype_gl_not_rendering_any_font_i_get_a_black/

rougier commented 6 years ago

Did you manage to run one of the demo? Is the output correct? If not, maybe it's better to open a new issue with a screenshot of your outputs on the demo.

LordVeggie commented 6 years ago

found the solution down load the code of cherno (freetype gl only and past it over the freetype code you down loaded from freerype gl website ) . then go to line 303 in texture-atlas.c and make the( #if 0 TO A #if 1) then you should have the text rendering