Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Source GLFont for main 5.2  (Visto 2274 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline son1xx2 Posteado: January 02, 2025, 10:36:32 AM | Modificado: January 02, 2025, 11:40:36 PM by son1xx2

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2456
  • vn
I converted it to use in main 5.2 but no longer use it, it's very simple but I leave the code here in case someone needs it.




Do better, don't try to do the same ;)

Gracias:

AvaritiA, vitrex, Rifah, wener1992, Saxius, JhonaTanLR, MDDM, duccom0123, esteban, xianwen, Plate98, cri0, congacp1, Shellshock, deltime, wallaceh, Berlan Barbalho, thieugia, ValkyrieDevs, cao4ni, xsojomx, WTeam Dev, Smudevelop, Lotto4K4k, stanger777, tienduy1992, tuyendam, nacho,ignacio, phamloi7710, e911217, JuniorInc, 4312204, axell, ggdibe, phumynice, z0lik, Genilson23, vampzao123, NexusMu, Pecan, hola23, sayfmaster, samsung13, Marceliin, lukaz2z, hungngok94, bigrealtk92, yokkjll, JavixFer, ProGuard, stark98, yan1ycc, kove0816, kaisudo, muphantom, Matt1995, ashlay, guhan10, tunhi3000, FaNaMaN, hlinxuan20, walassi12, xufqing, HayllanderBR, mrtin, Garisons, hide3by, muccone, jeuzinn, shu2004, bin9xhn2, Hugo, rugaro, erickmalfoy, Malyk, draco425, a269633915, SPK, carper, tutu100, Darki12345, eraclio1, MADRUGA, swedka, dizzys, Mineiro, BDCAM, gang, pedrob, kimjfsim, coolgepds, korron, ldchinh, backerchen, Mizuki, kaiocnx, vcore30, kasah, wellihard, mocorongo, ukvayha, hoanmaster, h3yShOk, Androjd123, bhramabr, 183358, legacy101, zhangjianle865, Rindy, superrin, pimkungclub, mu2020, dahouzi, baojianyang, ntcong295810, nic269, anonymousgh, s00x, hieuvt, chipcoidj, vnshell, muedit, quyanxu, 1732313, phuongcuongmsqm, Chupulum, zhujianhui, llZeuzll, kskooper, williandv, dedek1, BaTmaaN, komandirbk, Sub-Zero, Dieguinho, haziel, GabrielDev, networks1, pulsefire, makyntosh, lucasvieira, MsotoC, redf0x, malke, MUXP, xlockee, Pyke, andreyzz, plyn, king992253, pnicacio, Darckz, zeronycs, joaovithor1, juan1997, dakosmu, Sweng, HaPKoTuK, nelson, terrygoth, roshux, Odisk, muzic25, pety456, allhoy, llhenryxpxx, 153426, lkt22, Denis Alves, nhantac, InFamous, kayito, felipesanto, Kapocha33, mugloves99, lucasale, Ebraim, Ryzenn, Almdar, antoniodel, Dizzy, 331515194, Cartman, KenZ, HazzdeN, djagripnos, chuckhai, spartacus, francucho28, mustx1

Offline komandirbk #1 Posteado: January 03, 2025, 11:03:54 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 58
  • Gracias recibida: 300
  • ua
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

Discord: brain_off

Offline son1xx2 #2 Posteado: January 03, 2025, 11:41:38 AM | Modificado: January 03, 2025, 11:43:45 AM by son1xx2

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2456
  • vn
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

Do better, don't try to do the same ;)

Gracias:


Offline komandirbk #3 Posteado: January 03, 2025, 08:33:28 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 58
  • Gracias recibida: 300
  • ua
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

Finally, done. Idk why i need it, but can you tell me difference between default font and glfont? Why we need to use it?

Discord: brain_off

Gracias:


Offline son1xx2 #4 Posteado: January 03, 2025, 09:18:56 PM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2456
  • vn
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

Finally, done. Idk why i need it, but can you tell me difference between default font and glfont? Why we need to use it?


because it's light and easy to adjust styles, cross platform because it only draws with opengl. I switched to freetype so I don't use it anymore, default 5.2 uses textoutW to draw but the characters are not sharp and gradually become heavy.

Do better, don't try to do the same ;)

Gracias:


Offline ukvayha #5 Posteado: January 21, 2025, 10:41:10 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 4
  • Gracias recibida: 0
  • vn
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

có cách nào để tôi có thể liên hệ với bạn ko


Offline son1xx2 #6 Posteado: January 22, 2025, 01:09:44 AM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 198
  • Gracias recibida: 2456
  • vn
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

có cách nào để tôi có thể liên hệ với bạn ko

bạn có thể hỏi trực tiếp ở đây.

Do better, don't try to do the same ;)

Gracias:


Offline ukvayha #7 Posteado: January 22, 2025, 03:53:36 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 4
  • Gracias recibida: 0
  • vn
What else should we do to enable it? I added init to WinMain, Delete also and when i trying to use render(draw) it doesn't shows.
I am getting OpenGL error: 1280
Do i need to include some libs or something else?

add this to Winmain
Code: [Select]
g_Font[GL_g_hFont] = new CGlFont("Arial", FontHeight , FW_NORMAL, FALSE, FALSE);
g_Font[GL_g_hFontSC] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBold] = new CGlFont("Arial", FontHeight , FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFontBig] = new CGlFont("Arial", FontHeight  * 2, FW_SEMIBOLD, FALSE, FALSE);
g_Font[GL_g_hFixFont] = new CGlFont("Arial", 12, FW_NORMAL, FALSE, FALSE);


Using like this

Code: [Select]
g_Font[GL_g_hFont]->Print(m_MapNamePos.x, data.iY, data.szMainMapName, ALIGN_CENTER);

because it uses opengl to draw, it is very light and fast but it also requires you to pay attention to opengl state functions like EnableAlphaTest() or EnableAlphaBlend();

The code does not support unicode, if you use it with unicode you need to recreate the fontatlas yourself

có cách nào để tôi có thể liên hệ với bạn ko

bạn có thể hỏi trực tiếp ở đây.
bạn có thể check messager và liên hệ với tôi đc chứ


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
8 Replies
5985 Views
Last post January 02, 2022, 09:49:27 AM
by massironimatias
1 Replies
3281 Views
Last post February 24, 2018, 02:27:14 PM
by Ryuno
0 Replies
1870 Views
Last post February 24, 2022, 06:19:46 PM
by onlinezajzaj
2 Replies
4782 Views
Last post September 14, 2022, 01:10:13 AM
by hichay
6 Replies
2433 Views
Last post December 09, 2022, 10:21:42 PM
by redf0x