Hello Guest

Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Lightweight Java Gaming Library / Re: Text Renderer
« Last post by Suma on September 17, 2020, 07:20:13 »
I am considering porting JOGL TextRenderer to LWJGL. Before I do so, I am checking on the internet if perhaps there is some previous effort. This thread looks promising, but I do not see any links to the code WINDFALL007 has ported.

I agree with the previous posters a text renderer is needed, it may exist as a separate library (I would be happy to maintain and publish it).
82
LWJGL Documentation / Re: Webstite wrong link for DriftFX
« Last post by KaiHH on September 16, 2020, 11:22:50 »
Thanks for the info! Will be fixed soon.
83
LWJGL Documentation / Webstite wrong link for DriftFX
« Last post by MikOfClassX on September 16, 2020, 06:26:48 »
Hi,

the DriftFX link in https://www.lwjgl.org/customize "nightly" is pointing to http://bulletphysics.org/

Cheers!

Mik
84
Lightweight Java Gaming Library / Re: Can someone correct my texture Coordinates?
« Last post by KaiHH on September 14, 2020, 11:08:47 »
No. You need to have 24 (= 4*6, 4 vertices per quad, 6 quads) vertices, because you can only share the four vertices among the two triangles of each of the six faces of the cube.
85
Lightweight Java Gaming Library / Re: Can someone correct my texture Coordinates?
« Last post by coolian on September 14, 2020, 11:08:11 »
If this is supposed to be a textured cube, then you cannot share all 8 vertices with their texture coordinates. Each vertex is currently shared by three faces, but needs different texture coordinates based on where on those respective three faces it is located at.

So i need more than 8 texture coords but then how are they supposed to be and how do i figure out which texture coordinates to use?
86
Lightweight Java Gaming Library / Re: Can someone correct my texture Coordinates?
« Last post by KaiHH on September 14, 2020, 10:54:28 »
If this is supposed to be a textured cube, then you cannot share all 8 vertices with their texture coordinates. Each vertex is currently shared by three faces, but needs different texture coordinates based on where on those respective three faces it is located at.
87
Lightweight Java Gaming Library / Can someone correct my texture Coordinates?
« Last post by coolian on September 14, 2020, 09:18:15 »
Code: [Select]
//                  positions           //colours          textureCoords
-0.5f, -0.5f, -0.5f,  1.0f, 0.0f, 0.0f,  0.0f, 0.0f,
0.5f, -0.5f, -0.5f,  0.0f, 1.0f, 0.0f,  1.0f, 0.0f,
0.5f,  0.5f, -0.5f,  0.0f, 0.0f, 1.0f,  1.0f, 1.0f,
-0.5f,  0.5f, -0.5f,  1.0f, 1.0f, 0.0f,  0.0f, 1.0f,
-0.5f, -0.5f,  0.5f,  1.0f, 0.0f, 0.0f,  0.0f, 0.0f,
0.5f, -0.5f,  0.5f,  0.0f, 1.0f, 0.0f,  1.0f, 0.0f,
0.5f,  0.5f,  0.5f,  0.0f, 0.0f, 1.0f,  1.0f, 1.0f,
-0.5f,  0.5f,  0.5f,  1.0f, 1.0f, 0.0f,  0.0f, 1.0f
Code: [Select]
//              indices
    0, 1, 3, 3, 1, 2,
    1, 5, 2, 2, 5, 6,
    5, 4, 6, 6, 4, 7,
    4, 0, 7, 7, 0, 3,
    3, 2, 7, 7, 2, 6,
    4, 5, 0, 0, 5, 1
the face facing up shows the correct texture but no other visible face does
88
thats depending on the IDE youre using not lwjgl if youre on eclipse try pressing ctrl - space if not well theres no help without knowing your IDE
89
Hi,NITAI99

    I ran your code, and the rectangle appeared.
90
OpenGL / Re: Why is opengl not using the correct data for positions
« Last post by coolian on September 13, 2020, 19:23:01 »
im pretty sure i read somewhere putting 0 in the stride lets opengl figure it out
Using 0 for stride only works for non-interleaved buffers (i.e. one buffer = one vertex attribute). Using 0 for stride simply means: that single vertex attribute is "tightly packed", that means: No other vertex attributes are interleaved between them.
This is what the spec says:
Quote
stride
Specifies the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in the array. The initial value is 0.

oooh okay thanks for explaining it to me
Pages: 1 ... 7 8 [9] 10